<?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>119478</bug_id>
          
          <creation_ts>2013-08-04 09:17:07 -0700</creation_ts>
          <short_desc>Implement HTML spec change to Adoption Agency Algorithm to not reverse the order of nodes in the document, by removing nodes that we&apos;re not recreating from the stack of open elements</short_desc>
          <delta_ts>2022-08-16 21:55:03 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="sideshowbarker">mike</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>aestes</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>eoconnor</cc>
    
    <cc>hyatt</cc>
    
    <cc>ian</cc>
    
    <cc>mjs</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zcorpan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>914461</commentid>
    <comment_count>0</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2013-08-04 09:17:07 -0700</bug_when>
    <thetext>http://html5.org/r/8108
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20319#c3

related Blink and Gecko bugs:
https://code.google.com/p/chromium/issues/detail?id=268121
https://bugzilla.mozilla.org/show_bug.cgi?id=901319</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914495</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-08-04 18:53:36 -0700</bug_when>
    <thetext>I don&apos;t understand why this specification change was made when all browsers behave according to the old specification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914501</commentid>
    <comment_count>2</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2013-08-04 21:51:16 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; I don&apos;t understand why this specification change was made when all browsers behave according to the old specification.

Because the existing behavior is buggy in that it causes nodes to end up in the DOM in (from users perspective) an unexpected order; e.g., the text content of the following div ending up as &quot;456123&quot; instead of &quot;123456&quot;.

  &lt;div id=mike&gt;&lt;b&gt;&lt;i&gt;&lt;s&gt;&lt;u&gt;&lt;tt&gt;&lt;p&gt;&lt;/b&gt;123&lt;/p&gt;&lt;/tt&gt;&lt;/u&gt;&lt;/s&gt;456

Yeah, it&apos;s very invalid markup but dealing gracefully with invalid markup is entirely what this whole part of the parsing algorithm is all about. So this is a bug in the behavior of what the AAA is intended for, and if it&apos;s possible to have the spec get rid of the existing bug in the algorithm and handle that case more intuitively, then I think the right thing for Hixie or any other editor to do is to fix it in the spec if he can and then to try to see if browsers are willing to implement the revised algorithm or not.

Of course it&apos;s collectively up to browser implementors to decide if they want to make the change. But for a case like this, having concrete spec text to review in context seems to me a least to be a lot better than just having an isolated proposal written in an e-mail message or whatever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>917263</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-08-14 13:31:31 -0700</bug_when>
    <thetext>While you&apos;re at it, this change to the AAA was also made recently:
   http://html5.org/tools/web-apps-tracker?from=8138&amp;to=8139
   https://www.w3.org/Bugs/Public/show_bug.cgi?id=22926

It makes conforming pages parse correctly (before, if you nested multiple identical formatting elements more than 3 deep, you&apos;d end up corrupting your tree; that was only supposed to happen when the document was non-conforming).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1194175</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2016-05-17 23:41:46 -0700</bug_when>
    <thetext>Ping (see https://github.com/html5lib/html5lib-tests/issues/78 )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1227773</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-09-08 13:59:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/28213632&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1891112</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-13 06:54:51 -0700</bug_when>
    <thetext>rniwa@webkit.org - is this something fixed with this?

https://github.com/WebKit/WebKit/commit/67d7bd2e0aa2ed0355e51c406ff56021e603590f

I know you recently did some fixes in Adoption Agency Algorithm.

For other bit, only Firefox bug is marked as &quot;RESOLVED FIXED&quot; while Chrome bug is still Open from Comment 0. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1891245</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-08-14 12:27:03 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/3297</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1891861</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-08-16 21:55:01 -0700</bug_when>
    <thetext>Committed 253505@main (6f377390c19b): &lt;https://commits.webkit.org/253505@main&gt;

Reviewed commits have been landed. Closing PR #3297 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>