Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / RenderObjectChildList.cpp
index 80cee46..1dffa35 100644 (file)
@@ -56,16 +56,21 @@ RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
     if (oldChild->isFloatingOrOutOfFlowPositioned())
         toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists();
 
-    // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or
-    // that a positioned child got yanked). We also repaint, so that the area exposed when the child
-    // disappears gets repainted properly.
-    if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->everHadLayout()) {
-        oldChild->setNeedsLayoutAndPrefWidthsRecalc();
-        // We only repaint |oldChild| if we have a RenderLayer as its visual overflow may not be tracked by its parent.
-        if (oldChild->isBody())
-            owner->view()->repaint();
-        else
-            oldChild->repaint();
+    {
+        // FIXME: We should not be allowing repaint during layout. crbug.com/336250
+        AllowRepaintScope scoper(owner->frameView());
+
+        // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or
+        // that a positioned child got yanked). We also repaint, so that the area exposed when the child
+        // disappears gets repainted properly.
+        if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->everHadLayout()) {
+            oldChild->setNeedsLayoutAndPrefWidthsRecalc();
+            // We only repaint |oldChild| if we have a RenderLayer as its visual overflow may not be tracked by its parent.
+            if (oldChild->isBody())
+                owner->view()->repaint();
+            else
+                oldChild->repaint();
+        }
     }
 
     // If we have a line box wrapper, delete it.