Closed
Bug 1011831
Opened 11 years ago
Closed 11 years ago
Support <template> element in XHTML parser.
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: wchen, Assigned: wchen)
References
Details
Attachments
(2 files, 1 obsolete file)
4.99 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
5.06 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
It turns out that we still use the old parser to parse XHTML document as XML when the mime type is application/xhtml+xml and the old parser does not have support for <template> elements:
http://dxr.mozilla.org/mozilla-central/source/content/html/document/src/nsHTMLDocument.cpp#569
Assignee | ||
Comment 1•11 years ago
|
||
Handle the <template> element as specified for XHTML documents.
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#parsing-xhtml-documents
Attachment #8424282 -
Flags: review?(hsivonen)
Comment on attachment 8424282 [details] [diff] [review]
Support <template> element in XHTML parser.
I guess we still need another bug&patch for XSLT...
Attachment #8424282 -
Flags: review?(hsivonen) → review+
Assignee | ||
Comment 3•11 years ago
|
||
I've changed the approach for fixing this bug. It now pushes template content onto the stack instead of the template element. There were a couple places that would count the number of children of the node at the top of the stack and it would get the number wrong if we pushed the template element instead of the template contents. This new patch is also closer to what we do in the HTML parser for handing the template element. Also added some tests.
Follow up bug for the XSLT issue here: Bug 1016720
Attachment #8424282 -
Attachment is obsolete: true
Attachment #8429673 -
Flags: review?(hsivonen)
Attachment #8429673 -
Flags: review?(hsivonen) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Flags: in-testsuite+
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/cf1c0ce583ce for somehow breaking OSX devtools-1: https://tbpl.mozilla.org/php/getParsedLog.php?id=40772856&tree=Mozilla-Inbound
Flags: needinfo?(wchen)
Flags: in-testsuite?
Flags: in-testsuite+
Assignee | ||
Comment 6•11 years ago
|
||
It turns out that we use a different serializer for xhtml parsed as xml that needs to be updated, and this was causing the failure in dev tools.
I've updated the iterative serializer in nsDocumentEncoder to step into template contents, similar to what we do in the FragmentOrElement serializer.
Attachment #8432856 -
Flags: review?(hsivonen)
Flags: needinfo?(wchen)
Attachment #8432856 -
Flags: review?(hsivonen) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Flags: in-testsuite? → in-testsuite+
Comment 8•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•