Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index 9999fd91e1bc18552259bdab3ddfe1ad9a7442da..a7ef4c73730467b46db895e3646a62062cb346ca 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -286,10 +286,21 @@ 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()) { |
+ LayoutRectRecorder childRecorder(*child); |
+ child->setShouldDoFullRepaintIfSelfPaintingLayer(true); |
+ } |
+ } |
+ |
setHasOverflowClip(boxHasOverflowClip); |
setHasTransform(styleToUse->hasTransformRelatedProperty()); |
@@ -1552,6 +1563,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(); |