+2014-08-28 Tim Horton <timothy_horton@apple.com>
+
+ _setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
+ https://bugs.webkit.org/show_bug.cgi?id=136354
+ <rdar://problem/18167791>
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/API/Cocoa/WKViewPrivate.h:
+ Update the comment to note the new behavior.
+
+ * UIProcess/mac/ViewGestureControllerMac.mm:
+ (WebKit::ViewGestureController::beginSwipeGesture):
+ Don't call the block until the snapshot is actually moving (if the snapshot
+ never moves because it's behind the live view, don't call the block at all).
+
2014-08-28 Tim Horton <timothy_horton@apple.com>
Occasional thread-safety-related crashes on the ServicesController queue
// The top content inset is applied in the window's coordinate space, to the union of the custom swipe view's frames.
- (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset;
- (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState;
-// The rect returned is always that of the snapshot, not necessarily the swiping layer. This only works for layer-backed windows.
+// The rect returned is always that of the snapshot, and only if it is the view being manipulated by the swipe. This only works for layer-backed windows.
- (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect swipeSnapshotRectInWindowCoordinates))callback;
#endif
[snapshotLayerParent insertSublayer:m_swipeLayer.get() below:layerAdjacentToSnapshot];
else
[snapshotLayerParent insertSublayer:m_swipeLayer.get() above:layerAdjacentToSnapshot];
-
- didMoveSwipeSnapshotLayer();
}
void ViewGestureController::handleSwipeGesture(WebBackForwardListItem* targetItem, double progress, SwipeDirection direction)