Title: [133349] branches/safari-536.28-branch/Source/WebCore
Revision
133349
Author
[email protected]
Date
2012-11-02 14:32:38 -0700 (Fri, 02 Nov 2012)

Log Message

Merged r124580.  <rdar://problem/12536416>

Modified Paths

Diff

Modified: branches/safari-536.28-branch/Source/WebCore/ChangeLog (133348 => 133349)


--- branches/safari-536.28-branch/Source/WebCore/ChangeLog	2012-11-02 21:32:01 UTC (rev 133348)
+++ branches/safari-536.28-branch/Source/WebCore/ChangeLog	2012-11-02 21:32:38 UTC (rev 133349)
@@ -1,5 +1,25 @@
 2012-11-02  Lucas Forschler  <[email protected]>
 
+        Merge r124580
+
+    2012-08-03  Abhishek Arya  <[email protected]>
+
+            Regression(r124564): Wrong inlineChildrenBlock->hasLayer() computed in RenderBlock::removeChild.
+            https://bugs.webkit.org/show_bug.cgi?id=90800
+
+            Reviewed by Eric Seidel.
+
+            r124564 reversed the sequence of setStyle and removeChildNode calls, but failed to cache the value
+            of inlineChildrenBlock->hasLayer(). So, it will be null when the layer is removed from parent in setStyle.
+            Fixed by the caching the bool value. 
+
+            Covered by existing test fast/block/layer-not-removed-from-parent-crash.html.
+
+            * rendering/RenderBlock.cpp:
+            (WebCore::RenderBlock::removeChild):
+
+2012-11-02  Lucas Forschler  <[email protected]>
+
         Merge r124564
 
     2012-08-02  Abhishek Arya  <[email protected]>
@@ -206048,3 +206068,4 @@
 .
 .
 .
+.

Modified: branches/safari-536.28-branch/Source/WebCore/rendering/RenderBlock.cpp (133348 => 133349)


--- branches/safari-536.28-branch/Source/WebCore/rendering/RenderBlock.cpp	2012-11-02 21:32:01 UTC (rev 133348)
+++ branches/safari-536.28-branch/Source/WebCore/rendering/RenderBlock.cpp	2012-11-02 21:32:38 UTC (rev 133349)
@@ -1180,12 +1180,14 @@
             // column span flag if it is set.
             ASSERT(!inlineChildrenBlock->continuation());
             RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK);
+            // Cache this value as it might get changed in setStyle() call.
+            bool inlineChildrenBlockHasLayer = inlineChildrenBlock->hasLayer();
             inlineChildrenBlock->setStyle(newStyle);
-            children()->removeChildNode(this, inlineChildrenBlock, inlineChildrenBlock->hasLayer());
+            children()->removeChildNode(this, inlineChildrenBlock, inlineChildrenBlockHasLayer);
             
             // Now just put the inlineChildrenBlock inside the blockChildrenBlock.
             blockChildrenBlock->children()->insertChildNode(blockChildrenBlock, inlineChildrenBlock, prev == inlineChildrenBlock ? blockChildrenBlock->firstChild() : 0,
-                                                            inlineChildrenBlock->hasLayer() || blockChildrenBlock->hasLayer());
+                                                            inlineChildrenBlockHasLayer || blockChildrenBlock->hasLayer());
             next->setNeedsLayoutAndPrefWidthsRecalc();
             
             // inlineChildrenBlock got reparented to blockChildrenBlock, so it is no longer a child
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to