Partially revert r108418 - move allowEventDispatch() call back to where it used to be.
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 03:16:11 +0000 (03:16 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 03:16:11 +0000 (03:16 +0000)
Rubber-stamped by Ryosuke Niwa.

Tested by fast/text/find-layout-crash.html

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChildren):

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

Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.cpp

index 6478e07..6c18dd2 100644 (file)
@@ -1,3 +1,14 @@
+2012-02-21  James Robinson  <jamesr@chromium.org>
+
+        Partially revert r108418 - move allowEventDispatch() call back to where it used to be.
+
+        Rubber-stamped by Ryosuke Niwa.
+
+        Tested by fast/text/find-layout-crash.html
+
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::removeChildren):
+
 2012-02-21  Anders Carlsson  <andersca@apple.com>
 
         Background jitters on pages with background-attachment: fixed
index b40ea25..eaa1e5e 100644 (file)
@@ -592,6 +592,9 @@ void ContainerNode::removeChildren()
             removedChild->detach();
     }
 
+    // FIXME: This should be just above dispatchSubtreeModifiedEvent();
+    allowEventDispatch();
+
     childrenChanged(false, 0, 0, -static_cast<int>(removedChildrenCount));
 
     for (i = 0; i < removedChildrenCount; ++i) {
@@ -603,8 +606,6 @@ void ContainerNode::removeChildren()
         // and its optimized version removeChildren().
     }
 
-    allowEventDispatch();
-
     dispatchSubtreeModifiedEvent();
 }