| Index: cc/layer_tree_host.cc
|
| diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
|
| index 9386699d42d4b2aa84fb560332e621d5c45565aa..e7375566129356531e581ba8385835b79195bd0f 100644
|
| --- a/cc/layer_tree_host.cc
|
| +++ b/cc/layer_tree_host.cc
|
| @@ -311,6 +311,14 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
|
| hostImpl->setDebugState(m_debugState);
|
| hostImpl->savePaintTime(m_renderingStats.totalPaintTime);
|
|
|
| + if (LayerImpl* rootScrollLayer = syncTree->RootScrollLayer()) {
|
| + fprintf (stderr, "debug: %d %d\n", rootScrollLayer->sentDesktopCompatibilityViewportOffsetFromScrollPositionDelta().x(), rootScrollLayer->sentDesktopCompatibilityViewportOffsetFromScrollPositionDelta().y());
|
| + // FIXME FIXME FIXME
|
| + rootScrollLayer->setDesktopCompatibilityViewportOffsetFromScrollPosition(rootScrollLayer->desktopCompatibilityViewportOffsetFromScrollPosition() + rootScrollLayer->sentDesktopCompatibilityViewportOffsetFromScrollPositionDelta());
|
| + rootScrollLayer->setDesktopCompatibilityViewportOffsetFromScrollPositionDelta(rootScrollLayer->desktopCompatibilityViewportOffsetFromScrollPositionDelta() - rootScrollLayer->sentDesktopCompatibilityViewportOffsetFromScrollPositionDelta());
|
| + rootScrollLayer->setSentDesktopCompatibilityViewportOffsetFromScrollPositionDelta(gfx::Vector2d());
|
| + }
|
| +
|
| if (newImplTreeHasNoEvictedResources) {
|
| if (syncTree->ContentsTexturesPurged())
|
| syncTree->ResetContentsTexturesPurged();
|
| @@ -748,8 +756,8 @@ void LayerTreeHost::applyScrollAndScale(const ScrollAndScaleSet& info)
|
| else
|
| layer->setScrollOffset(layer->scrollOffset() + info.scrolls[i].scrollDelta);
|
| }
|
| - if (!rootScrollDelta.IsZero() || info.pageScaleDelta != 1)
|
| - m_client->applyScrollAndScale(rootScrollDelta, info.pageScaleDelta);
|
| + if (!rootScrollDelta.IsZero() || info.pageScaleDelta != 1 || !info.desktopCompatibilityViewportOffsetFromScrollPositionDelta.IsZero())
|
| + m_client->applyScrollAndScale(rootScrollDelta, info.pageScaleDelta, info.desktopCompatibilityViewportOffsetFromScrollPositionDelta);
|
| }
|
|
|
| void LayerTreeHost::setImplTransform(const gfx::Transform& transform)
|
|
|