Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r234957 - Custom element constructor doesn't use HTMLElement in…
… new.target's realm https://bugs.webkit.org/show_bug.cgi?id=188634 Reviewed by Keith Miller. LayoutTests/imported/w3c: Rebaselined the test now that all relevant test cases pass. All remaining test failures are for customized builtin, which we do not and shall not implement. * web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt: Source/WebCore: Fixed the bug that HTMLElement's constructor was constructing an element of its own realm instead of the realm of new.target. This results in the JS wrapper created for the element belonging to the global object of the HTMLElement constructor which was invoked instead of the global object of new.target as specified in: https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors In particular, step 9.2. specifies that we "perform element.[[SetPrototypeOf]](prototype)." where prototype is the result of Get(NewTarget, "prototype") in step 7. WebKit's new behavior matches that of Chrome and Firefox. Test: imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html * bindings/js/JSHTMLElementCustom.cpp: (WebCore::constructJSHTMLElement):
- Loading branch information
1 parent
a690ba7
commit 93173f0
Showing
4 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ts/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters