RESOLVED FIXED 154936
HTML parser an element inside a template element in a browsing-context-less document with a wrong owner document
https://bugs.webkit.org/show_bug.cgi?id=154936
Summary HTML parser an element inside a template element in a browsing-context-less d...
Ryosuke Niwa
Reported 2016-03-02 16:11:46 PST
HTML parser should not be instantiating the custom elements inside a template element using the containing document's registry. Instead, it should be using the registry of the inert template document: https://html.spec.whatwg.org/#associated-inert-template-document
Attachments
Fixes the bug (237.16 KB, patch)
2016-03-02 16:43 PST, Ryosuke Niwa
cdumez: review+
cdumez: commit-queue-
Radar WebKit Bug Importer
Comment 1 2016-03-02 16:12:34 PST
Ryosuke Niwa
Comment 2 2016-03-02 16:43:38 PST
Created attachment 272703 [details] Fixes the bug
Chris Dumez
Comment 3 2016-03-02 16:49:22 PST
Comment on attachment 272703 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=272703&action=review > LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document.html:35 > + assert_not_equals(template.content.ownerDocument, doc, I don't think we should diverge from upstream. If the test is wrong, we need to do a pull-request and re-sync the tests. I would land any change here that has not landed yet upstream.
Chris Dumez
Comment 4 2016-03-02 16:59:16 PST
Comment on attachment 272703 [details] Fixes the bug r=me with comment
Ryosuke Niwa
Comment 5 2016-03-02 17:20:46 PST
Ryosuke Niwa
Comment 6 2016-03-02 17:29:09 PST
*** Bug 148850 has been marked as a duplicate of this bug. ***
Ryosuke Niwa
Comment 7 2016-03-02 17:30:50 PST
Sorry, this patch was meant for the bug 148850 :( The patch didn't fix custom elements at all. Will file a new bug to track that.
Note You need to log in before you can comment on or make changes to this bug.