[CherryPick] [EFL][Qt][WK2] Fixed position elements are not always fixed
authorkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2012 00:04:52 +0000 (00:04 +0000)
committerHurnjoo Lee <hurnjoo.lee@samsung.com>
Fri, 3 May 2013 02:35:06 +0000 (11:35 +0900)
commit3588f9b5a14773ed521b53286f169be9632bf9c3
treebe62152b3c4e09fdbc90b0a3739aa5f2d4949cc8
parenteb660c513ddcd9e12ae5430a5ff7da34e834a0c1
[CherryPick] [EFL][Qt][WK2] Fixed position elements are not always fixed

[Issue#] N_SE-36822
[Problem] Display error occur when go to " http://www.samsung.com/global/ativ/ativ_s.html
[Cause] Fixed position elements are not always fixed
[Solution] Cherry picked.

[EFL][Qt][WK2] Fixed position elements are not always fixed
https://bugs.webkit.org/show_bug.cgi?id=103452

Reviewed by Simon Fraser.

The code figuring out whether fixed position layers are inside
the visible viewport, assumes that the visible viewport is always
the size of the layout viewport. This assumption doesn't hold with
how the Qt and EFL tiled backing store and coordinated graphics
works, so instead using the visibleContentsRect(), which provides
the right values in all cases.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

    Use visibleContentsRect instead of scrollOffsetForFixedPosition().

    scrollOffsetForFixedPosition() is needed sometimes in the Mac code
    because visibleContentRect() will return negative offsets when you
    are in the rubber-band phase of a scroll on the Mac.

    However that is not an issue here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp

Change-Id: Ia2fcdcc376e3cf72edd016ae574b062c0f0e32cf
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h