Last Comment Bug 57634 - <dl> not indenting <dl> child (quirk mode)
: <dl> not indenting <dl> child (quirk mode)
Status: VERIFIED FIXED
INVALID/WONTFIX/evang?
: compat
Product: Core
Classification: Components
Component: HTML: Parser (show other bugs)
: Trunk
: x86 Windows NT
: P3 normal (vote)
: ---
Assigned To: rickg
: Loco
: Andrew Overholt [:overholt]
Mentors:
: 50099 57478 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-23 01:21 PDT by Koike Kazuhiko
Modified: 2001-01-19 06:31 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (450 bytes, text/html)
2000-10-23 01:22 PDT, Koike Kazuhiko
no flags Details
Self explanatory testcase. (393 bytes, text/html)
2000-10-24 16:33 PDT, Hixie (not reading bugmail)
no flags Details
Patch to fix this bug. (673 bytes, patch)
2000-10-25 15:40 PDT, rickg
no flags Details | Diff | Splinter Review

Description Koike Kazuhiko 2000-10-23 01:21:42 PDT
Nested <DL> isn't indented in HTML 4.01/Strict.
Comment 1 Koike Kazuhiko 2000-10-23 01:22:15 PDT
Created attachment 17763 [details]
Testcase
Comment 2 Erich 'Ricky' Iseli 2000-10-23 03:38:21 PDT
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.

Comment 3 Hixie (not reading bugmail) 2000-10-24 10:19:58 PDT
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>
Comment 4 Koike Kazuhiko 2000-10-24 15:08:40 PDT
DL within DD isn't indented too.
Comment 5 Hixie (not reading bugmail) 2000-10-24 16:32:33 PDT
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.
Comment 6 Hixie (not reading bugmail) 2000-10-24 16:33:51 PDT
Created attachment 17932 [details]
Self explanatory testcase.
Comment 7 please use i a n @ h i x i e . c h instead 2000-10-24 21:13:35 PDT
*** Bug 50099 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Franke (gone) 2000-10-24 21:16:11 PDT
The current behaviour is not present in M17, but was introduced before 9/22.
Comment 9 Andreas Franke (gone) 2000-10-24 22:00:10 PDT
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
Comment 10 Andreas Franke (gone) 2000-10-24 22:28:12 PDT
Harish, is it true that your content model dump in bug 47827 already shows this
problem?
Comment 11 Ben Bucksch (:BenB) 2000-10-24 23:52:33 PDT
Erich, nearly nothing is a must in HTML4. Severity back to normal.
Comment 12 Hixie (not reading bugmail) 2000-10-25 13:44:43 PDT
(Increasing severity to major; parsing the document per the DTD _is_ a "must".)
Comment 13 rickg 2000-10-25 15:18:16 PDT
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.
Comment 14 rickg 2000-10-25 15:40:03 PDT
Created attachment 17993 [details] [diff] [review]
Patch to fix this bug.
Comment 15 rickg 2000-10-25 15:40:43 PDT
I've attached the patch. I'll go get reviewers now. 
I don't expect PDT to approve this one either.
Comment 16 rickg 2000-10-25 17:23:08 PDT
*** Bug 57478 has been marked as a duplicate of this bug. ***
Comment 17 selmer (gone) 2000-10-25 17:46:15 PDT
rtm-, but let's get this on the trunk.
Comment 18 rickg 2000-10-25 19:01:50 PDT
high profile backwards compatability; 
Comment 19 Ben Bucksch (:BenB) 2000-10-25 19:09:37 PDT
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+].
Comment 20 Hixie (not reading bugmail) 2000-10-27 04:01:36 PDT
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!
Comment 21 Ben Bucksch (:BenB) 2000-10-27 04:23:46 PDT
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.
Comment 22 Ben Bucksch (:BenB) 2000-10-27 04:27:20 PDT
> 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 harishd 2000-10-27 10:15:34 PDT
Ben, as Ian stated, fixing this bug is not a "Zaaro Reesk". It's not worthit to
risk rtm for this bug!!!
Comment 24 selmer (gone) 2000-10-29 08:27:46 PST
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.
Comment 25 Fabian Guisset 2000-12-26 03:03:18 PST
Why don't we fix this now? If we don't do it, we'll probably never do it. Or is
it already fixed?
Comment 26 rickg 2001-01-07 21:07:49 PST
This (much maligned) issue is now resolved. The DL containment rule has been 
corrected.
Comment 27 Koike Kazuhiko 2001-01-11 07:05:34 PST
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.
Comment 28 Loco 2001-01-19 05:04:03 PST
I can confirm this funky behavior as well, on Win 98 Build 01-18-21.
Comment 29 Hixie (not reading bugmail) 2001-01-19 05:54:44 PST
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.)
Comment 30 Koike Kazuhiko 2001-01-19 06:18:47 PST
OK, my testcase was invalid. Indentation works fine if I remove
extra <DD> in it.
Comment 31 Loco 2001-01-19 06:31:05 PST
Marking 

VERIFIED

Per reporter's comments (and my own, since the other case seemed to work OK).

Note You need to log in before you can comment on or make changes to this bug.