Closed
Bug 1308675
Opened 8 years ago
Closed 8 years ago
XHTML serializer handling of <br> (and other self-closing tags) inside <pre> is all buggy
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
(deleted),
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Consider something like this:
<pre>Some text<br />More text</pre>
When we run that through our XHTML serializer, we increment mPreLevel at the <pre>, increment it again at the <br> start, do NOT decrement it at the <br> end because it's self-closing, and then end up with a nonzero mPreLevel forever after.
And our serializer tests don't catch this, because they run with a display:none iframe, where we never end up touching mPreLevel at all, because it's style-dependent.
Assignee | ||
Comment 1•8 years ago
|
||
The test change makes sure the test actually tests this codepath. The resulting
test changes are all due to the test now recognizing <pre> as preformatted.
Attachment #8799095 -
Flags: review?(ehsan)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Updated•8 years ago
|
Attachment #8799095 -
Flags: review?(ehsan) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1fdcea1595a4
Fix the XHTML serializer's handling of self-closing tags inside <pre> to correctly keep track of our mPreLevel. r=ehsan
Comment 3•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•