Title: [173258] trunk/Source
Revision
173258
Author
[email protected]
Date
2014-09-04 08:42:54 -0700 (Thu, 04 Sep 2014)

Log Message

[iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
https://bugs.webkit.org/show_bug.cgi?id=136494

Reviewed by Andy Estes.

Source/WebCore:

* WebCore.exp.in: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. Also, sort this file using
the script Tools/Scripts/sort-export-file.
* bindings/js/JSDocumentCustom.cpp: Add ENABLE(TOUCH_EVENTS)-guard around headers JSTouch.h and JSTouchList.h.
* page/ios/WebEventRegion.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS) since this
code is specific to the iOS touch machinery.
* page/scrolling/ScrollingCoordinator.cpp: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards.
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).
* platform/ios/ScrollAnimatorIOS.h: Add ENABLE(TOUCH_EVENTS) guard.
* platform/ios/ScrollAnimatorIOS.mm:
(WebCore::ScrollAnimatorIOS::ScrollAnimatorIOS): Ditto.
* platform/ios/wak/WAKResponder.h: Ditto.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Add ENABLE(IOS_TOUCH_EVENTS) guard.
(WebCore::RenderLayer::~RenderLayer): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS) since this
code is specific to the iOS touch machinery.
* rendering/RenderLayer.h: Add ENABLE(IOS_TOUCH_EVENTS) guard.

Source/WebKit/mac:

* MigrateHeaders.make: Migrate header WebEventRegion.h only when ENABLE_IOS_TOUCH_EVENTS is defined.
* WebView/WebView.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173257 => 173258)


--- trunk/Source/WebCore/ChangeLog	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/ChangeLog	2014-09-04 15:42:54 UTC (rev 173258)
@@ -1,3 +1,27 @@
+2014-09-04  Daniel Bates  <[email protected]>
+
+        [iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
+        https://bugs.webkit.org/show_bug.cgi?id=136494
+
+        Reviewed by Andy Estes.
+
+        * WebCore.exp.in: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. Also, sort this file using
+        the script Tools/Scripts/sort-export-file.
+        * bindings/js/JSDocumentCustom.cpp: Add ENABLE(TOUCH_EVENTS)-guard around headers JSTouch.h and JSTouchList.h.
+        * page/ios/WebEventRegion.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS) since this
+        code is specific to the iOS touch machinery.
+        * page/scrolling/ScrollingCoordinator.cpp: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. 
+        (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).
+        * platform/ios/ScrollAnimatorIOS.h: Add ENABLE(TOUCH_EVENTS) guard.
+        * platform/ios/ScrollAnimatorIOS.mm:
+        (WebCore::ScrollAnimatorIOS::ScrollAnimatorIOS): Ditto.
+        * platform/ios/wak/WAKResponder.h: Ditto.
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::RenderLayer): Add ENABLE(IOS_TOUCH_EVENTS) guard.
+        (WebCore::RenderLayer::~RenderLayer): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS) since this
+        code is specific to the iOS touch machinery.
+        * rendering/RenderLayer.h: Add ENABLE(IOS_TOUCH_EVENTS) guard.
+
 2014-09-04  Carlos Alberto Lopez Perez  <[email protected]>
 
         REGRESSION(r173240) [GTK] Debug build broken.

Modified: trunk/Source/WebCore/WebCore.exp.in (173257 => 173258)


--- trunk/Source/WebCore/WebCore.exp.in	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-09-04 15:42:54 UTC (rev 173258)
@@ -2468,7 +2468,6 @@
 .objc_class_name_WAKView
 .objc_class_name_WAKWindow
 .objc_class_name_WebEvent
-.objc_class_name_WebEventRegion
 _InitWebCoreThreadSystemInterface
 _NSApp
 _WAKViewDidScrollNotification
@@ -2549,10 +2548,8 @@
 __ZN7WebCore12AudioSession11setCategoryENS0_12CategoryTypeE
 __ZN7WebCore12AudioSession13sharedSessionEv
 __ZN7WebCore12EventHandler10mouseMovedEP8WebEvent
-__ZN7WebCore12EventHandler10touchEventEP8WebEvent
 __ZN7WebCore12EventHandler10wheelEventEP8WebEvent
 __ZN7WebCore12EventHandler15sendScrollEventEv
