[Webkit-unassigned] [Bug 137501] New: HTML foster-parenting algorithm no longer requires foster parents to be elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 7 15:20:04 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137501

           Summary: HTML foster-parenting algorithm no longer requires
                    foster parents to be elements
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: adamk at chromium.org
                CC: rniwa at webkit.org


Consider the following HTML page:

<body>
  <table>
    <script>
      var fragment = document.createDocumentFragment();
      fragment.appendChild(document.querySelector('table'));
    </script>
    <div></div>
  </table>
</body>

According to the current HTML spec, this should end up foster-parenting the <div> into the document fragment (since it's the <table>'s parent when the foster-parenting algorithm runs). But the spec used to require foster parents to be elements, and so WebKit and Blink put the div, instead, as a child of <body>.

In Blink, I'm about to land https://codereview.chromium.org/640433002, which changes that behavior to match the spec (it was changed to support the <template> element, according to Hixie on #whatwg). It'd be nice to keep us compatible, so if you think this is the wrong way to go, please let me know. Alternatively, it should be easy to update your parser to match the spec (see step 2 of https://html.spec.whatwg.org/#appropriate-place-for-inserting-a-node).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list