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

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

Issue 2259493004: Fix Compositing of Opaque Scrolling Layers and Add Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary change. Created 4 years, 4 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/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 9237e04590abe81fc6949bfd8b2280c75224019d..aef397414193e30fb1bd4ebb658d8e057de904e8 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1502,7 +1502,8 @@ static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode
// 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()
Stephen Chennney 2016/08/26 18:01:41 My understanding is that here we cannot use the Co
flackr 2016/08/26 18:24:23 I believe that's correct - but should be easy to t
Stephen Chennney 2016/08/26 18:42:08 I'll check.
+ && layer->backgroundIsKnownToBeOpaqueInRect(toLayoutBox(layer->layoutObject())->paddingBoxRect());
Stephen Chennney 2016/08/26 20:46:01 We have a chicken and egg problem. The first thing
if (mode == PaintLayerScrollableArea::ConsiderLCDText
&& !layer->compositor()->preferCompositingToLCDTextEnabled()
&& !backgroundSupportsLCDText)

Powered by Google App Engine
This is Rietveld 408576698