Add USE(LIBWPE) for WebKit events
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Nov 2018 01:11:01 +0000 (01:11 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Nov 2018 01:11:01 +0000 (01:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191842

Reviewed by Michael Catanzaro.

Moves all WPE events to USE(LIBWPE) instead of PLATFORM(WPE). Updates
filenames to LibWPE.

* PlatformWPE.cmake:
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* Shared/WebEvent.h:
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
* Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebKeyboardEventWPE.cpp.
* Shared/libwpe/NativeWebMouseEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebMouseEventWPE.cpp.
* Shared/libwpe/NativeWebTouchEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebTouchEventWPE.cpp.
* Shared/libwpe/NativeWebWheelEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebWheelEventWPE.cpp.
* Shared/libwpe/WebEventFactory.cpp: Renamed from Source/WebKit/Shared/wpe/WebEventFactory.cpp.
* Shared/libwpe/WebEventFactory.h: Renamed from Source/WebKit/Shared/wpe/WebEventFactory.h.
* SourcesWPE.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238384 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/WebKit/ChangeLog
Source/WebKit/PlatformWPE.cmake
Source/WebKit/Shared/NativeWebKeyboardEvent.h
Source/WebKit/Shared/NativeWebMouseEvent.h
Source/WebKit/Shared/NativeWebTouchEvent.h
Source/WebKit/Shared/NativeWebWheelEvent.h
Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKit/Shared/WebEvent.h
Source/WebKit/Shared/WebKeyboardEvent.cpp
Source/WebKit/Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp [moved from Source/WebKit/Shared/wpe/NativeWebKeyboardEventWPE.cpp with 100% similarity]
Source/WebKit/Shared/libwpe/NativeWebMouseEventLibWPE.cpp [moved from Source/WebKit/Shared/wpe/NativeWebMouseEventWPE.cpp with 100% similarity]
Source/WebKit/Shared/libwpe/NativeWebTouchEventLibWPE.cpp [moved from Source/WebKit/Shared/wpe/NativeWebTouchEventWPE.cpp with 97% similarity]
Source/WebKit/Shared/libwpe/NativeWebWheelEventLibWPE.cpp [moved from Source/WebKit/Shared/wpe/NativeWebWheelEventWPE.cpp with 100% similarity]
Source/WebKit/Shared/libwpe/WebEventFactory.cpp [moved from Source/WebKit/Shared/wpe/WebEventFactory.cpp with 99% similarity]
Source/WebKit/Shared/libwpe/WebEventFactory.h [moved from Source/WebKit/Shared/wpe/WebEventFactory.h with 96% similarity]
Source/WebKit/SourcesWPE.txt

index bcdafc4..edec80c 100644 (file)
@@ -1,3 +1,31 @@
+2018-11-19  Don Olmstead  <don.olmstead@sony.com>
+
+        Add USE(LIBWPE) for WebKit events
+        https://bugs.webkit.org/show_bug.cgi?id=191842
+
+        Reviewed by Michael Catanzaro.
+
+        Moves all WPE events to USE(LIBWPE) instead of PLATFORM(WPE). Updates
+        filenames to LibWPE.
+
+        * PlatformWPE.cmake:
+        * Shared/NativeWebKeyboardEvent.h:
+        * Shared/NativeWebMouseEvent.h:
+        * Shared/NativeWebTouchEvent.h:
+        * Shared/NativeWebWheelEvent.h:
+        * Shared/WebCoreArgumentCoders.cpp:
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/WebEvent.h:
+        * Shared/WebKeyboardEvent.cpp:
+        (WebKit::WebKeyboardEvent::WebKeyboardEvent):
+        * Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebKeyboardEventWPE.cpp.
+        * Shared/libwpe/NativeWebMouseEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebMouseEventWPE.cpp.
+        * Shared/libwpe/NativeWebTouchEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebTouchEventWPE.cpp.
+        * Shared/libwpe/NativeWebWheelEventLibWPE.cpp: Renamed from Source/WebKit/Shared/wpe/NativeWebWheelEventWPE.cpp.
+        * Shared/libwpe/WebEventFactory.cpp: Renamed from Source/WebKit/Shared/wpe/WebEventFactory.cpp.
+        * Shared/libwpe/WebEventFactory.h: Renamed from Source/WebKit/Shared/wpe/WebEventFactory.h.
+        * SourcesWPE.txt:
+
 2018-11-19  David Quesada  <david_quesada@apple.com>
 
         EXC_BAD_ACCESS when invoking a DownloadProxy's destination decision handler after the download has been canceled
index d2bfd8e..e6ee84e 100644 (file)
@@ -245,9 +245,9 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/Shared/CoordinatedGraphics"
     "${WEBKIT_DIR}/Shared/CoordinatedGraphics/threadedcompositor"
     "${WEBKIT_DIR}/Shared/glib"
+    "${WEBKIT_DIR}/Shared/libwpe"
     "${WEBKIT_DIR}/Shared/soup"
     "${WEBKIT_DIR}/Shared/unix"
-    "${WEBKIT_DIR}/Shared/wpe"
     "${WEBKIT_DIR}/UIProcess/API/C/cairo"
     "${WEBKIT_DIR}/UIProcess/API/C/wpe"
     "${WEBKIT_DIR}/UIProcess/API/glib"
index 0befd54..0a8c93b 100644 (file)
@@ -52,7 +52,7 @@ typedef union _GdkEvent GdkEvent;
 OBJC_CLASS WebEvent;
 #endif
 
-#if PLATFORM(WPE)
+#if USE(LIBWPE)
 struct wpe_input_keyboard_event;
 #endif
 
@@ -71,7 +71,7 @@ public:
     NativeWebKeyboardEvent(GdkEvent*, const WebCore::CompositionResults&, InputMethodFilter::EventFakedForComposition, Vector<String>&& commands);
 #elif PLATFORM(IOS_FAMILY)
     NativeWebKeyboardEvent(::WebEvent *);
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
     NativeWebKeyboardEvent(struct wpe_input_keyboard_event*);
 #elif PLATFORM(WIN)
     NativeWebKeyboardEvent(HWND, UINT message, WPARAM, LPARAM);
index f6d2962..bbddd94 100644 (file)
@@ -43,7 +43,7 @@ typedef union _GdkEvent GdkEvent;
 OBJC_CLASS WebEvent;
 #endif
 
-#if PLATFORM(WPE)
+#if USE(LIBWPE)
 struct wpe_input_pointer_event;
 #endif
 
@@ -63,7 +63,7 @@ public:
     NativeWebMouseEvent(GdkEvent*, int);
 #elif PLATFORM(IOS_FAMILY)
     NativeWebMouseEvent(::WebEvent *);
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
     NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor);
 #elif PLATFORM(WIN)
     NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool);
