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

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

Issue 2841603003: Record non-stacking-context as main thread scrolling reasons (Closed)
Patch Set: Test update Created 3 years, 8 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: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index b48cb92fc906ca757a3f832821d809efc31bf978..81cca336987e4571b6f9bc0cc19784e246b8cdd8 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2779,8 +2779,8 @@ bool PaintLayer::CompositesWithOpacity() const {
return OpacityAncestor() || GetLayoutObject().Style()->HasOpacity();
}
-bool PaintLayer::BackgroundIsKnownToBeOpaqueInRect(
- const LayoutRect& local_rect) const {
+bool PaintLayer::BackgroundIsKnownToBeOpaqueInRect(const LayoutRect& local_rect,
+ uint32_t* reasons) const {
if (PaintsWithTransparency(kGlobalPaintNormalPhase))
return false;
@@ -2818,8 +2818,11 @@ bool PaintLayer::BackgroundIsKnownToBeOpaqueInRect(
// We can't consult child layers if we clip, since they might cover
// parts of the rect that are clipped out.
- if (GetLayoutObject().HasClipRelatedProperty())
+ if (GetLayoutObject().HasClipRelatedProperty()) {
+ if (reasons && GetLayoutObject().HasOverflowClip())
+ *reasons |= MainThreadScrollingReason::kHasOverflowClipAndLCDText;
return false;
+ }
// TODO(schenney): This could be improved by unioning the opaque regions of
// all the children. That would require a refactoring because currently

Powered by Google App Engine
This is Rietveld 408576698