REGRESSION(r208082): 1% Speedometer regression on iOS
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 04:32:49 +0000 (04:32 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 04:32:49 +0000 (04:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164852

Reviewed by Chris Dumez.

Source/WebCore:

Temporarily disable CEReactions entirely to recover the regression in Speedometer since
reverting r208082 wouldn't remove CEReactions from other DOM APIs and if r208082 was a regression,
then they're likely causing a regression on Speedometer as well.

* dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionStack::ElementQueue::add): Removed the release assert added in r208785
since reactions can be inserted into the backup queue while the queue is running.
(WebCore::CustomElementReactionStack::ElementQueue::invokeAll): Ditto.
* dom/CustomElementReactionQueue.h:
(WebCore::CustomElementReactionStack::CustomElementReactionStack): Removed all the code so that this
constructor would be optimized away by clang.
(WebCore::CustomElementReactionStack::~CustomElementReactionStack): Ditto.

LayoutTests:

Add failing test expectations for various custom elements now that CEReactions is not working.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208837 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/dom/CustomElementReactionQueue.cpp
Source/WebCore/dom/CustomElementReactionQueue.h

index 18ebabe..d3fd62a 100644 (file)
@@ -1,3 +1,14 @@
+2016-11-16  Ryosuke Niwa  <rniwa@webkit.org>
+
+        REGRESSION(r208082): 1% Speedometer regression on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=164852
+
+        Reviewed by Chris Dumez.
+
+        Add failing test expectations for various custom elements now that CEReactions is not working.
+
+        * TestExpectations:
+
 2016-11-16  Alexey Proskuryakov  <ap@apple.com>
 
         REGRESSION (r208455): LayoutTests swipe/pushState-cached-back-swipe.html and swipe/main-frame-pinning-requirement.html are failing
index fc9a4c4..795d0ce 100644 (file)
@@ -970,6 +970,46 @@ webkit.org/b/163706 imported/w3c/csswg-test/css-shapes-1/shape-outside/shape-ima
 imported/blink/http/tests/security/shape-image-cors-disallow-origin.html [ ImageOnlyFailure ]
 imported/blink/http/tests/security/shape-image-cors-port.html [ ImageOnlyFailure ]
 
+# Many custom Elements tests are temporarily skipped per https://webkit.org/b/164852
+fast/custom-elements/defined-pseudo-class.html [ Failure ]
+fast/custom-elements/reactions-for-indieui.html [ Failure ]
+fast/custom-elements/reactions-for-webkit-extensions.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/CustomElementRegistry.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/adopted-callback.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/attribute-changed-callback.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/connected-callbacks.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/custom-element-reaction-queue.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/disconnected-callbacks.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reaction-timing.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/Attr.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/ChildNode.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/DOMTokenList.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/Document.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/Element.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAnchorElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionsCollection.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOutputElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSelectElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableRowElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableSectionElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTitleElement.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/Node.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/ParentNode.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/Range.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/reactions/ShadowRoot.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/upgrading.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html [ Failure ]
+imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html [ Failure ]
+
 webkit.org/b/163636 media/modern-media-controls/media-controller/media-controller-resize.html [ Pass Failure Timeout ]
 
 webkit.org/b/163887 svg/as-image/svg-image-with-data-uri-use-data-uri.svg [ Pass Crash ]
index dc5911e..e084541 100644 (file)
@@ -1,5 +1,25 @@
 2016-11-16  Ryosuke Niwa  <rniwa@webkit.org>
 
+        REGRESSION(r208082): 1% Speedometer regression on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=164852
+
+        Reviewed by Chris Dumez.
+
+        Temporarily disable CEReactions entirely to recover the regression in Speedometer since
+        reverting r208082 wouldn't remove CEReactions from other DOM APIs and if r208082 was a regression,
+        then they're likely causing a regression on Speedometer as well.
+
+        * dom/CustomElementReactionQueue.cpp:
+        (WebCore::CustomElementReactionStack::ElementQueue::add): Removed the release assert added in r208785
+        since reactions can be inserted into the backup queue while the queue is running.
+        (WebCore::CustomElementReactionStack::ElementQueue::invokeAll): Ditto.
+        * dom/CustomElementReactionQueue.h:
+        (WebCore::CustomElementReactionStack::CustomElementReactionStack): Removed all the code so that this
+        constructor would be optimized away by clang.
+        (WebCore::CustomElementReactionStack::~CustomElementReactionStack): Ditto.
+
+2016-11-16  Ryosuke Niwa  <rniwa@webkit.org>
+
         Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
         https://bugs.webkit.org/show_bug.cgi?id=164845
 
index 07c5abe..a549ce6 100644 (file)
@@ -205,26 +205,19 @@ void CustomElementReactionQueue::invokeAll(Element& element)
 
 inline void CustomElementReactionStack::ElementQueue::add(Element& element)
 {
-    RELEASE_ASSERT(!m_invoking);
     // FIXME: Avoid inserting the same element multiple times.
     m_elements.append(element);
 }
 
 inline void CustomElementReactionStack::ElementQueue::invokeAll()
 {
-#if !ASSERT_DISABLED
-    RELEASE_ASSERT(!m_invoking);
-    TemporaryChange<bool> invoking(m_invoking, true);
-#endif
     Vector<Ref<Element>> elements;
     elements.swap(m_elements);
-    RELEASE_ASSERT(m_elements.isEmpty());
     for (auto& element : elements) {
         auto* queue = element->reactionQueue();
         ASSERT(queue);
         queue->invokeAll(element.get());
     }
-    RELEASE_ASSERT(m_elements.isEmpty());
 }
 
 CustomElementReactionQueue& CustomElementReactionStack::ensureCurrentQueue(Element& element)
index 0c9123d..906662c 100644 (file)
@@ -63,16 +63,11 @@ private:
 class CustomElementReactionStack {
 public:
     CustomElementReactionStack()
-        : m_previousProcessingStack(s_currentProcessingStack)
     {
-        s_currentProcessingStack = this;
     }
 
     ~CustomElementReactionStack()
     {
-        if (UNLIKELY(m_queue))
-            processQueue();
-        s_currentProcessingStack = m_previousProcessingStack;
     }
 
     static CustomElementReactionQueue& ensureCurrentQueue(Element&);
@@ -89,7 +84,6 @@ private:
 
     private:
         Vector<Ref<Element>> m_elements;
-        bool m_invoking { false };
     };
 
     WEBCORE_EXPORT void processQueue();
@@ -98,7 +92,6 @@ private:
     static ElementQueue& backupElementQueue();
 
     ElementQueue* m_queue { nullptr };
-    CustomElementReactionStack* m_previousProcessingStack;
 
     WEBCORE_EXPORT static CustomElementReactionStack* s_currentProcessingStack;
 };