Chromium Code Reviews| Index: Source/core/rendering/RenderBox.cpp |
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
| index b024ccb0690ca3622fdccf9d459ba75172d4764f..068d4ab49889840c9391bacfda74ed4d259f3268 100644 |
| --- a/Source/core/rendering/RenderBox.cpp |
| +++ b/Source/core/rendering/RenderBox.cpp |
| @@ -286,10 +286,23 @@ void RenderBox::updateFromStyle() |
| if (!hasOverflowClip()) { |
| // If we are getting an overflow clip, preemptively erase any overflowing content. |
| // FIXME: This should probably consult RenderOverflow. |
| - repaint(); |
| + if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| + repaint(); |
| } |
| } |
| } |
| + |
| + if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && (boxHasOverflowClip != hasOverflowClip())) { |
| + // FIXME: This shouldn't be required if we tracked the visual overflow |
| + // generated by positioned children or self painting layers. crbug.com/345403 |
| + for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { |
|
esprehn
2014/02/28 02:54:33
You can't do this, you're looking at your children
dsinclair
2014/02/28 18:58:24
Changed to storing a flag here and checking the is
|
| + if (child->hasLayer() && toRenderLayerModelObject(child)->layer()->isSelfPaintingLayer()) { |
| + LayoutRectRecorder childRecorder(*child); |
| + child->setShouldDoFullRepaintAfterLayout(true); |
| + } |
| + } |
| + } |
| + |
| setHasOverflowClip(boxHasOverflowClip); |
| setHasTransform(styleToUse->hasTransformRelatedProperty()); |
| @@ -1571,6 +1584,8 @@ void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) |
| if (!parent()) |
| return; |
| + AllowRepaintScope scoper(frameView()); |
| + |
| if ((style()->borderImage().image() && style()->borderImage().image()->data() == image) || |
| (style()->maskBoxImage().image() && style()->maskBoxImage().image()->data() == image)) { |
| repaint(); |