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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2529293012: Invalidate paint properties on paint offset changes (Closed)
Patch Set: Fix transform underinvalidation, skip several spinvalidation skips Created 4 years 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: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 72d1155b59294cb56a1bf1343ca60a6f9ed6c1b0..517a9d4689eb47fe5beaaf3df4ebf80f79317dd8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -325,6 +325,15 @@ void LayoutBox::styleDidChange(StyleDifference diff,
updateScrollSnapMappingAfterStyleChange(&newStyle, oldStyle);
}
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip()) {
+ // The overflow clip paint property depends on border sizes through
+ // overflowClipRect() so we update properties on border size changes.
+ if (oldStyle && !oldStyle->border().sizeEquals(newStyle.border()))
+ setNeedsPaintPropertyUpdate();
+ }
+ }
+
// Non-atomic inlines should be LayoutInline or LayoutText, not LayoutBox.
DCHECK(!isInline() || isAtomicInlineLevel());
}
@@ -1692,6 +1701,14 @@ void LayoutBox::frameRectChanged() {
// Should check this object for paint invalidation.
if (!needsLayout())
setMayNeedPaintInvalidation();
+
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ // The overflow clip paint property depends on the border box rect through
+ // overflowClipRect(). The border box rect's size equals the frame rect's
+ // size, so we trigger a paint property update when the framerect changes.
+ if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip())
+ setNeedsPaintPropertyUpdate();
+ }
}
bool LayoutBox::intersectsVisibleViewport() const {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698