index 0801c25..3b7cedb 100644 (file)
@@ -34,7 +34,7 @@
 struct _UIWebTouchEvent;
 #elif PLATFORM(GTK)
 #include <WebCore/GUniquePtrGtk.h>
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
 #include <wpe/wpe.h>
 #endif
 
@@ -48,7 +48,7 @@ public:
     NativeWebTouchEvent(GdkEvent*, Vector<WebPlatformTouchPoint>&&);
     NativeWebTouchEvent(const NativeWebTouchEvent&);
     const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
     NativeWebTouchEvent(struct wpe_input_touch_event*, float deviceScaleFactor);
     const struct wpe_input_touch_event_raw* nativeFallbackTouchPoint() const { return &m_fallbackTouchPoint; }
 #elif PLATFORM(WIN)
@@ -62,7 +62,7 @@ private:
 
 #if PLATFORM(GTK)
     GUniquePtr<GdkEvent> m_nativeEvent;
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
     struct wpe_input_touch_event_raw m_fallbackTouchPoint;
 #endif
 };
index 8bdf5e7..148d709 100644 (file)
@@ -38,7 +38,7 @@ OBJC_CLASS NSView;
 typedef union _GdkEvent GdkEvent;
 #endif
 
-#if PLATFORM(WPE)
+#if USE(LIBWPE)
 struct wpe_input_axis_event;
 #endif
 
@@ -56,7 +56,7 @@ public:
     NativeWebWheelEvent(const NativeWebWheelEvent&);
     NativeWebWheelEvent(GdkEvent*);
     NativeWebWheelEvent(GdkEvent*, WebWheelEvent::Phase, WebWheelEvent::Phase momentumPhase);
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
     NativeWebWheelEvent(struct wpe_input_axis_event*, float deviceScaleFactor);
 #elif PLATFORM(WIN)
     NativeWebWheelEvent(HWND, UINT message, WPARAM, LPARAM);
index ac4d9be..96aa4e9 100644 (file)
@@ -1826,7 +1826,7 @@ bool ArgumentCoder<PasteboardImage>::decode(Decoder& decoder, PasteboardImage& p
 
 #endif
 
-#if PLATFORM(WPE)
+#if USE(LIBWPE)
 void ArgumentCoder<PasteboardWebContent>::encode(Encoder& encoder, const PasteboardWebContent& content)
 {
     encoder << content.text;
@@ -1841,7 +1841,7 @@ bool ArgumentCoder<PasteboardWebContent>::decode(Decoder& decoder, PasteboardWeb
         return false;
     return true;
 }
-#endif // PLATFORM(WPE)
+#endif // USE(LIBWPE)
 
 void ArgumentCoder<DictationAlternative>::encode(Encoder& encoder, const DictationAlternative& dictationAlternative)
 {
index 5958db1..0dfb6e8 100644 (file)
@@ -148,7 +148,7 @@ struct DataListSuggestionInformation;
 struct SoupNetworkProxySettings;
 #endif
 
-#if PLATFORM(WPE)
+#if USE(LIBWPE)
 struct PasteboardWebContent;
 #endif
 
@@ -446,7 +446,7 @@ template<> struct ArgumentCoder<WebCore::SoupNetworkProxySettings> {
 };
 #endif
 
-#if PLATFORM(WPE)
+#if USE(LIBWPE)
 template<> struct ArgumentCoder<WebCore::PasteboardWebContent> {
     static void encode(Encoder&, const WebCore::PasteboardWebContent&);
     static bool decode(Decoder&, WebCore::PasteboardWebContent&);
index 1c96858..6c18f8c 100644 (file)
@@ -258,7 +258,7 @@ public:
     WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Vector<String>&& commands, bool isKeypad, Modifiers, WallTime timestamp);
 #elif PLATFORM(IOS_FAMILY)
     WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, Modifiers, WallTime timestamp);
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
     WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isKeypad, Modifiers, WallTime timestamp);
 #else
     WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, Modifiers, WallTime timestamp);
