diff options
Diffstat (limited to 'Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp')
-rw-r--r-- | Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp b/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp index e97a52733..192c8d8bf 100644 --- a/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp +++ b/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp @@ -148,6 +148,13 @@ void CoordinatedGraphicsScene::paintToGraphicsContext(PlatformGraphicsContext* p m_textureMapper->setGraphicsContext(0); } +#if PLATFORM(QT) +void CoordinatedGraphicsScene::setScrollPosition(const FloatPoint& scrollPosition) +{ + m_scrollPosition = scrollPosition; +} +#endif + void CoordinatedGraphicsScene::updateViewport() { ASSERT(&m_clientRunLoop == &RunLoop::current()); @@ -163,7 +170,11 @@ void CoordinatedGraphicsScene::adjustPositionForFixedLayers(const FloatPoint& co // Fixed layer positions are updated by the web process when we update the visible contents rect / scroll position. // If we want those layers to follow accurately the viewport when we move between the web process updates, we have to offset // them by the delta between the current position and the position of the viewport used for the last layout. +#if PLATFORM(QT) + FloatSize delta = m_scrollPosition - m_renderedContentsScrollPosition; +#else FloatSize delta = contentPosition - m_renderedContentsScrollPosition; +#endif for (auto& fixedLayer : m_fixedLayers.values()) fixedLayer->setScrollPositionDeltaIfNeeded(delta); |