Changeset 186532 in webkit


Ignore:
Timestamp:
Jul 8, 2015, 4:03:38 PM (10 years ago)
Author:
timothy_horton@apple.com
Message:

Snapshots can be misplaced when custom swipe views are offset from the window origin
https://bugs.webkit.org/show_bug.cgi?id=146744
<rdar://problem/20942120>

Reviewed by Dean Jackson.

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
Keep swipeArea in window coordinates; it was already in window coordinates
when using custom swipe views, but not in the non-custom case.

Convert from window coordinates to parent-of-m_swipeLayer coordinates when
determining m_swipeLayer's frame.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r186531 r186532  
     12015-07-08  Tim Horton  <timothy_horton@apple.com>
     2
     3        Snapshots can be misplaced when custom swipe views are offset from the window origin
     4        https://bugs.webkit.org/show_bug.cgi?id=146744
     5        <rdar://problem/20942120>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * UIProcess/mac/ViewGestureControllerMac.mm:
     10        (WebKit::ViewGestureController::beginSwipeGesture):
     11        Keep swipeArea in window coordinates; it was already in window coordinates
     12        when using custom swipe views, but not in the non-custom case.
     13
     14        Convert from window coordinates to parent-of-m_swipeLayer coordinates when
     15        determining m_swipeLayer's frame.
     16
    1172015-07-07  Andy Estes  <aestes@apple.com>
    218
  • trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm

    r186174 r186532  
    557557        }
    558558    } else {
    559         swipeArea = FloatRect(FloatPoint(), m_webPageProxy.viewSize());
     559        swipeArea = [rootContentLayer convertRect:CGRectMake(0, 0, m_webPageProxy.viewSize().width(), m_webPageProxy.viewSize().height()) toLayer:nil];
    560560        topContentInset = m_webPageProxy.topContentInset();
    561561        m_currentSwipeLiveLayers.append(rootContentLayer);
     
    580580    [m_swipeLayer setBackgroundColor:backgroundColor.get()];
    581581    [m_swipeLayer setAnchorPoint:CGPointZero];
    582     [m_swipeLayer setFrame:swipeArea];
     582    [m_swipeLayer setFrame:[snapshotLayerParent convertRect:swipeArea fromLayer:nil]];
    583583    [m_swipeLayer setName:@"Gesture Swipe Root Layer"];
    584584    [m_swipeLayer setGeometryFlipped:geometryIsFlippedToRoot];
     
    597597    if (m_webPageProxy.preferences().viewGestureDebuggingEnabled())
    598598        applyDebuggingPropertiesToSwipeViews();
    599 
    600599
    601600    CALayer *layerAdjacentToSnapshot = determineLayerAdjacentToSnapshotForParent(direction, snapshotLayerParent);
Note: See TracChangeset for help on using the changeset viewer.