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() |
| + || layer->layoutObject()->style()->hasBorderRadius() |
| + || layer->layoutObject()->style()->hasBorderDecoration()); |
|
flackr
2016/07/27 22:17:27
Why can we not use composited scrolling with a bor
Stephen Chennney
2016/07/28 13:55:38
Dashed borders are broken in tests because we don'
flackr
2016/07/28 14:24:25
Understood, sounds good. Can we land these as a se
Stephen Chennney
2016/07/28 14:50:47
I'm not sure what you mean. Do you mean leave out
flackr
2016/07/28 14:55:15
Yes, basically, we can land these extra conditions
|
| } |
| void PaintLayerScrollableArea::updateNeedsCompositedScrolling(LCDTextMode mode) |