Bug 161528

Summary: Add validations for a synchronously constructed custom element
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, kling, koivisto, mkwst, rniwa, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 154907, 187757    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews100 for mac-yosemite
none
Archive of layout-test-results from ews104 for mac-yosemite-wk2
none
Archive of layout-test-results from ews112 for mac-yosemite
none
Archive of layout-test-results from ews124 for ios-simulator-elcapitan-wk2
none
Updated for ToT ysuzuki: review+

Ryosuke Niwa
Reported 2016-09-01 22:05:12 PDT
The DOM spec now has a bunch of sanity checks after constructing an element synchronously: https://dom.spec.whatwg.org/#concept-create-element
Attachments
Patch (26.17 KB, patch)
2016-09-01 22:17 PDT, Ryosuke Niwa
no flags
Patch (26.15 KB, patch)
2016-09-01 22:18 PDT, Ryosuke Niwa
no flags
Archive of layout-test-results from ews100 for mac-yosemite (853.98 KB, application/zip)
2016-09-01 22:50 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (831.11 KB, application/zip)
2016-09-01 22:53 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-yosemite (1.52 MB, application/zip)
2016-09-01 23:17 PDT, Build Bot
no flags
Archive of layout-test-results from ews124 for ios-simulator-elcapitan-wk2 (6.23 MB, application/zip)
2016-09-01 23:24 PDT, Build Bot
no flags
Updated for ToT (26.15 KB, patch)
2016-09-02 00:05 PDT, Ryosuke Niwa
ysuzuki: review+
Ryosuke Niwa
Comment 1 2016-09-01 22:17:09 PDT
Ryosuke Niwa
Comment 2 2016-09-01 22:18:24 PDT
Build Bot
Comment 3 2016-09-01 22:50:02 PDT
Comment on attachment 287732 [details] Patch Attachment 287732 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1991887 New failing tests: fast/custom-elements/defined-pseudo-class.html
Build Bot
Comment 4 2016-09-01 22:50:06 PDT
Created attachment 287735 [details] Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 5 2016-09-01 22:53:00 PDT
Comment on attachment 287732 [details] Patch Attachment 287732 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1991904 New failing tests: fast/custom-elements/defined-pseudo-class.html
Build Bot
Comment 6 2016-09-01 22:53:03 PDT
Created attachment 287736 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 7 2016-09-01 23:16:57 PDT
Comment on attachment 287732 [details] Patch Attachment 287732 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1991963 New failing tests: fast/custom-elements/defined-pseudo-class.html
Build Bot
Comment 8 2016-09-01 23:17:08 PDT
Created attachment 287738 [details] Archive of layout-test-results from ews112 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 9 2016-09-01 23:24:38 PDT
Comment on attachment 287732 [details] Patch Attachment 287732 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1991972 New failing tests: fast/custom-elements/defined-pseudo-class.html
Build Bot
Comment 10 2016-09-01 23:24:45 PDT
Created attachment 287741 [details] Archive of layout-test-results from ews124 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.5
Ryosuke Niwa
Comment 11 2016-09-02 00:05:11 PDT
Created attachment 287747 [details] Updated for ToT
Yusuke Suzuki
Comment 12 2016-09-02 15:09:50 PDT
Comment on attachment 287747 [details] Updated for ToT View in context: https://bugs.webkit.org/attachment.cgi?id=287747&action=review r=me > Source/WebCore/ChangeLog:11 > + 4. If resultâs attribute list is not empty, then throw a NotSupportedError. Let's use the ASCII `'`. > Source/WebCore/ChangeLog:16 > + 6. If resultâs parent is not null, then throw a NotSupportedError. > + 7. If resultâs node document is not document, then throw a NotSupportedError. > + 8. If resultâs namespace is not the HTML namespace, then throw a NotSupportedError. > + 9. If resultâs local name is not equal to localName, then throw a NotSupportedError. Ditto. > Source/WebCore/bindings/js/JSCustomElementInterface.cpp:80 > + auto* state = context->execState(); Can we take this by `auto&`. > Source/WebCore/bindings/js/JSCustomElementInterface.cpp:140 > + ASSERT(wrappedElement->namespaceURI() == HTMLNames::xhtmlNamespaceURI); Is this always held?
Ryosuke Niwa
Comment 13 2016-09-02 17:05:28 PDT
Comment on attachment 287747 [details] Updated for ToT View in context: https://bugs.webkit.org/attachment.cgi?id=287747&action=review >> Source/WebCore/bindings/js/JSCustomElementInterface.cpp:140 >> + ASSERT(wrappedElement->namespaceURI() == HTMLNames::xhtmlNamespaceURI); > > Is this always held? Yes. HTMLElement always uses xhtmlNamespaceURI. This is a pretty important invariant in WebCore.
Ryosuke Niwa
Comment 14 2016-09-02 17:05:54 PDT
Comment on attachment 287747 [details] Updated for ToT View in context: https://bugs.webkit.org/attachment.cgi?id=287747&action=review Thanks for the review! >> Source/WebCore/ChangeLog:11 >> + 4. If resultâs attribute list is not empty, then throw a NotSupportedError. > > Let's use the ASCII `'`. Fixed >> Source/WebCore/ChangeLog:16 >> + 9. If resultâs local name is not equal to localName, then throw a NotSupportedError. > > Ditto. Fixed >> Source/WebCore/bindings/js/JSCustomElementInterface.cpp:80 >> + auto* state = context->execState(); > > Can we take this by `auto&`. Fixed.
Radar WebKit Bug Importer
Comment 15 2016-09-02 17:06:16 PDT
Ryosuke Niwa
Comment 16 2016-09-02 17:10:55 PDT
Note You need to log in before you can comment on or make changes to this bug.