<rdar://problem/8898595> Pages that use fixed positioning display poorly when scaled
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Feb 2011 00:31:00 +0000 (00:31 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Feb 2011 00:31:00 +0000 (00:31 +0000)
commit840698f938da985fcd40daf908ac923025f7ca70
tree9f937c252df1c9cf02a3b60057f37937f740cd69
parentc111513d69aacdd3866edd271d7c51975c337092
<rdar://problem/8898595> Pages that use fixed positioning display poorly when scaled

Reviewed by Simon Fraser.

* html/HTMLBodyElement.cpp:
(WebCore::adjustForZoom): Account for page scale.
(WebCore::HTMLBodyElement::setScrollLeft): Ditto.
(WebCore::HTMLBodyElement::setScrollTop): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::scrollXForFixedPosition): Moved from ScrollView here and changed to
account for page scale: when the page is scaled, the “viewport” with respect to which fixed
objects are positioned is scaled as well. Since it’s now bigger than the real viewport (that is,
the frame view), we move it around in proportion to the document scroll, so that when the document
is fully scrolled to the bottom-right, the bottom right of the scaled viewport is visible.
(WebCore::FrameView::scrollYForFixedPosition): Ditto.
(WebCore::FrameView::scrollOffsetForFixedPosition): Moved from ScrollView here.
* page/FrameView.h:
* platform/ScrollView.cpp: Moved functions to FrameView.
* platform/ScrollView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateRepaintRectsAfterScroll): Account for the RenderView being transformed.
(WebCore::RenderLayer::calculateClipRects): Used scrollOffsetForFixedPosition().
(WebCore::RenderLayer::backgroundClipRect): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h
Source/WebCore/rendering/RenderLayer.cpp