2011-05-26 Jon Lee <jonlee@apple.com>
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 May 2011 00:29:40 +0000 (00:29 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 May 2011 00:29:40 +0000 (00:29 +0000)
commitfb4aae5285109c33942ad3e44b42f3c65f1d7b95
tree011ee46aea00a6f0fd2491cf111642215f406987
parentd93112a2c62ef4d83c546c9b39229b0ad8763199
2011-05-26  Jon Lee  <jonlee@apple.com>

        Reviewed by Darin Adler.

        REGRESSION (5.0.5-Jazz): Transition to full screen video animates in wrong location when scrolled (61559)
        https://bugs.webkit.org/show_bug.cgi?id=61559
        <rdar://problem/9496054>

        The CALayer that gets animated has a position that is offset by the scroll position of the web view. To
        fix this, we set the destination location based on the rect of the full screen, and add a position
        animation which keeps the position of the layer centered. This prevents glitches if others
        are trying to change the layer position while the animation is running.

        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Refactor the calculation of the CALayer windowed
        position into a private helper function, as well as the animation setup.
        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
        (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
        (WebKit::WebFullScreenManagerMac::animateFullScreen): Sets up the zoom animation, and the position offset
        animation.
        (WebKit::WebFullScreenManagerMac::windowedCGTransform): Calculates the placement of the windowed layer
        in screen coordinates.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.h
Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm