The DOM spec now has a bunch of sanity checks after constructing an element synchronously: https://dom.spec.whatwg.org/#concept-create-element
Created attachment 287731 [details] Patch
Created attachment 287732 [details] Patch
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
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
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
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
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
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
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
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
Created attachment 287747 [details] Updated for ToT
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?
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.
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.
<rdar://problem/28145713>
Committed r205386: <http://trac.webkit.org/changeset/205386>