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

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

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 10 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
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 760eab0aad7d7832b5fed5c1e2a2aff48cfc7088..da5505d0b4f1559a4c52481216ca665d751116b0 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());
@@ -1564,6 +1575,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();

Powered by Google App Engine
This is Rietveld 408576698