Title: [176411] trunk/Source/WebKit2
Revision
176411
Author
[email protected]
Date
2014-11-20 13:50:06 -0800 (Thu, 20 Nov 2014)

Log Message

[iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=138928

Reviewed by Simon Fraser.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (176410 => 176411)


--- trunk/Source/WebKit2/ChangeLog	2014-11-20 21:45:54 UTC (rev 176410)
+++ trunk/Source/WebKit2/ChangeLog	2014-11-20 21:50:06 UTC (rev 176411)
@@ -1,3 +1,19 @@
+2014-11-20  Daniel Bates  <[email protected]>
+
+        [iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=138928
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setupInteraction]):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::didCommitLoad):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
+
 2014-11-20  Anders Carlsson  <[email protected]>
 
         Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (176410 => 176411)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2014-11-20 21:45:54 UTC (rev 176410)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2014-11-20 21:50:06 UTC (rev 176411)
@@ -163,7 +163,9 @@
 
 - (void)scrollViewWillStartPanOrPinchGesture;
 
+#if ENABLE(TOUCH_EVENTS)
 - (void)_webTouchEvent:(const WebKit::NativeWebTouchEvent&)touchEvent preventsNativeGestures:(BOOL)preventsDefault;
+#endif
 - (void)_commitPotentialTapFailed;
 - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
 

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (176410 => 176411)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-11-20 21:45:54 UTC (rev 176410)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-11-20 21:50:06 UTC (rev 176411)
@@ -232,9 +232,11 @@
 
     [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionInitial context:nil];
 
+#if ENABLE(TOUCH_EVENTS)
     _touchEventGestureRecognizer = adoptNS([[UIWebTouchEventsGestureRecognizer alloc] initWithTarget:self action:@selector(_webTouchEventsRecognized:) touchDelegate:self]);
     [_touchEventGestureRecognizer setDelegate:self];
     [self addGestureRecognizer:_touchEventGestureRecognizer.get()];
+#endif
 
     _singleTapGestureRecognizer = adoptNS([[WKSyntheticClickTapGestureRecognizer alloc] initWithTarget:self action:@selector(_singleTapCommited:)]);
     [_singleTapGestureRecognizer setDelegate:self];
@@ -461,6 +463,7 @@
     return [super resignFirstResponder];
 }
 
+#if ENABLE(TOUCH_EVENTS)
 - (void)_webTouchEventsRecognized:(UIWebTouchEventsGestureRecognizer *)gestureRecognizer
 {
     const _UIWebTouchEvent* lastTouchEvent = gestureRecognizer.lastTouchEvent;
@@ -477,6 +480,7 @@
     if (nativeWebTouchEvent.allTouchPointsAreReleased())
         _canSendTouchEventsAsynchronously = NO;
 }
+#endif
 
 - (void)_inspectorNodeSearchRecognized:(UIGestureRecognizer *)gestureRecognizer
 {
@@ -534,6 +538,7 @@
     return FloatQuad(points[1], points[0], points[2], points[3]);
 }
 
+#if ENABLE(TOUCH_EVENTS)
 - (void)_webTouchEvent:(const WebKit::NativeWebTouchEvent&)touchEvent preventsNativeGestures:(BOOL)preventsNativeGesture
 {
     if (preventsNativeGesture) {
@@ -543,6 +548,7 @@
         [_touchEventGestureRecognizer setDefaultPrevented:YES];
     }
 }
+#endif
 
 static inline bool highlightedQuadsAreSmallerThanRect(const Vector<FloatQuad>& quads, const FloatRect& rect)
 {

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (176410 => 176411)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-11-20 21:45:54 UTC (rev 176410)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-11-20 21:50:06 UTC (rev 176411)
@@ -4487,7 +4487,9 @@
     m_userHasChangedPageScaleFactor = false;
     m_estimatedLatency = std::chrono::milliseconds(1000 / 60);
 
+#if ENABLE(IOS_TOUCH_EVENTS)
     WebProcess::shared().eventDispatcher().clearQueuedTouchEventsForPage(*this);
+#endif
 
     resetViewportDefaultConfiguration(frame);
     m_viewportConfiguration.resetMinimalUI();

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (176410 => 176411)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-11-20 21:45:54 UTC (rev 176410)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-11-20 21:50:06 UTC (rev 176411)
@@ -519,7 +519,10 @@
     WebCore::IntRect rectForElementAtInteractionLocation();
     void updateSelectionAppearance();
 
+#if ENABLE(IOS_TOUCH_EVENTS)
     void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
+#endif
+
     void contentSizeCategoryDidChange(const String&);
     void executeEditCommandWithCallback(const String&, uint64_t callbackID);
 
@@ -773,10 +776,13 @@
     void applicationWillEnterForeground();
     void applicationDidBecomeActive();
     void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
-    void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
     void completePendingSyntheticClickForContentChangeObserver();
 #endif
 
+#if ENABLE(IOS_TOUCH_EVENTS)
+    void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
+#endif
+
 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (176410 => 176411)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-11-20 21:45:54 UTC (rev 176410)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-11-20 21:50:06 UTC (rev 176411)
@@ -509,6 +509,7 @@
 
 void WebPage::sendTapHighlightForNodeIfNecessary(uint64_t requestID, Node* node)
 {
+#if ENABLE(TOUCH_EVENTS)
     if (!node)
         return;
 
@@ -536,6 +537,10 @@
 
         send(Messages::WebPageProxy::DidGetTapHighlightGeometries(requestID, highlightColor, quads, roundedIntSize(borderRadii.topLeft()), roundedIntSize(borderRadii.topRight()), roundedIntSize(borderRadii.bottomLeft()), roundedIntSize(borderRadii.bottomRight())));
     }
+#else
+    UNUSED_PARAM(requestID);
+    UNUSED_PARAM(node);
+#endif
 }
 
 void WebPage::potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint& position)
@@ -2706,12 +2711,14 @@
     send(Messages::WebPageProxy::ZoomToRect(rect, minimumScale, maximumScale));
 }
 
+#if ENABLE(IOS_TOUCH_EVENTS)
 void WebPage::dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue)
 {
     bool ignored;
     for (const WebTouchEvent& event : queue)
         dispatchTouchEvent(event, ignored);
 }
+#endif
 
 void WebPage::computePagesForPrintingAndStartDrawingToPDF(uint64_t frameID, const PrintInfo& printInfo, uint32_t firstPage, PassRefPtr<Messages::WebPage::ComputePagesForPrintingAndStartDrawingToPDF::DelayedReply> reply)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to