[Qt][WK2] Nested fixed elements scroll too fast
authoryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 15:35:13 +0000 (15:35 +0000)
committeryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 15:35:13 +0000 (15:35 +0000)
commit62c5c3f71fd9d405425fd527c59619b4c6a8b0d7
treea5eebcb3453145b052b678dbb21200e9bf9df6fe
parentb82842002b4097dcc6586dd81e98cea5abd4d206
[Qt][WK2] Nested fixed elements scroll too fast
https://bugs.webkit.org/show_bug.cgi?id=83720

Reviewed by Noam Rosenthal.

.:

* ManualTests/nested-fixed-position.html: Added.

Source/WebCore:

Before setting the scrollPositionDelta to a fixed layer, check if it has an ancestor which also has fixed position.
If it does, do not set scrollPositionDelta.
Added a flag to TextureMapperLayer and GraphicsLayerTextureMapper indicating if it is a fixed position layer.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::setFixedToViewport):
(WebCore::GraphicsLayerTextureMapper::fixedToViewport):
(GraphicsLayerTextureMapper):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::syncCompositingStateSelf):
(WebCore::TextureMapperLayer::isAncestorFixedToViewport):
(WebCore):
(WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
* platform/graphics/texmap/TextureMapperLayer.h:
(TextureMapperLayer):
(WebCore::TextureMapperLayer::setFixedToViewport):

Source/WebKit2:

Set the fixedToViewport flag on the fixed position layers and adjust to
the new function name for setting scrollPositionDelta.

* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers):
(WebKit::WebLayerTreeRenderer::setLayerState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/nested-fixed-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp