Changeset 124489 in webkit


Ignore:
Timestamp:
Aug 2, 2012 1:30:15 PM (12 years ago)
Author:
Beth Dakin
Message:

https://bugs.webkit.org/show_bug.cgi?id=93020
REGRESSION (tiled scrolling): Full-screen video is broken if page is
scrolled
-and corresponding-
<rdar://problem/11629778>

Reviewed by Anders Carlsson.

The bug here is that ScrollingTreeNodeMac::setScrollLayerPosition()
uses the CALayer (PlatformLayer) directly to set the position. That
means that the GraphicsLayer that owns that PlatformLayer does not
have updated position information. That results in this bug when we
switch from fast scrolling to main thread scrolling, because at that
point, the GraphicsLayer needs to have the correct information. So
make sure to update the main thread scroll position and layer
position before transitioning to main thread scrolling.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r124486 r124489  
     12012-08-02  Beth Dakin  <bdakin@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=93020
     4        REGRESSION (tiled scrolling): Full-screen video is broken if page is
     5        scrolled
     6        -and corresponding-
     7        <rdar://problem/11629778>
     8
     9        Reviewed by Anders Carlsson.
     10
     11        The bug here is that ScrollingTreeNodeMac::setScrollLayerPosition()
     12        uses the CALayer (PlatformLayer) directly to set the position. That
     13        means that the GraphicsLayer that owns that PlatformLayer does not
     14        have updated position information. That results in this bug when we
     15        switch from fast scrolling to main thread scrolling, because at that
     16        point, the GraphicsLayer needs to have the correct information. So
     17        make sure to update the main thread scroll position and layer
     18        position before transitioning to main thread scrolling.
     19        * page/scrolling/ScrollingCoordinator.cpp:
     20        (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
     21
    1222012-08-02  Addy Osmani  <addyo@chromium.org>
    223
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r120340 r124489  
    416416void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread)
    417417{
     418    // The FrameView's GraphicsLayer is likely to be out-of-synch with the PlatformLayer
     419    // at this point. So we'll update it before we switch back to main thread scrolling
     420    // in order to avoid layer positioning bugs.
     421    if (shouldUpdateScrollLayerPositionOnMainThread)
     422        updateMainFrameScrollPositionAndScrollLayerPosition();
    418423    m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThread(shouldUpdateScrollLayerPositionOnMainThread);
    419424    scheduleTreeStateCommit();
Note: See TracChangeset for help on using the changeset viewer.