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

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: Revised the 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 631aa137483d3a004995dee13d9aca43102ee429..4005d0ee995fe2d0fad28f48e20c9a6e4faaca61 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -105,11 +105,22 @@ void RenderBox::willBeDestroyed()
RenderBlock::removePercentHeightDescendantIfNeeded(this);
- ShapeOutsideInfo::removeInfo(*this);
+ clearShapeOutside();
RenderBoxModelObject::willBeDestroyed();
}
+void RenderBox::clearShapeOutside()
+{
+ const ShapeValue* shapeValue = style()->shapeOutside();
+ if (shapeValue) {
rwlbuis 2014/04/10 15:05:55 Nit: you could inline the shapeValue into the if s
+ if (StyleImage* shapeImage = shapeValue->image())
+ shapeImage->removeClient(this);
+ }
+
+ ShapeOutsideInfo::removeInfo(*this);
+}
+
void RenderBox::removeFloatingOrPositionedChildFromBlockLists()
{
ASSERT(isFloatingOrOutOfFlowPositioned());
@@ -242,7 +253,7 @@ void RenderBox::updateShapeOutsideInfoAfterStyleChange(const RenderStyle& style,
return;
if (!shapeOutside)
- ShapeOutsideInfo::removeInfo(*this);
+ clearShapeOutside();
else
ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
« 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