Title: [124580] trunk/Source/WebCore
- Revision
- 124580
- Author
- [email protected]
- Date
- 2012-08-03 01:15:35 -0700 (Fri, 03 Aug 2012)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (124579 => 124580)
--- trunk/Source/WebCore/ChangeLog 2012-08-03 08:04:39 UTC (rev 124579)
+++ trunk/Source/WebCore/ChangeLog 2012-08-03 08:15:35 UTC (rev 124580)
@@ -1,3 +1,19 @@
+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-08-03 Mario Sanchez Prada <[email protected]>
[GTK] Add a new and reusable enchant-based spellchecker in WebCore
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (124579 => 124580)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-08-03 08:04:39 UTC (rev 124579)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-08-03 08:15:35 UTC (rev 124580)
@@ -1169,12 +1169,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