Closed
Bug 1309326
Opened 8 years ago
Closed 8 years ago
HTML serializer handling of <br> (and other empty 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)
Details
Attachments
(1 file)
17.66 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1308675 +++ Consider something like this: <pre>Some text<br>More text</pre> When we run that through our HTML 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 an empty tag, 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. Yes, just like bug 1308675 but for the HTML serializer. Sorry I didn't notice it immediately. :(
Assignee | ||
Comment 1•8 years ago
|
||
The test change makes sure the test actually tests this codepath. The resulting test expectation changes are all due to the test now recognizing <pre> as preformatted.
Attachment #8799905 -
Flags: review?(ehsan)
Updated•8 years ago
|
Attachment #8799905 -
Flags: review?(ehsan) → review+
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1ae11d588928 Fix the HTML serializer's handling of self-closing tags inside <pre> to correctly keep track of our mPreLevel. r=ehsan
Comment 3•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1ae11d588928
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•