| 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 4f03f2696807dd4c33992714388dc38fc4f2cd14..08b9b26253ca139f99e28bfae2334ab49d01b0c2 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -2426,10 +2426,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());
|
| + }
|
| }
|
| }
|
| }
|
|
|