<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>24338</bug_id>
          
          <creation_ts>2009-03-03 16:56:50 -0800</creation_ts>
          <short_desc>Close tags for li, dd, dt do not close previous unclosed tags</short_desc>
          <delta_ts>2010-09-21 04:02:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="James Robinson">jamesr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112102</commentid>
    <comment_count>0</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2009-03-03 16:56:50 -0800</bug_when>
    <thetext>According to the rules for an end tag of &quot;dd&quot;, &quot;dt&quot; or &quot;li&quot; at:
http://dev.w3.org/html5/spec/Overview.html#parsing-main-inbody
implicit end tags should be generated for previously unclosed tags until the matching &quot;dd&quot;/&quot;dt&quot;/&quot;li&quot; is found.  In the case where there&apos;s a structure like:

&lt;XX&gt;
 &lt;div&gt;
&lt;/XX&gt;
&lt;XX&gt;
 &lt;div&gt;
&lt;/XX&gt;

where XX is one of these tags WebKit nests the second XX and its children inside the first &lt;div&gt;.  It should close out the first &lt;div&gt; at the first &lt;/XX&gt; tag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112104</commentid>
    <comment_count>1</comment_count>
      <attachid>28246</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2009-03-03 16:58:54 -0800</bug_when>
    <thetext>Created attachment 28246
Testcase for &lt;dd&gt; &lt;dt&gt; and &lt;li&gt;

The DOM structure is wrong for all three pairs of tags.  The rendering for &lt;dt&gt; looks valid, but the rendering for &lt;dd&gt; has incorrect indentation and the rendering for &lt;li&gt;s has overlapping numbers.

FF3 has the correct DOM structure in all three cases and renders the &lt;dd&gt;s correctly but makes the same rendering mistake on &lt;li&gt;s.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112794</commentid>
    <comment_count>2</comment_count>
    <who name="Emilio López">buhitoescolar</who>
    <bug_when>2009-03-08 16:36:40 -0700</bug_when>
    <thetext>Here is a real-life example of this bug.

http://lineupblog.com/webkitbug.html

Firefox closes the div correctly and doesn&apos;t trigger the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>282200</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-21 04:02:10 -0700</bug_when>
    <thetext>This bug is fixed by the HTML5 parser.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>28246</attachid>
            <date>2009-03-03 16:58:54 -0800</date>
            <delta_ts>2009-03-03 16:58:54 -0800</delta_ts>
            <desc>Testcase for &lt;dd&gt; &lt;dt&gt; and &lt;li&gt;</desc>
            <filename>unclosed_div.html</filename>
            <type>text/html</type>
            <size>285</size>
            <attacher name="James Robinson">jamesr</attacher>
            
              <data encoding="base64">PGh0bWw+DQogPGJvZHk+DQogIDxkbD4NCiAgIDxkdD4NCiAgICA8ZGl2PmR0IGENCiAgIDwvZHQ+
DQogICA8ZHQ+DQogICAgPGRpdj5kdCBiDQogICA8L2R0Pg0KICA8L2RsPg0KICA8ZGw+DQogICA8
ZGQ+DQogICAgPGRpdj5kZCBhDQogICA8L2RkPg0KICAgPGRkPg0KICAgIDxkaXY+ZGQgYg0KICAg
PC9kZD4NCiAgPC9kbD4NCiAgPG9sPg0KICAgPGxpPg0KICAgIDxkaXY+DQogICA8L2xpPg0KICAg
PGxpPg0KICAgIDxkaXY+DQogICA8L2xpPg0KICA8L29sPg0KIDwvYm9keT4NCjwvaHRtbD4NCg0K
</data>

          </attachment>
      

    </bug>

</bugzilla>