Need to re-layout fixed position elements after scale when using settings()->fixedEle...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 17:31:34 +0000 (17:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 17:31:34 +0000 (17:31 +0000)
commit101e46bfbbebc15242f5e69edeab573739b4fba0
treef4a3e598d5df54bb17ebaddbce78c673bb80d0fd
parent5fb8fa0a73b5a35c4ab837b321276778ee527454
Need to re-layout fixed position elements after scale when using settings()->fixedElementsLayoutRelativeToFrame()
https://bugs.webkit.org/show_bug.cgi?id=105486

Patch by Tien-Ren Chen <trchen@chromium.org> on 2013-02-21
Reviewed by James Robinson.

In settings()->fixedElementsLayoutRelativeToFrame() mode, fixed-position
elements are layout relative to the current visible viewport, which can
be different from the layout viewport when using fixed-layout mode.
We need to re-layout fixed-position elements in case of visible content
size changes.

The test is currently chromium-specific due to difficulties to make this
test works on Mac. The mac port seems to work very differently with
visible content size when a page is scaled. And there is no reliable way
to hide scrollbars in mac-wk1 that doesn't cause a side effect.

Source/WebCore:

Test: platform/chromium/fast/repaint/relayout-fixed-position-after-scale.html

* page/FrameView.cpp:
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
(FrameView):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):

LayoutTests:

* platform/chromium/fast/repaint/relayout-fixed-position-after-scale-expected.html: Added.
* platform/chromium/fast/repaint/relayout-fixed-position-after-scale.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/chromium/fast/repaint/relayout-fixed-position-after-scale-expected.html [new file with mode: 0644]
LayoutTests/platform/chromium/fast/repaint/relayout-fixed-position-after-scale.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/Page.cpp