Title: [205496] trunk/Source/WebKit2
- Revision
- 205496
- Author
- [email protected]
- Date
- 2016-09-06 11:38:15 -0700 (Tue, 06 Sep 2016)
Log Message
Remove SwipeTransitionStyle; only Overlap has ever been used
https://bugs.webkit.org/show_bug.cgi?id=161617
Reviewed by Alex Christensen.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::handleSwipeGesture):
Remove SwipeTransitionStyle::Push, and SwipeTransitionStyle itself entirely,
because we've never used it and it is only supported by the Mac
implementation of ViewGestureController.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (205495 => 205496)
--- trunk/Source/WebKit2/ChangeLog 2016-09-06 18:21:26 UTC (rev 205495)
+++ trunk/Source/WebKit2/ChangeLog 2016-09-06 18:38:15 UTC (rev 205496)
@@ -1,3 +1,18 @@
+2016-09-06 Tim Horton <[email protected]>
+
+ Remove SwipeTransitionStyle; only Overlap has ever been used
+ https://bugs.webkit.org/show_bug.cgi?id=161617
+
+ Reviewed by Alex Christensen.
+
+ * UIProcess/mac/ViewGestureController.h:
+ * UIProcess/mac/ViewGestureControllerMac.mm:
+ (WebKit::ViewGestureController::beginSwipeGesture):
+ (WebKit::ViewGestureController::handleSwipeGesture):
+ Remove SwipeTransitionStyle::Push, and SwipeTransitionStyle itself entirely,
+ because we've never used it and it is only supported by the Mac
+ implementation of ViewGestureController.
+
2016-09-06 Daniel Bates <[email protected]>
Remove EXTERN_C from WTF
Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h (205495 => 205496)
--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h 2016-09-06 18:21:26 UTC (rev 205495)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h 2016-09-06 18:38:15 UTC (rev 205496)
@@ -78,12 +78,7 @@
#endif
Swipe
};
-
- enum class SwipeTransitionStyle {
- Overlap,
- Push
- };
-
+
enum class SwipeDirection {
Back,
Forward
@@ -264,7 +259,6 @@
RetainPtr<CALayer> m_swipeDimmingLayer;
Vector<RetainPtr<CALayer>> m_currentSwipeLiveLayers;
- SwipeTransitionStyle m_swipeTransitionStyle { SwipeTransitionStyle::Overlap };
Vector<RetainPtr<NSView>> m_customSwipeViews;
float m_customSwipeViewsTopContentInset { 0 };
WebCore::FloatRect m_currentSwipeCustomViewBounds;
Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (205495 => 205496)
--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm 2016-09-06 18:21:26 UTC (rev 205495)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm 2016-09-06 18:38:15 UTC (rev 205496)
@@ -608,7 +608,7 @@
[snapshotLayerParent insertSublayer:m_swipeLayer.get() above:layerAdjacentToSnapshot];
// We don't know enough about the custom views' hierarchy to apply a shadow.
- if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap && m_customSwipeViews.isEmpty()) {
+ if (m_customSwipeViews.isEmpty()) {
FloatRect dimmingRect(FloatPoint(), m_webPageProxy.viewSize());
m_swipeDimmingLayer = adoptNS([[CALayer alloc] init]);
[m_swipeDimmingLayer setName:@"Gesture Swipe Dimming Layer"];
@@ -711,23 +711,14 @@
else
[m_swipeShadowLayer setOpacity:swipeOverlayShadowOpacity];
- if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap)
- [m_swipeShadowLayer setTransform:CATransform3DMakeTranslation((swipingLeft ? 0 : width) + swipingLayerOffset, 0, 0)];
+ [m_swipeShadowLayer setTransform:CATransform3DMakeTranslation((swipingLeft ? 0 : width) + swipingLayerOffset, 0, 0)];
- if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap) {
- if (!swipingLeft) {
- [m_swipeLayer setTransform:CATransform3DMakeTranslation(width + swipingLayerOffset, 0, 0)];
- didMoveSwipeSnapshotLayer();
- }
- } else if (m_swipeTransitionStyle == SwipeTransitionStyle::Push)
- [m_swipeLayer setTransform:CATransform3DMakeTranslation((swipingLeft ? -width : width) + swipingLayerOffset, 0, 0)];
-
- for (const auto& layer : m_currentSwipeLiveLayers) {
- if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap) {
- if (swipingLeft)
- [layer setTransform:CATransform3DMakeTranslation(swipingLayerOffset, 0, 0)];
- } else if (m_swipeTransitionStyle == SwipeTransitionStyle::Push)
+ if (swipingLeft) {
+ for (const auto& layer : m_currentSwipeLiveLayers)
[layer setTransform:CATransform3DMakeTranslation(swipingLayerOffset, 0, 0)];
+ } else {
+ [m_swipeLayer setTransform:CATransform3DMakeTranslation(width + swipingLayerOffset, 0, 0)];
+ didMoveSwipeSnapshotLayer();
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes