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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2346343003: Fix or workaround several issues of slimmingPaintInvalidation on spv1 (Closed)
Patch Set: - Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=slimmingPaintInvalidation ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index 98c7ff587eb23bc5538ef96a84bd6831d0211b32..aa55dfe1c312776d07347f847a1a530cbc0d958a 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -182,7 +182,9 @@ void PaintInvalidator::updateContext(const LayoutObject& object, PaintInvalidato
context.forcedSubtreeInvalidationFlags |= PaintInvalidatorContext::ForcedSubtreeInvalidationChecking;
// TODO(crbug.com/637313): This is temporary before we support filters in paint property tree.
- if (object.hasFilterInducingProperty())
+ // TODO(crbug.com/648274): This is a workaround for multi-column contents.
+ // TODO(crbug.com/648409): This is a workaround for inline contents in vertical-rl container.
+ if (object.hasFilterInducingProperty() || object.isLayoutFlowThread() || object.hasFlippedBlocksWritingMode())
context.forcedSubtreeInvalidationFlags |= PaintInvalidatorContext::ForcedSubtreeSlowPathRect;
context.oldBounds = object.previousPaintInvalidationRect();
@@ -206,8 +208,19 @@ void PaintInvalidator::invalidatePaintIfNeeded(FrameView& frameView, PaintInvali
context.paintInvalidationContainer = context.paintInvalidationContainerForStackedContents = &layoutView->containerForPaintInvalidation();
context.paintingLayer = layoutView->layer();
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ // Undo content clip and scroll before invalidating FrameView scrollbars.
+ PaintPropertyTreeBuilderContext& treeBuilderContext = const_cast<PaintPropertyTreeBuilderContext&>(context.treeBuilderContext);
+ PaintPropertyTreeBuilderContext::ContainingBlockContext savedCurrent = treeBuilderContext.current;
+ if (frameView.contentClip() == savedCurrent.clip)
+ treeBuilderContext.current.clip = savedCurrent.clip->parent();
+ if (frameView.scroll() == savedCurrent.scroll)
+ treeBuilderContext.current.scroll = savedCurrent.scroll->parent();
+ if (frameView.scrollTranslation() == savedCurrent.transform)
+ treeBuilderContext.current.transform = savedCurrent.transform->parent();
frameView.invalidatePaintOfScrollControlsIfNeeded(context);
+ treeBuilderContext.current = savedCurrent;
+ }
if (frameView.frame().selection().isCaretBoundsDirty())
frameView.frame().selection().invalidateCaretRect();
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=slimmingPaintInvalidation ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698