Add the "element definition is running" flag to CustomElementRegistry: https://html.spec.whatwg.org/multipage/scripting.html#element-definition-is-running and use it in customElements.define.
Created attachment 287482 [details] Adds the check
Created attachment 287486 [details] Updated for ToT
Created attachment 287490 [details] Updated for ToT
Comment on attachment 287490 [details] Updated for ToT View in context: https://bugs.webkit.org/attachment.cgi?id=287490&action=review > LayoutTests/fast/custom-elements/CustomElementRegistry.html:21 > test(function () { > + assert_throws({'name': 'TypeError'}, function () { customElements.define('badname', 1); }, I changed the order of tests to match the order of steps in https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementregistry-define
Comment on attachment 287490 [details] Updated for ToT Attachment 287490 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1978874 New failing tests: fast/scrolling/ios/scroll-events-back-forward.html
Created attachment 287502 [details] Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.5
Comment on attachment 287490 [details] Updated for ToT View in context: https://bugs.webkit.org/attachment.cgi?id=287490&action=review > Source/WebCore/dom/CustomElementRegistry.h:53 > +class ElementDefinitionIsRunningTemporaryChange : public TemporaryChange<bool> { > +public: > + ElementDefinitionIsRunningTemporaryChange(CustomElementRegistry&); > +}; I'm not a big fan of inheriting from basic types. Does this really look better than using TemporaryChange<bool> directly?
(In reply to comment #7) > Comment on attachment 287490 [details] > Updated for ToT > > View in context: > https://bugs.webkit.org/attachment.cgi?id=287490&action=review > > > Source/WebCore/dom/CustomElementRegistry.h:53 > > +class ElementDefinitionIsRunningTemporaryChange : public TemporaryChange<bool> { > > +public: > > + ElementDefinitionIsRunningTemporaryChange(CustomElementRegistry&); > > +}; > > I'm not a big fan of inheriting from basic types. Does this really look > better than using TemporaryChange<bool> directly? Will add bool& member function instead per discussion on IRC.
Committed r205261: <http://trac.webkit.org/changeset/205261>