-__ZN7WebCore12EventHandler16handleTouchEventERKNS_18PlatformTouchEventE
 __ZN7WebCore12EventHandler7mouseUpEP8WebEvent
 __ZN7WebCore12EventHandler8keyEventEP8WebEvent
 __ZN7WebCore12EventHandler9mouseDownEP8WebEvent
@@ -2729,7 +2726,6 @@
 __ZN7WebCore6Editor59ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTypingEv
 __ZN7WebCore6Widget17setPlatformWidgetEP7WAKView
 __ZN7WebCore6WidgetC2EP7WAKView
-__ZN7WebCore8Document13getTouchRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEE
 __ZN7WebCore8Document19dispatchWindowEventEN3WTF10PassRefPtrINS_5EventEEENS2_INS_11EventTargetEEE
 __ZN7WebCore8IntPointC1ERK7CGPoint
 __ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEENS0_10AnchorTypeE
@@ -3238,6 +3234,12 @@
 __ZN7WebCore12RenderObject19resetTextAutosizingEv
 #endif
 
+#if ENABLE(IOS_TOUCH_EVENTS)
+.objc_class_name_WebEventRegion
+__ZN7WebCore12EventHandler10touchEventEP8WebEvent
+__ZN7WebCore8Document13getTouchRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEE
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
 __ZN7WebCore12SourceBuffer25bufferedSamplesForTrackIDERKN3WTF12AtomicStringE
 __ZN7WebCore14toSourceBufferEN3JSC7JSValueE
@@ -3397,6 +3399,10 @@
 __ZTVN7WebCore25PlatformSpeechSynthesizerE
 #endif
 
+#if ENABLE(TOUCH_EVENTS)
+__ZN7WebCore12EventHandler16handleTouchEventERKNS_18PlatformTouchEventE
+#endif
+
 #if ENABLE(VIDEO)
 .objc_class_name_WebVideoFullscreenController
 __ZN7WebCore10TimeRanges3addEdd

Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (173257 => 173258)


--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp	2014-09-04 15:42:54 UTC (rev 173258)
@@ -25,23 +25,26 @@
 #include "FrameLoader.h"
 #include "HTMLDocument.h"
 #include "JSCanvasRenderingContext2D.h"
-#if ENABLE(WEBGL)
-#include "JSWebGLRenderingContext.h"
-#endif
 #include "JSDOMWindowCustom.h"
 #include "JSHTMLDocument.h"
 #include "JSLocation.h"
 #include "JSSVGDocument.h"
-#include "JSTouch.h"
-#include "JSTouchList.h"
 #include "Location.h"
 #include "NodeTraversal.h"
 #include "ScriptController.h"
 #include "SVGDocument.h"
 #include "TouchList.h"
-
 #include <wtf/GetPtr.h>
 
