| Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
|
| index 4a3d4a54238540f1a60f17931b90eb4a17fbbb44..698df571c2840948cc539a109e3bbba365b0c6c9 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
|
| @@ -1493,11 +1493,9 @@ static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode
|
| if (node && node->isElementNode() && (toElement(node)->compositorMutableProperties() & (CompositorMutableProperty::kScrollTop | CompositorMutableProperty::kScrollLeft)))
|
| return true;
|
|
|
| - // TODO(schenney) The color test alone is inadequate. When https://codereview.chromium.org/2196583002 lands
|
| - // we should use PaintLayer::shouldPaintBackgroundOntoForeground() because we will not still get
|
| - // LCD text unless the conditions there are met. It also unifies logic for scrolling compositing decisions.
|
| bool backgroundSupportsLCDText = RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled()
|
| - && !layer->layoutObject()->style()->visitedDependentColor(CSSPropertyBackgroundColor).hasAlpha();
|
| + && layer->shouldPaintBackgroundOntoScrollingContentsLayer()
|
| + && layer->backgroundIsKnownToBeOpaqueInRect(toLayoutBox(layer->layoutObject())->paddingBoxRect());
|
| if (mode == PaintLayerScrollableArea::ConsiderLCDText
|
| && !layer->compositor()->preferCompositingToLCDTextEnabled()
|
| && !backgroundSupportsLCDText)
|
|
|