<dl> not indenting <dl> child (quirk mode)

VERIFIED FIXED

Status

()

Core
HTML: Parser
P3
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Koike Kazuhiko, Assigned: rickg)

Tracking

({compat})

Trunk
x86
Windows NT
compat
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: INVALID/WONTFIX/evang?)

Attachments

(3 attachments)

(Reporter)

Description

17 years ago
Nested <DL> isn't indented in HTML 4.01/Strict.
(Reporter)

Comment 1

17 years ago
Created attachment 17763 [details]
Testcase

Comment 2

17 years ago
According to http://www.w3.org/TR/html4/struct/lists.html#h-10.3.1:
"Visual user agents generally indent nested lists with respect to the current
level of nesting." I guess this means that it is not a must. Therefore
confirming this bug but setting severity to minor.

Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
According to http://www.w3.org/TR/html4/struct/lists.html#h-10.3:
# <!ELEMENT DL - - (DT|DD)+              -- definition list -->
# <!ATTLIST DL
#   %attrs;                              -- %coreattrs, %i18n, %events --
#   >

Thus, nesting a DL *directly* within a DL is INVALID. What you should do is:

   <dl>
     <dt> term you want to define </dt>
     <dd>
       <dl>
          <dt> sub term </dt>
          <dd> sub definition </dd>
       </dl>
     </dd>
   </dl>
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Keywords: compat
Resolution: --- → INVALID
(Reporter)

Comment 4

17 years ago
DL within DD isn't indented too.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
RICK!!!! <dd> is no longer accepting <dl> children!!!

This is a *serious* backwards compatability issue that regressed VERY VERY
recently. Nested <dl> within <dd>s are VERY common on the web.

KOIKE: good catch. Thank you.
Assignee: clayton → rickg
Status: REOPENED → NEW
Component: HTML Element → Parser
Keywords: compat → 4xp, correctness, regression, rtm
Priority: P3 → P1
Summary: Nested <DL> isn't indented → <dd> not accepting <dl> child
Whiteboard: high profile backwards compatability; recent regression
Created attachment 17932 [details]
Self explanatory testcase.
*** Bug 50099 has been marked as a duplicate of this bug. ***

Comment 8

17 years ago
The current behaviour is not present in M17, but was introduced before 9/22.

Comment 9

17 years ago
Maybe bug 47827: "Stair-stepped" display of stories on page from Left to right.
is relevant, see Harish's checkin on Sep 1 11:17 to nsElementTable.cpp (3.101)
("Make sure to check DD's hierarchy"):
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/htmlparser/src/nsElementTable.cpp
Harish, is it true that your content model dump in bug 47827 already shows this
problem?

Comment 11

17 years ago
Erich, nearly nothing is a must in HTML4. Severity back to normal.
Severity: minor → normal
(Increasing severity to major; parsing the document per the DTD _is_ a "must".)
Severity: normal → major
(Assignee)

Comment 13

17 years ago
From the code, this doesn't appear to be a recent regression. Nonetheless, the 
fix is in hand. I'm testing the top 100 now, and I'll attach a 1 line patch to 
the elementtable shortly.
Status: NEW → ASSIGNED
Whiteboard: high profile backwards compatability; recent regression → [rtm+] high profile backwards compatability; fix in hand
(Assignee)

Comment 14

17 years ago
Created attachment 17993 [details] [diff] [review]
Patch to fix this bug.
(Assignee)

Comment 15

17 years ago
I've attached the patch. I'll go get reviewers now. 
I don't expect PDT to approve this one either.
(Assignee)

Comment 16

17 years ago
*** Bug 57478 has been marked as a duplicate of this bug. ***

Comment 17

17 years ago
rtm-, but let's get this on the trunk.
Whiteboard: [rtm+] high profile backwards compatability; fix in hand → [rtm-] high profile backwards compatability; fix in hand
(Assignee)

Comment 18

17 years ago
high profile backwards compatability; 
Whiteboard: [rtm-] high profile backwards compatability; fix in hand → [rtm-] fix in hand

Comment 19

