Unreviewed, rolling out r139790.
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2013 23:40:29 +0000 (23:40 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2013 23:40:29 +0000 (23:40 +0000)
http://trac.webkit.org/changeset/139790
https://bugs.webkit.org/show_bug.cgi?id=106948

The patch is failing its own test.

Source/JavaScriptCore:

* bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.

Source/WebCore:

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::parserAppendChild):
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executeParsingBlockingScript):
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::execute):
(WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
(WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
(WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
(WebCore::HTMLScriptRunner::runScript):

LayoutTests:

* fast/dom/MutationObserver/parser-mutations-expected.txt: Removed.
* fast/dom/MutationObserver/parser-mutations.html: Removed.

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/MutationObserver/parser-mutations-expected.txt [deleted file]
LayoutTests/fast/dom/MutationObserver/parser-mutations.html [deleted file]
Source/JavaScriptCore/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/html/parser/HTMLScriptRunner.cpp

index b28d330..6178e3b 100644 (file)
@@ -1,3 +1,14 @@
+2013-01-15  Levi Weintraub  <leviw@chromium.org>
+
+        Unreviewed, rolling out r139790.
+        http://trac.webkit.org/changeset/139790
+        https://bugs.webkit.org/show_bug.cgi?id=106948
+
+        The patch is failing its own test.
+
+        * fast/dom/MutationObserver/parser-mutations-expected.txt: Removed.
+        * fast/dom/MutationObserver/parser-mutations.html: Removed.
+
 2013-01-15  Emil A Eklund  <eae@chromium.org>
 
         REGRESSION (r121599): incorrect border scaling when zoomed
diff --git a/LayoutTests/fast/dom/MutationObserver/parser-mutations-expected.txt b/LayoutTests/fast/dom/MutationObserver/parser-mutations-expected.txt
deleted file mode 100644 (file)
index 6e5bd3e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-PASS mutations.length is 6
-PASS mutations[1].type is "childList"
-PASS mutations[1].target.tagName is "BODY"
-PASS mutations[1].addedNodes.length is 1
-PASS mutations[1].addedNodes[0].tagName is "P"
-Mutation records should be delivered for all parser mutations after the above script.
diff --git a/LayoutTests/fast/dom/MutationObserver/parser-mutations.html b/LayoutTests/fast/dom/MutationObserver/parser-mutations.html
deleted file mode 100644 (file)
index 63408aa..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-
-<body>
-<script src="../../js/resources/js-test-pre.js"></script>
-
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-
-    var observer = new WebKitMutationObserver(function(mutations, observer) {
-        window.mutations = mutations;
-    });
-    observer.observe(document.body, {childList: true, subtree:true});
-</script>
-
-<p>
-    Mutation records should be delivered for all parser mutations after the above script.
-</p>
-
-<script>
-    shouldBe('mutations.length', '6');
-    shouldBeEqualToString('mutations[1].type', 'childList');
-    shouldBeEqualToString('mutations[1].target.tagName', 'BODY');
-    shouldBe('mutations[1].addedNodes.length', '1');
-    shouldBeEqualToString('mutations[1].addedNodes[0].tagName', 'P');
-</script>
-</body>
\ No newline at end of file
index a906099..54ecb67 100644 (file)
@@ -1,3 +1,13 @@
+2013-01-15  Levi Weintraub  <leviw@chromium.org>
+
+        Unreviewed, rolling out r139790.
+        http://trac.webkit.org/changeset/139790
+        https://bugs.webkit.org/show_bug.cgi?id=106948
+
+        The patch is failing its own test.
+
+        * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
+
 2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
 
         [Autotools] Unify JavaScriptCore sources list, regardless of target OS
index bc770da..88f1ffb 100644 (file)
@@ -1,3 +1,24 @@
+2013-01-15  Levi Weintraub  <leviw@chromium.org>
+
+        Unreviewed, rolling out r139790.
+        http://trac.webkit.org/changeset/139790
+        https://bugs.webkit.org/show_bug.cgi?id=106948
+
+        The patch is failing its own test.
+
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::parserInsertBefore):
+        (WebCore::ContainerNode::parserRemoveChild):
+        (WebCore::ContainerNode::parserAppendChild):
+        * html/parser/HTMLScriptRunner.cpp:
+        (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
+        (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
+        (WebCore::HTMLScriptRunner::execute):
+        (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
+        (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
+        (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
+        (WebCore::HTMLScriptRunner::runScript):
+
 2013-01-15  Emil A Eklund  <eae@chromium.org>
 
         REGRESSION (r121599): incorrect border scaling when zoomed
index 43af746..9ac1480 100644 (file)
@@ -331,10 +331,6 @@ void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node* nextChil
 
     insertBeforeCommon(nextChild, newChild.get());
 
-#if ENABLE(MUTATION_OBSERVERS)
-    ChildListMutationScope(this).childAdded(newChild.get());
-#endif
-
     childrenChanged(true, newChild->previousSibling(), nextChild, 1);
     ChildNodeInsertionNotifier(this).notify(newChild.get());
 }
@@ -556,11 +552,6 @@ void ContainerNode::parserRemoveChild(Node* oldChild)
     Node* prev = oldChild->previousSibling();
     Node* next = oldChild->nextSibling();
 
-#if ENABLE(MUTATION_OBSERVERS)
-    ChildListMutationScope(this).willRemoveChild(oldChild);
-    oldChild->notifyMutationObserversNodeWillDetach();
-#endif
-
     removeBetween(prev, next, oldChild);
 
     childrenChanged(true, prev, next, -1);
@@ -706,10 +697,6 @@ void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild)
         treeScope()->adoptIfNeeded(newChild.get());
     }
 
-#if ENABLE(MUTATION_OBSERVERS)
-    ChildListMutationScope(this).childAdded(newChild.get());
-#endif
-
     childrenChanged(true, last, 0, 1);
     ChildNodeInsertionNotifier(this).notify(newChild.get());
 }
index d39aba6..04244a6 100644 (file)
@@ -36,7 +36,6 @@
 #include "HTMLNames.h"
 #include "HTMLScriptRunnerHost.h"
 #include "IgnoreDestructiveWriteCountIncrementer.h"
-#include "MutationObserver.h"
 #include "NestingLevelIncrementer.h"
 #include "NotImplemented.h"
 #include "ScriptElement.h"
@@ -111,7 +110,7 @@ bool HTMLScriptRunner::isPendingScriptReady(const PendingScript& script)
 void HTMLScriptRunner::executeParsingBlockingScript()
 {
     ASSERT(m_document);
-    ASSERT(!isExecutingScript());
+    ASSERT(!m_scriptNestingLevel);
     ASSERT(m_document->haveStylesheetsLoaded());
     ASSERT(isPendingScriptReady(m_parserBlockingScript));
 
@@ -128,11 +127,6 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
     if (pendingScript.cachedScript() && pendingScript.watchingForLoad())
         stopWatchingForLoad(pendingScript);
 
-#if ENABLE(MUTATION_OBSERVERS)
-    if (!isExecutingScript())
-        MutationObserver::deliverAllMutations();
-#endif
-
     // Clear the pending script before possible rentrancy from executeScript()
     RefPtr<Element> element = pendingScript.releaseElementAndClear();
     if (ScriptElement* scriptElement = toScriptElement(element.get())) {
@@ -146,7 +140,7 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
             element->dispatchEvent(createScriptLoadEvent());
         }
     }
-    ASSERT(!isExecutingScript());
+    ASSERT(!m_scriptNestingLevel);
 }
 
 void HTMLScriptRunner::watchForLoad(PendingScript& pendingScript)
@@ -176,7 +170,7 @@ void HTMLScriptRunner::execute(PassRefPtr<Element> scriptElement, const TextPosi
     runScript(scriptElement.get(), scriptStartPosition);
 
     if (hasParserBlockingScript()) {
-        if (isExecutingScript())
+        if (m_scriptNestingLevel)
             return; // Unwind to the outermost HTMLScriptRunner::execute before continuing parsing.
         // If preload scanner got created, it is missing the source after the current insertion point. Append it and scan.
         if (!hadPreloadScanner && m_host->hasPreloadScanner())
@@ -198,7 +192,7 @@ void HTMLScriptRunner::executeParsingBlockingScripts()
 
 void HTMLScriptRunner::executeScriptsWaitingForLoad(CachedResource* cachedScript)
 {
-    ASSERT(!isExecutingScript());
+    ASSERT(!m_scriptNestingLevel);
     ASSERT(hasParserBlockingScript());
     ASSERT_UNUSED(cachedScript, m_parserBlockingScript.cachedScript() == cachedScript);
     ASSERT(m_parserBlockingScript.cachedScript()->isLoaded());
@@ -211,7 +205,7 @@ void HTMLScriptRunner::executeScriptsWaitingForStylesheets()
     // Callers should check hasScriptsWaitingForStylesheets() before calling
     // to prevent parser or script re-entry during </style> parsing.
     ASSERT(hasScriptsWaitingForStylesheets());
-    ASSERT(!isExecutingScript());
+    ASSERT(!m_scriptNestingLevel);
     ASSERT(m_document->haveStylesheetsLoaded());
     executeParsingBlockingScripts();
 }
@@ -219,7 +213,7 @@ void HTMLScriptRunner::executeScriptsWaitingForStylesheets()
 bool HTMLScriptRunner::executeScriptsWaitingForParsing()
 {
     while (!m_scriptsToExecuteAfterParsing.isEmpty()) {
-        ASSERT(!isExecutingScript());
+        ASSERT(!m_scriptNestingLevel);
         ASSERT(!hasParserBlockingScript());
         ASSERT(m_scriptsToExecuteAfterParsing.first().cachedScript());
         if (!m_scriptsToExecuteAfterParsing.first().cachedScript()->isLoaded()) {
@@ -280,6 +274,9 @@ void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
     ASSERT(m_document);
     ASSERT(!hasParserBlockingScript());
     {
+        InsertionPointRecord insertionPointRecord(m_host->inputStream());
+        NestingLevelIncrementer nestingLevelIncrementer(m_scriptNestingLevel);
+
         ScriptElement* scriptElement = toScriptElement(script);
 
         // This contains both and ASSERTION and a null check since we should not
@@ -290,18 +287,6 @@ void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
         if (!scriptElement)
             return;
 
-#if ENABLE(MUTATION_OBSERVERS)
-        // FIXME: This may be too agressive as we always deliver mutations at
-        // every script element, even if it's not ready to execute yet. There's
-        // unfortuantely no obvious way to tell if prepareScript is going to
-        // execute the script from out here.
-        if (!isExecutingScript())
-            MutationObserver::deliverAllMutations();
-#endif
-
-        InsertionPointRecord insertionPointRecord(m_host->inputStream());
-        NestingLevelIncrementer nestingLevelIncrementer(m_scriptNestingLevel);
-
         scriptElement->prepareScript(scriptStartPosition);
 
         if (!scriptElement->willBeParserExecuted())