Closed
Bug 179071
Opened 22 years ago
Closed 22 years ago
[FIX]<dl> closes out <dd>
Categories
(Core :: DOM: HTML Parser, defect, P1)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla1.3alpha
People
(Reporter: plh, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file)
1.56 KB,
patch
|
harishd
:
review+
hjtoi-bugzilla
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016 Mozilla builds an invalid DOM tree from a valid XHTML document. The problem shows up when viewing the DOM specifications and can be seen easily using the DOM inspector. If you look at the descriptions of interfaces in the specs, you'll see that they are composed using nested DLs. The DLs are nested inside the DD children. From time to time, a "sub" DL is represented in the DOM tree as the child of the DL element instead of its DD: Original HTML document: <dl> <dt>Interface DOMConfiguration</dt> <dd> <p>The DOMConfiguration interface ...</p> <dl> <dt>Issue DOMConfiguration-1</dt> <dd> bla bla </dd> </dl> </dd> </dl> Mozilla DOM tree: <dl> <dt>Interface DOMConfiguration</dt> <dd> <p>The DOMConfiguration interface ...</p> </dd> <dl> <dt>Issue DOMConfiguration-1</dt> <dd> bla bla </dd> </dl> </dl> This creates an error in the rendering since the margin-left is not what it should be. For example, have a look at the DOM Level 3 Core specification and the description of the DOMConfiguration interface: The issues (DOMConfiguration-1 and DOMConfiguration-2) must have the same left margin as the previous paragraphs but don't unfortunately. The DOM inspector will show more of these when you look at the DL children. Moving the DL node back to his appropriate place using the DOM inspector fixes the rendered document btw. Reproducible: Always Steps to Reproduce: 1.load the document 2.scroll down to the DOMConfiguration interface 3. Actual Results: invalid layout given the initial XHTML structure due to the invalid DOM tree in memory Expected Results: build a valid HTML DOM tree
Assignee | ||
Comment 1•22 years ago
|
||
Yep... the inner <dl> closes out the <dd>... we have tons of bugs on this Harish; any chance of fixing it? ;)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Whiteboard: DUPEME
Assignee | ||
Comment 2•22 years ago
|
||
This broke as a result of fixing bug 100466 -- <dt> can't contain <dl>, but <dd> certainly can.
Assignee | ||
Comment 3•22 years ago
|
||
See bug 145108, bug 173500 (which points out this same line of code!), bug 172782, bug 154304, bug 172917, bug 106503. I suspect at least half of these, maybe more, are this problem.
Assignee | ||
Comment 4•22 years ago
|
||
Assignee | ||
Comment 5•22 years ago
|
||
Taking bug. This patch fixes the three bugs in the dep list as well.
Boris: Could you please run the regression test in htmlparser/tests. Please take a look at the README - http://lxr.mozilla.org/mozilla/source/htmlparser/tests/html/README. Let me know if you're having problems and I can run it for you.
Assignee | ||
Updated•22 years ago
|
Whiteboard: DUPEME
Comment on attachment 105709 [details] [diff] [review] proposed patch Regression test PASSED. r=harishd
Attachment #105709 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Attachment #105709 -
Flags: superreview?(heikki)
Updated•22 years ago
|
Attachment #105709 -
Flags: superreview?(heikki) → superreview+
Assignee | ||
Comment 8•22 years ago
|
||
Fix checked in. Thanks for the bug report, Philippe!
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 9•22 years ago
|
||
*** Bug 173500 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 10•22 years ago
|
||
*** Bug 187514 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•