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 1f9148f70c35bc50321b277d0a6b01410f2b6fb7..311675ddfb47cc0f115fd79efa212c5a7128e28c 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
@@ -2791,8 +2791,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; |
@@ -2830,8 +2830,13 @@ 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:: |
+ kHasOverflowClipAndLayoutObjectBackgroundNotOpaqueAndLCDText; |
+ } |
return false; |
+ } |
// TODO(schenney): This could be improved by unioning the opaque regions of |
// all the children. That would require a refactoring because currently |