Fix repositioning of fixed elements on zooming
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2012 00:26:31 +0000 (00:26 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2012 00:26:31 +0000 (00:26 +0000)
commit97f2093301abf10b18799d8d11c1486a7ec64f25
tree1964644c307c298b86a9e62a153256847bd12278
parent50c21bfeb4d1dd744e2c3c5e08d9c67412ee571d
Fix repositioning of fixed elements on zooming
https://bugs.webkit.org/show_bug.cgi?id=105223

Reviewed by Beth Dakin.

Source/WebCore:

When zoomed, scrolling would move the layers of fixed-position
elements oddly. This happened because on the scrolling thread we
passed a scale of 1, rather than the actual page scale to
scrollOffsetForFixedPosition().

Fix by plumbing the page scale through the scrolling state node
to the scrolling node.

Test: platform/mac/tiled-drawing/fixed/four-bars-zoomed.html

* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setFrameScaleFactor):
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::frameScaleFactor):
(ScrollingStateScrollingNode):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::update):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::frameScaleFactor):
(ScrollingTreeScrollingNode):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollParameters):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

LayoutTests:

Testcase that zoomed with fixed-position elements.

* platform/mac/tiled-drawing/fixed/four-bars-zoomed-expected.txt: Added.
* platform/mac/tiled-drawing/fixed/four-bars-zoomed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/tiled-drawing/fixed/four-bars-zoomed-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/tiled-drawing/fixed/four-bars-zoomed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm