| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 288c35e5d3954370a2b0fc82fae901f04e0ec6ff..2030ff618d06b00c3114bd2feca684664fe8982c 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -2434,10 +2434,12 @@ void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g
|
| {
|
| if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_foregroundLayer.get()) {
|
| if (PaintLayerScrollableArea* scrollableArea = m_owningLayer.getScrollableArea()) {
|
| - // Note: this is just the scroll offset, *not* the "adjusted scroll offset". Scroll offset
|
| - // does not include the origin adjustment. That is instead baked already into offsetFromLayoutObject.
|
| - DoubleSize scrollOffset = scrollableArea->scrollOffset();
|
| - offset.expand(-scrollOffset.width(), -scrollOffset.height());
|
| + if (scrollableArea->usesCompositedScrolling()) {
|
| + // Note: this is just the scroll offset, *not* the "adjusted scroll offset". Scroll offset
|
| + // does not include the origin adjustment. That is instead baked already into offsetFromLayoutObject.
|
| + DoubleSize scrollOffset = scrollableArea->scrollOffset();
|
| + offset.expand(-scrollOffset.width(), -scrollOffset.height());
|
| + }
|
| }
|
| }
|
| }
|
|
|