Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 226203010: [CSS Shapes] shape-outside from image doesn't load properly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: corrected a flaw in clearShapeOutside that cropped up in webkit_unit_test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 29e40774a237cc6b21d47862cd77cb84fe2c6a60..222c6d9635e93f141fe0233154b8038d77c73a2e 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -105,11 +105,21 @@ void RenderBox::willBeDestroyed()
RenderBlock::removePercentHeightDescendantIfNeeded(this);
- ShapeOutsideInfo::removeInfo(*this);
+ clearShapeOutside();
RenderBoxModelObject::willBeDestroyed();
}
+void RenderBox::clearShapeOutside()
+{
+ if (const ShapeValue* shapeValue = style() ? style()->shapeOutside() : 0) {
+ if (StyleImage* shapeImage = shapeValue->image())
+ shapeImage->removeClient(this);
+ }
+
+ ShapeOutsideInfo::removeInfo(*this);
+}
+
void RenderBox::removeFloatingOrPositionedChildFromBlockLists()
{
ASSERT(isFloatingOrOutOfFlowPositioned());
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698