Index: Source/WebCore/dom/ContainerNode.cpp |
=================================================================== |
--- Source/WebCore/dom/ContainerNode.cpp (revision 128805) |
+++ Source/WebCore/dom/ContainerNode.cpp (working copy) |
@@ -39,6 +39,7 @@ |
#include "Page.h" |
#include "RenderBox.h" |
#include "RenderTheme.h" |
+#include "RenderWidget.h" |
#include "RootInlineBox.h" |
#include <wtf/CurrentTime.h> |
#include <wtf/Vector.h> |
@@ -407,13 +408,15 @@ |
return false; |
} |
+ RenderWidget::suspendWidgetHierarchyUpdates(); |
+ |
Node* prev = child->previousSibling(); |
Node* next = child->nextSibling(); |
removeBetween(prev, next, child.get()); |
- |
childrenChanged(false, prev, next, -1); |
+ ChildNodeRemovalNotifier(this).notify(child.get()); |
- ChildNodeRemovalNotifier(this).notify(child.get()); |
+ RenderWidget::resumeWidgetHierarchyUpdates(); |
dispatchSubtreeModifiedEvent(); |
return child; |
@@ -483,6 +486,7 @@ |
// and remove... e.g. stop loading frames, fire unload events. |
willRemoveChildren(protect.get()); |
+ RenderWidget::suspendWidgetHierarchyUpdates(); |
forbidEventDispatch(); |
Vector<RefPtr<Node>, 10> removedChildren; |
removedChildren.reserveInitialCapacity(childNodeCount()); |
@@ -524,6 +528,8 @@ |
ChildNodeRemovalNotifier(this).notify(removedChildren[i].get()); |
allowEventDispatch(); |
+ RenderWidget::resumeWidgetHierarchyUpdates(); |
+ |
dispatchSubtreeModifiedEvent(); |
} |