+#if ENABLE(WEBGL)
+#include "JSWebGLRenderingContext.h"
+#endif
+
+#if ENABLE(TOUCH_EVENTS)
+#include "JSTouch.h"
+#include "JSTouchList.h"
+#endif
+
 using namespace JSC;
 
 namespace WebCore {

Modified: trunk/Source/WebCore/page/ios/WebEventRegion.mm (173257 => 173258)


--- trunk/Source/WebCore/page/ios/WebEventRegion.mm	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/page/ios/WebEventRegion.mm	2014-09-04 15:42:54 UTC (rev 173258)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "WebEventRegion.h"
  
-#if ENABLE(TOUCH_EVENTS)
+#if ENABLE(IOS_TOUCH_EVENTS)
 
 #import "FloatQuad.h"
 
@@ -105,4 +105,4 @@
 
 @end
 
-#endif // ENABLE(TOUCH_EVENTS)
+#endif // ENABLE(IOS_TOUCH_EVENTS)

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (173257 => 173258)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2014-09-04 15:42:54 UTC (rev 173258)
@@ -98,7 +98,7 @@
 
 Region ScrollingCoordinator::computeNonFastScrollableRegion(const Frame* frame, const IntPoint& frameLocation) const
 {
-#if PLATFORM(IOS)
+#if ENABLE(IOS_TOUCH_EVENTS)
     // On iOS, we use nonFastScrollableRegion to represent the region covered by elements with touch event handlers.
     ASSERT(frame->isMainFrame());
     UNUSED_PARAM(frameLocation);

Modified: trunk/Source/WebCore/platform/ios/ScrollAnimatorIOS.h (173257 => 173258)


--- trunk/Source/WebCore/platform/ios/ScrollAnimatorIOS.h	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/platform/ios/ScrollAnimatorIOS.h	2014-09-04 15:42:54 UTC (rev 173258)
@@ -44,6 +44,7 @@
 #endif
 
 private:
+#if ENABLE(TOUCH_EVENTS)
     void determineScrollableAreaForTouchSequence(const IntSize& touchDelta);
 
     // State for handling sequences of touches in defaultTouchEventHandler.
@@ -63,6 +64,7 @@
     // When we're in a touch sequence, this will point to the scrollable area that
     // should actually be scrolled during the sequence.
     ScrollableArea* m_scrollableAreaForTouchSequence;
+#endif
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/ios/ScrollAnimatorIOS.mm (173257 => 173258)


--- trunk/Source/WebCore/platform/ios/ScrollAnimatorIOS.mm	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/platform/ios/ScrollAnimatorIOS.mm	2014-09-04 15:42:54 UTC (rev 173258)
@@ -28,11 +28,14 @@
 
 #include "Frame.h"
 #include "Page.h"
-#include "PlatformTouchEventIOS.h"
 #include "RenderLayer.h"
 #include "ScrollableArea.h"
 #include <wtf/PassOwnPtr.h>
 
+#if ENABLE(TOUCH_EVENTS)
+#include "PlatformTouchEventIOS.h"
+#endif
+
 using namespace WebCore;
 
 namespace WebCore {
@@ -44,11 +47,13 @@
 
 ScrollAnimatorIOS::ScrollAnimatorIOS(ScrollableArea* scrollableArea)
     : ScrollAnimator(scrollableArea)
+#if ENABLE(TOUCH_EVENTS)
     , m_touchScrollAxisLatch(AxisLatchNotComputed)
     , m_inTouchSequence(false)
     , m_committedToScrollAxis(false)
     , m_startedScroll(false)
     , m_scrollableAreaForTouchSequence(0)
+#endif
 {
 }
 
@@ -56,6 +61,7 @@
 {
 }
 
+#if ENABLE(TOUCH_EVENTS)
 bool ScrollAnimatorIOS::handleTouchEvent(const PlatformTouchEvent& touchEvent)
 {
     if (touchEvent.type() == PlatformEvent::TouchStart && touchEvent.touchCount() == 1) {
@@ -180,5 +186,6 @@
     ASSERT(scrollableArea);
     m_scrollableAreaForTouchSequence = scrollableArea;
 }
+#endif
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/ios/wak/WAKResponder.h (173257 => 173258)


--- trunk/Source/WebCore/platform/ios/wak/WAKResponder.h	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/platform/ios/wak/WAKResponder.h	2014-09-04 15:42:54 UTC (rev 173258)
@@ -46,7 +46,9 @@
 - (void)mouseExited:(WebEvent *)theEvent;
 - (void)keyDown:(WebEvent *)event;
 - (void)keyUp:(WebEvent *)event;
+#if ENABLE(TOUCH_EVENTS)
 - (void)touch:(WebEvent *)event;
+#endif
 
 - (void)insertText:(NSString *)text;
 

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (173257 => 173258)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2014-09-04 15:42:54 UTC (rev 173258)
@@ -176,7 +176,11 @@
     , m_viewportConstrainedNotCompositedReason(NoNotCompositedReason)
 #if PLATFORM(IOS)
     , m_adjustForIOSCaretWhenScrolling(false)
+#endif
+#if PLATFORM(IOS)
+#if ENABLE(IOS_TOUCH_EVENTS)
     , m_registeredAsTouchEventListenerForScrolling(false)
+#endif
     , m_inUserScroll(false)
     , m_requiresScrollBoundsOriginUpdate(false)
 #endif
@@ -235,7 +239,7 @@
     renderer().view().frameView().removeScrollableArea(this);
 
     if (!renderer().documentBeingDestroyed()) {
-#if PLATFORM(IOS)
+#if ENABLE(IOS_TOUCH_EVENTS)
         unregisterAsTouchEventListenerForScrolling();
 #endif
         if (Element* element = renderer().element())
@@ -2065,7 +2069,9 @@
     return ScrollableArea::handleTouchEvent(touchEvent);
 }
 #endif
+#endif // PLATFORM(IOS)
 
+#if ENABLE(IOS_TOUCH_EVENTS)
 void RenderLayer::registerAsTouchEventListenerForScrolling()
 {
     if (!renderer().element() || m_registeredAsTouchEventListenerForScrolling)
@@ -2083,7 +2089,7 @@
     renderer().document().removeTouchEventListener(renderer().element());
     m_registeredAsTouchEventListenerForScrolling = false;
 }
-#endif // PLATFORM(IOS)
+#endif // ENABLE(IOS_TOUCH_EVENTS)
 
 bool RenderLayer::usesCompositedScrolling() const
 {
@@ -6576,7 +6582,7 @@
     if (addedOrRemoved)
         updateNeedsCompositedScrolling();
 
-#if PLATFORM(IOS)
+#if ENABLE(IOS_TOUCH_EVENTS)
     if (addedOrRemoved) {
         if (isScrollable && !hasAcceleratedTouchScrolling())
             registerAsTouchEventListenerForScrolling();

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (173257 => 173258)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2014-09-04 15:42:54 UTC (rev 173258)
@@ -1257,7 +1257,9 @@
 
 #if PLATFORM(IOS)
     bool m_adjustForIOSCaretWhenScrolling : 1;
+#if ENABLE(IOS_TOUCH_EVENTS)
     bool m_registeredAsTouchEventListenerForScrolling : 1;
+#endif
     bool m_inUserScroll : 1;
     bool m_requiresScrollBoundsOriginUpdate : 1;
 #endif

Modified: trunk/Source/WebKit/mac/ChangeLog (173257 => 173258)


--- trunk/Source/WebKit/mac/ChangeLog	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-09-04 15:42:54 UTC (rev 173258)
@@ -1,3 +1,13 @@
+2014-09-04  Daniel Bates  <[email protected]>
+
+        [iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
+        https://bugs.webkit.org/show_bug.cgi?id=136494
+
+        Reviewed by Andy Estes.
+
+        * MigrateHeaders.make: Migrate header WebEventRegion.h only when ENABLE_IOS_TOUCH_EVENTS is defined.
+        * WebView/WebView.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).
+
 2014-09-02  Brian J. Burg  <[email protected]>
 
         Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient

Modified: trunk/Source/WebKit/mac/MigrateHeaders.make (173257 => 173258)


--- trunk/Source/WebKit/mac/MigrateHeaders.make	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebKit/mac/MigrateHeaders.make	2014-09-04 15:42:54 UTC (rev 173258)
@@ -215,8 +215,7 @@
     $(PRIVATE_HEADERS_DIR)/WebCoreThread.h \
     $(PRIVATE_HEADERS_DIR)/WebCoreThreadMessage.h \
     $(PRIVATE_HEADERS_DIR)/WebCoreThreadRun.h \
-    $(PRIVATE_HEADERS_DIR)/WebEvent.h \
-    $(PRIVATE_HEADERS_DIR)/WebEventRegion.h
+    $(PRIVATE_HEADERS_DIR)/WebEvent.h
 
 # Special case WAKScrollView.h, which contains the protocol named
 # <WebCoreFrameScrollView> and shouldn't be changed by the default rule.
@@ -232,6 +231,11 @@
     $(PRIVATE_HEADERS_DIR)/DOMTouchList.h
 endif
 
+ifeq ($(findstring ENABLE_IOS_TOUCH_EVENTS, $(FEATURE_DEFINES)), ENABLE_IOS_TOUCH_EVENTS)
+all : \
+    $(PRIVATE_HEADERS_DIR)/WebEventRegion.h
+endif
+
 ifeq ($(findstring ENABLE_IOS_GESTURE_EVENTS, $(FEATURE_DEFINES)), ENABLE_IOS_GESTURE_EVENTS)
 all : \
     $(PRIVATE_HEADERS_DIR)/DOMGestureEvent.h

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (173257 => 173258)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2014-09-04 11:14:18 UTC (rev 173257)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2014-09-04 15:42:54 UTC (rev 173258)
@@ -274,7 +274,7 @@
 #include <WebCore/QuickLook.h>
 #endif
 
-#if ENABLE(TOUCH_EVENTS)
+#if ENABLE(IOS_TOUCH_EVENTS)
 #import <WebCore/WebEventRegion.h>
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to