index b2d412f..e9c05d3 100644 (file)
@@ -104,14 +104,18 @@ WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String&
     ASSERT(isKeyboardEventType(type));
 }
 
-#elif PLATFORM(WPE)
+#elif USE(LIBWPE)
 
 WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isKeypad, Modifiers modifiers, WallTime timestamp)
     : WebEvent(type, modifiers, timestamp)
     , m_text(text)
     , m_unmodifiedText(text)
+#if ENABLE(KEYBOARD_KEY_ATTRIBUTE)
     , m_key(key)
+#endif
+#if ENABLE(KEYBOARD_CODE_ATTRIBUTE)
     , m_code(code)
+#endif
     , m_keyIdentifier(keyIdentifier)
     , m_windowsVirtualKeyCode(windowsVirtualKeyCode)
     , m_nativeVirtualKeyCode(nativeVirtualKeyCode)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "NativeWebTouchEvent.h"
 
+#if ENABLE(TOUCH_EVENTS)
+
 #include "WebEventFactory.h"
 
 namespace WebKit {
@@ -44,3 +46,5 @@ NativeWebTouchEvent::NativeWebTouchEvent(struct wpe_input_touch_event* event, fl
 }
 
 } // namespace WebKit
+
+#endif // PLATFORM(TOUCH_EVENTS)
@@ -179,6 +179,7 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(struct wpe_input_axis_event*
         delta, wheelTicks, WebWheelEvent::ScrollByPixelWheelEvent, static_cast<WebEvent::Modifiers>(0), wallTimeForEventTime(event->time));
 }
 
+#if ENABLE(TOUCH_EVENTS)
 static WebKit::WebPlatformTouchPoint::TouchPointState stateForTouchPoint(int mainEventId, const struct wpe_input_touch_event_raw* point)
 {
     if (point->id != mainEventId)
@@ -233,5 +234,6 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(struct wpe_input_touch_event*
 
     return WebTouchEvent(type, WTFMove(touchPoints), WebEvent::Modifiers(0), wallTimeForEventTime(event->time));
 }
+#endif // ENABLE(TOUCH_EVENTS)
 
 } // namespace WebKit
similarity index 96%
rename from Source/WebKit/Shared/wpe/WebEventFactory.h
rename to Source/WebKit/Shared/libwpe/WebEventFactory.h
index a2aa034..428599c 100644 (file)
@@ -30,7 +30,9 @@
 struct wpe_input_axis_event;
 struct wpe_input_keyboard_event;
 struct wpe_input_pointer_event;
+#if ENABLE(TOUCH_EVENTS)
 struct wpe_input_touch_event;
+#endif
 
 namespace WebKit {
 
@@ -39,7 +41,9 @@ public:
     static WebKeyboardEvent createWebKeyboardEvent(struct wpe_input_keyboard_event*);
     static WebMouseEvent createWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor);
     static WebWheelEvent createWebWheelEvent(struct wpe_input_axis_event*, float deviceScaleFactor);
+#if ENABLE(TOUCH_EVENTS)
     static WebTouchEvent createWebTouchEvent(struct wpe_input_touch_event*, float deviceScaleFactor);
+#endif
 };
 
 } // namespace WebKit
index 5bc9b3b..8ee2fef 100644 (file)
@@ -81,6 +81,12 @@ Shared/cairo/ShareableBitmapCairo.cpp
 Shared/glib/ProcessExecutablePathGLib.cpp
 Shared/glib/WebContextMenuItemGlib.cpp
 
+Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp
+Shared/libwpe/NativeWebMouseEventLibWPE.cpp
+Shared/libwpe/NativeWebTouchEventLibWPE.cpp
+Shared/libwpe/NativeWebWheelEventLibWPE.cpp
+Shared/libwpe/WebEventFactory.cpp
+
 Shared/linux/WebMemorySamplerLinux.cpp
 
 Shared/soup/WebCoreArgumentCodersSoup.cpp
@@ -88,12 +94,6 @@ Shared/soup/WebErrorsSoup.cpp
 
 Shared/unix/ChildProcessMain.cpp
 
-Shared/wpe/NativeWebKeyboardEventWPE.cpp
-Shared/wpe/NativeWebMouseEventWPE.cpp
-Shared/wpe/NativeWebTouchEventWPE.cpp
-Shared/wpe/NativeWebWheelEventWPE.cpp
-Shared/wpe/WebEventFactory.cpp
-
 UIProcess/AcceleratedDrawingAreaProxy.cpp
 UIProcess/DefaultUndoController.cpp
 UIProcess/LegacySessionStateCodingNone.cpp