Chromium Code Reviews| 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 cb5500a93959ed72957af3adadf0b1c9d534d3bc..2303e74519c2fb0f0b51799e085a66128869b8b2 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
| @@ -221,8 +221,7 @@ GraphicsLayer* PaintLayerScrollableArea::layerForScrollCorner() const |
| bool PaintLayerScrollableArea::shouldUseIntegerScrollOffset() const |
| { |
| - Frame* frame = box().frame(); |
| - if (frame->settings() && !frame->settings()->preferCompositingToLCDTextEnabled()) |
| + if (m_needsCompositedScrolling) |
| return true; |
| return ScrollableArea::shouldUseIntegerScrollOffset(); |
| @@ -1494,13 +1493,18 @@ static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode |
| if (node && node->isElementNode() && (toElement(node)->compositorMutableProperties() & (CompositorMutableProperty::kScrollTop | CompositorMutableProperty::kScrollLeft))) |
| return true; |
| - if (mode == PaintLayerScrollableArea::ConsiderLCDText && !layer->compositor()->preferCompositingToLCDTextEnabled()) |
| + if (mode == PaintLayerScrollableArea::ConsiderLCDText |
| + && !layer->compositor()->preferCompositingToLCDTextEnabled() |
| + && (!RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled() |
| + || layer->layoutObject()->style()->visitedDependentColor(CSSPropertyBackgroundColor).hasAlpha())) |
| return false; |
| - return !layer->size().isEmpty() |
| - && !layer->hasDescendantWithClipPath() |
| - && !layer->hasAncestorWithClipPath() |
| - && !layer->layoutObject()->style()->hasBorderRadius(); |
| + return !(layer->size().isEmpty() |
| + || layer->hasDescendantWithClipPath() |
| + || layer->hasAncestorWithClipPath() |
| + || layer->layoutObject()->isFloating() |
|
chrishtr
2016/07/27 18:45:44
Why the two new things listed here?
Stephen Chennney
2016/07/27 19:13:26
Because Floating layers trigger a isSelfPaintingLa
chrishtr
2016/07/27 19:26:00
Please remove these then. Let's address them in a
Stephen Chennney
2016/07/27 22:19:53
Done.
|
| + || layer->layoutObject()->style()->hasBorderRadius() |
| + || layer->layoutObject()->style()->hasBorderDecoration()); |
| } |
| void PaintLayerScrollableArea::updateNeedsCompositedScrolling(LCDTextMode mode) |