17 years ago
selmer, I also disagree.  Nesting is significant and often required for
understanding. Not nesting dls is data loss. It is also a severe, highly visible
standards compliance problem. 1-line fix. Please give [rtm+].
Keywords: html4
Whiteboard: [rtm-] fix in hand → fix in hand
Turns out this has been regressed for a while now, so it clearly is not as
obvious as I originally believed. As such, removing my rtm nomination. This
is clearly not "zarro reesk"; there is so much broken code out there that 
changes to the element table sometimes (*sometimes*, maybe not this time, but
how can we tell) cause some strange regressions elsewhere.

RELEASE NOTE ITEM:
   In this release Mozilla does not support nesting of <dl> elements inside
   <dd> elements. Workaround: nest the inner <dl> element inside a <div> 
   element, as in:
      <dl>
       <dt> term </dt>
       <dd>
        <div>
         <dl>
           <dt> nested term </dt>
           <dd>
           </dd>
         </dl>
        </div>
       </dd>
      </dl>

Rick, can we get r=, sr=, moa= and then check this in to the trunk? Thanks!
Severity: major → normal
Keywords: rtm → relnote
Priority: P1 → P3
Whiteboard: fix in hand → [fix in hand] relnote-devel

Comment 21

17 years ago
You might not think, this is important, but I use nested <dl> *a lot* (even in
email!). I keep my statement that this is a very visible standards-complicance bug.

The only reason we didn't see this yet is that nobody (no webpages) yet uses the
strict mode. The whole point of Gecko was the strict mode (standards
complicance), so expect the visibility to increase dramatically.

*I* will add rtm nomination then.
Keywords: rtm

Comment 22

17 years ago
> I use nested <dl> *a lot* (even in email!)

ops, sorry, I confused this with <ul>. Nevertheless, it is *still* a highly
visible compliance bug (<dl>s are sometimes used for indention, and nested
indentions are both common and significant).

Comment 23

17 years ago
Ben, as Ian stated, fixing this bug is not a "Zaaro Reesk". It's not worthit to
risk rtm for this bug!!!

Comment 24

17 years ago
putting rtm- back in whiteboard.  Doesn't seem like status of this bug has
changed since the original minus.  Leaving the whiteboard blank is incorrect for
this bug.  The only valid state from here is to leave it as [rtm-] or to move it
to [rtm+] with some compelling argument why this should be accepted.  A
compelling argument might look something like "80% of the top100 use this
construct" - if it could be substantiated.
Whiteboard: [fix in hand] relnote-devel → [rtm-][fix in hand] relnote-devel

Updated

17 years ago
Keywords: mozilla0.9
Keywords: nsbeta1

Comment 25

17 years ago
Why don't we fix this now? If we don't do it, we'll probably never do it. Or is
it already fixed?

Updated

17 years ago
Keywords: mozilla0.8
(Assignee)

Comment 26

17 years ago
This (much maligned) issue is now resolved. The DL containment rule has been 
corrected.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 27

17 years ago
The problem I reported isn't fixed. See my testcase(2000-10-23).

I know HTML specification doesn't require indentation, but the
current rendering is not natural.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 28

17 years ago
I can confirm this funky behavior as well, on Win 98 Build 01-18-21.
The original bug as seen in 
   http://bugzilla.mozilla.org/showattachment.cgi?attach_id=17763
...is invalid -- that is a <dl> inside a <dl>, which is invalid markup.

You should wrap the inner <dl> in a <dd>, as per the spec.

This is either INVALID (the original issue of directly nested DLs) or FIXED
(the valid issue of DL in a DT). Or instead of INVALID it could go to evang...
(Trimming keywords to match the compat issue.)
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago17 years ago
Keywords: 4xp, correctness, html4, mozilla0.8, mozilla0.9, nsbeta1, regression, relnote, rtm → compat
Resolution: --- → FIXED
Summary: <dd> not accepting <dl> child → <dl> not indenting <dl> child (quirk mode)
Whiteboard: [rtm-][fix in hand] relnote-devel → INVALID/WONTFIX/evang?
(Reporter)

Comment 30

17 years ago
OK, my testcase was invalid. Indentation works fine if I remove
extra <DD> in it.

Comment 31

17 years ago
Marking 

VERIFIED

Per reporter's comments (and my own, since the other case seemed to work OK).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.