Diff
Modified: trunk/Source/WebKit/ChangeLog (267915 => 267916)
--- trunk/Source/WebKit/ChangeLog 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/ChangeLog 2020-10-03 03:55:47 UTC (rev 267916)
@@ -1,3 +1,201 @@
+2020-10-02 Simon Fraser <[email protected]>
+
+ Move WebEvent subclass declarations to their own files
+ https://bugs.webkit.org/show_bug.cgi?id=217259
+
+ Reviewed by Tim Horton.
+
+ Make new header files for WebMouseEvent, WebKeyboardEvent, WebWheelEvent, WebTouchEvent and
+ fix the fallout.
+
+ * Scripts/webkit/messages.py:
+ * Shared/API/c/WKSharedAPICast.h:
+ * Shared/NativeWebGestureEvent.h:
+ * Shared/NativeWebKeyboardEvent.h:
+ * Shared/NativeWebMouseEvent.h:
+ * Shared/NativeWebTouchEvent.h:
+ * Shared/NativeWebWheelEvent.h:
+ * Shared/NavigationActionData.h:
+ * Shared/WebEvent.cpp:
+ (WebKit::WebTouchEvent::allTouchPointsAreReleased const): Deleted.
+ * Shared/WebEvent.h:
+ (WebKit::WebMouseEvent::button const): Deleted.
+ (WebKit::WebMouseEvent::buttons const): Deleted.
+ (WebKit::WebMouseEvent::position const): Deleted.
+ (WebKit::WebMouseEvent::globalPosition const): Deleted.
+ (WebKit::WebMouseEvent::deltaX const): Deleted.
+ (WebKit::WebMouseEvent::deltaY const): Deleted.
+ (WebKit::WebMouseEvent::deltaZ const): Deleted.
+ (WebKit::WebMouseEvent::clickCount const): Deleted.
+ (WebKit::WebMouseEvent::eventNumber const): Deleted.
+ (WebKit::WebMouseEvent::menuTypeForEvent const): Deleted.
+ (WebKit::WebMouseEvent::force const): Deleted.
+ (WebKit::WebMouseEvent::syntheticClickType const): Deleted.
+ (WebKit::WebWheelEvent::position const): Deleted.
+ (WebKit::WebWheelEvent::globalPosition const): Deleted.
+ (WebKit::WebWheelEvent::delta const): Deleted.
+ (WebKit::WebWheelEvent::wheelTicks const): Deleted.
+ (WebKit::WebWheelEvent::granularity const): Deleted.
+ (WebKit::WebWheelEvent::directionInvertedFromDevice const): Deleted.
+ (WebKit::WebWheelEvent::phase const): Deleted.
+ (WebKit::WebWheelEvent::momentumPhase const): Deleted.
+ (WebKit::WebWheelEvent::hasPreciseScrollingDeltas const): Deleted.
+ (WebKit::WebWheelEvent::scrollCount const): Deleted.
+ (WebKit::WebWheelEvent::unacceleratedScrollingDelta const): Deleted.
+ (WebKit::WebKeyboardEvent::text const): Deleted.
+ (WebKit::WebKeyboardEvent::unmodifiedText const): Deleted.
+ (WebKit::WebKeyboardEvent::key const): Deleted.
+ (WebKit::WebKeyboardEvent::code const): Deleted.
+ (WebKit::WebKeyboardEvent::keyIdentifier const): Deleted.
+ (WebKit::WebKeyboardEvent::windowsVirtualKeyCode const): Deleted.
+ (WebKit::WebKeyboardEvent::nativeVirtualKeyCode const): Deleted.
+ (WebKit::WebKeyboardEvent::macCharCode const): Deleted.
+ (WebKit::WebKeyboardEvent::handledByInputMethod const): Deleted.
+ (WebKit::WebKeyboardEvent::preeditUnderlines const): Deleted.
+ (WebKit::WebKeyboardEvent::preeditSelectionRange const): Deleted.
+ (WebKit::WebKeyboardEvent::commands const): Deleted.
+ (WebKit::WebKeyboardEvent::isAutoRepeat const): Deleted.
+ (WebKit::WebKeyboardEvent::isKeypad const): Deleted.
+ (WebKit::WebKeyboardEvent::isSystemKey const): Deleted.
+ (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Deleted.
+ (WebKit::WebPlatformTouchPoint::identifier const): Deleted.
+ (WebKit::WebPlatformTouchPoint::location const): Deleted.
+ (WebKit::WebPlatformTouchPoint::phase const): Deleted.
+ (WebKit::WebPlatformTouchPoint::state const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setRadiusX): Deleted.
+ (WebKit::WebPlatformTouchPoint::radiusX const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setRadiusY): Deleted.
+ (WebKit::WebPlatformTouchPoint::radiusY const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setRotationAngle): Deleted.
+ (WebKit::WebPlatformTouchPoint::rotationAngle const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setForce): Deleted.
+ (WebKit::WebPlatformTouchPoint::force const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setAltitudeAngle): Deleted.
+ (WebKit::WebPlatformTouchPoint::altitudeAngle const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setAzimuthAngle): Deleted.
+ (WebKit::WebPlatformTouchPoint::azimuthAngle const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setTouchType): Deleted.
+ (WebKit::WebPlatformTouchPoint::touchType const): Deleted.
+ (WebKit::WebTouchEvent::WebTouchEvent): Deleted.
+ (WebKit::WebTouchEvent::touchPoints const): Deleted.
+ (WebKit::WebTouchEvent::position const): Deleted.
+ (WebKit::WebTouchEvent::isPotentialTap const): Deleted.
+ (WebKit::WebTouchEvent::isGesture const): Deleted.
+ (WebKit::WebTouchEvent::gestureScale const): Deleted.
+ (WebKit::WebTouchEvent::gestureRotation const): Deleted.
+ (WebKit::WebTouchEvent::canPreventNativeGestures const): Deleted.
+ (WebKit::WebTouchEvent::setCanPreventNativeGestures): Deleted.
+ (WebKit::WebPlatformTouchPoint::id const): Deleted.
+ (WebKit::WebPlatformTouchPoint::screenPosition const): Deleted.
+ (WebKit::WebPlatformTouchPoint::position const): Deleted.
+ (WebKit::WebPlatformTouchPoint::radius const): Deleted.
+ (WebKit::WebPlatformTouchPoint::setState): Deleted.
+ * Shared/WebEventConversion.cpp:
+ * Shared/WebKeyboardEvent.cpp:
+ * Shared/WebKeyboardEvent.h: Added.
+ (WebKit::WebKeyboardEvent::text const):
+ (WebKit::WebKeyboardEvent::unmodifiedText const):
+ (WebKit::WebKeyboardEvent::key const):
+ (WebKit::WebKeyboardEvent::code const):
+ (WebKit::WebKeyboardEvent::keyIdentifier const):
+ (WebKit::WebKeyboardEvent::windowsVirtualKeyCode const):
+ (WebKit::WebKeyboardEvent::nativeVirtualKeyCode const):
+ (WebKit::WebKeyboardEvent::macCharCode const):
+ (WebKit::WebKeyboardEvent::handledByInputMethod const):
+ (WebKit::WebKeyboardEvent::preeditUnderlines const):
+ (WebKit::WebKeyboardEvent::preeditSelectionRange const):
+ (WebKit::WebKeyboardEvent::commands const):
+ (WebKit::WebKeyboardEvent::isAutoRepeat const):
+ (WebKit::WebKeyboardEvent::isKeypad const):
+ (WebKit::WebKeyboardEvent::isSystemKey const):
+ * Shared/WebMouseEvent.cpp:
+ * Shared/WebMouseEvent.h: Added.
+ (WebKit::WebMouseEvent::button const):
+ (WebKit::WebMouseEvent::buttons const):
+ (WebKit::WebMouseEvent::position const):
+ (WebKit::WebMouseEvent::globalPosition const):
+ (WebKit::WebMouseEvent::deltaX const):
+ (WebKit::WebMouseEvent::deltaY const):
+ (WebKit::WebMouseEvent::deltaZ const):
+ (WebKit::WebMouseEvent::clickCount const):
+ (WebKit::WebMouseEvent::eventNumber const):
+ (WebKit::WebMouseEvent::menuTypeForEvent const):
+ (WebKit::WebMouseEvent::force const):
+ (WebKit::WebMouseEvent::syntheticClickType const):
+ * Shared/WebTouchEvent.cpp:
+ (WebKit::WebTouchEvent::allTouchPointsAreReleased const):
+ * Shared/WebTouchEvent.h: Added.
+ (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
+ (WebKit::WebPlatformTouchPoint::identifier const):
+ (WebKit::WebPlatformTouchPoint::location const):
+ (WebKit::WebPlatformTouchPoint::phase const):
+ (WebKit::WebPlatformTouchPoint::state const):
+ (WebKit::WebPlatformTouchPoint::setRadiusX):
+ (WebKit::WebPlatformTouchPoint::radiusX const):
+ (WebKit::WebPlatformTouchPoint::setRadiusY):
+ (WebKit::WebPlatformTouchPoint::radiusY const):
+ (WebKit::WebPlatformTouchPoint::setRotationAngle):
+ (WebKit::WebPlatformTouchPoint::rotationAngle const):
+ (WebKit::WebPlatformTouchPoint::setForce):
+ (WebKit::WebPlatformTouchPoint::force const):
+ (WebKit::WebPlatformTouchPoint::setAltitudeAngle):
+ (WebKit::WebPlatformTouchPoint::altitudeAngle const):
+ (WebKit::WebPlatformTouchPoint::setAzimuthAngle):
+ (WebKit::WebPlatformTouchPoint::azimuthAngle const):
+ (WebKit::WebPlatformTouchPoint::setTouchType):
+ (WebKit::WebPlatformTouchPoint::touchType const):
+ (WebKit::WebTouchEvent::WebTouchEvent):
+ (WebKit::WebTouchEvent::touchPoints const):
+ (WebKit::WebTouchEvent::position const):
+ (WebKit::WebTouchEvent::isPotentialTap const):
+ (WebKit::WebTouchEvent::isGesture const):
+ (WebKit::WebTouchEvent::gestureScale const):
+ (WebKit::WebTouchEvent::gestureRotation const):
+ (WebKit::WebTouchEvent::canPreventNativeGestures const):
+ (WebKit::WebTouchEvent::setCanPreventNativeGestures):
+ (WebKit::WebPlatformTouchPoint::id const):
+ (WebKit::WebPlatformTouchPoint::screenPosition const):
+ (WebKit::WebPlatformTouchPoint::position const):
+ (WebKit::WebPlatformTouchPoint::radius const):
+ (WebKit::WebPlatformTouchPoint::setState):
+ * Shared/WebWheelEvent.cpp:
+ (WebKit::WebWheelEvent::WebWheelEvent):
+ * Shared/WebWheelEvent.h: Added.
+ (WebKit::WebWheelEvent::position const):
+ (WebKit::WebWheelEvent::globalPosition const):
+ (WebKit::WebWheelEvent::delta const):
+ (WebKit::WebWheelEvent::wheelTicks const):
+ (WebKit::WebWheelEvent::granularity const):
+ (WebKit::WebWheelEvent::directionInvertedFromDevice const):
+ (WebKit::WebWheelEvent::phase const):
+ (WebKit::WebWheelEvent::momentumPhase const):
+ (WebKit::WebWheelEvent::hasPreciseScrollingDeltas const):
+ (WebKit::WebWheelEvent::scrollCount const):
+ (WebKit::WebWheelEvent::unacceleratedScrollingDelta const):
+ * Shared/ios/WebIOSEventFactory.h:
+ * Shared/ios/WebPlatformTouchPointIOS.cpp:
+ * Shared/ios/WebTouchEventIOS.cpp:
+ * Shared/mac/NativeWebGestureEventMac.mm:
+ * Shared/mac/WebEventFactory.h:
+ * Shared/mac/WebGestureEvent.h:
+ * UIProcess/API/APINavigationClient.h:
+ * UIProcess/API/APIPolicyClient.h:
+ * UIProcess/Automation/SimulatedInputDispatcher.h:
+ * UIProcess/WebPageProxy.cpp:
+ * UIProcess/ios/WKMouseGestureRecognizer.mm:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
+ * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ * WebProcess/Plugins/PluginProxy.cpp:
+ * WebProcess/Plugins/PluginView.cpp:
+ * WebProcess/WebPage/EventDispatcher.cpp:
+ * WebProcess/WebPage/EventDispatcher.h:
+ * WebProcess/WebPage/PageBanner.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+
2020-10-02 Wenson Hsieh <[email protected]>
[ iOS ] ASSERTION FAILED: ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (267915 => 267916)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2020-10-03 03:55:47 UTC (rev 267916)
@@ -678,11 +678,6 @@
'WebKit::RespectSelectionAnchor': ['"GestureTypes.h"'],
'WebKit::SelectionFlags': ['"GestureTypes.h"'],
'WebKit::SelectionTouch': ['"GestureTypes.h"'],
- 'WebKit::WebGestureEvent': ['"WebEvent.h"'],
- 'WebKit::WebKeyboardEvent': ['"WebEvent.h"'],
- 'WebKit::WebMouseEvent': ['"WebEvent.h"'],
- 'WebKit::WebTouchEvent': ['"WebEvent.h"'],
- 'WebKit::WebWheelEvent': ['"WebEvent.h"'],
'WebCore::MediaEngineSupportParameters': ['<WebCore/MediaPlayer.h>'],
'WebCore::ISOWebVTTCue': ['<WebCore/ISOVTTCue.h>'],
'struct WebCore::Cookie': ['<WebCore/Cookie.h>'],
Modified: trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,8 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKSharedAPICast_h
-#define WKSharedAPICast_h
+#pragma once
#include "APIError.h"
#include "APINumber.h"
@@ -47,8 +46,8 @@
#include "WKPageVisibilityTypes.h"
#include "WKUserContentInjectedFrames.h"
#include "WKUserScriptInjectionTime.h"
-#include "WebEvent.h"
#include "WebFindOptions.h"
+#include "WebMouseEvent.h"
#include <WebCore/ContextMenuItem.h>
#include <WebCore/DiagnosticLoggingResultType.h>
#include <WebCore/FloatRect.h>
@@ -1034,5 +1033,3 @@
}
} // namespace WebKit
-
-#endif // WKSharedAPICast_h
Modified: trunk/Source/WebKit/Shared/NativeWebGestureEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/NativeWebGestureEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/NativeWebGestureEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,12 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NativeWebGestureEvent_h
-#define NativeWebGestureEvent_h
+#pragma once
#if ENABLE(MAC_GESTURE_EVENTS)
-#include "WebEvent.h"
#include "WebGestureEvent.h"
OBJC_CLASS NSEvent;
@@ -48,5 +46,3 @@
} // namespace WebKit
#endif // ENABLE(MAC_GESTURE_EVENTS)
-
-#endif // NativeWebGestureEvent_h
Modified: trunk/Source/WebKit/Shared/NativeWebKeyboardEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/NativeWebKeyboardEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/NativeWebKeyboardEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -26,19 +26,13 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NativeWebKeyboardEvent_h
-#define NativeWebKeyboardEvent_h
+#pragma once
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
#if USE(APPKIT)
#include <wtf/RetainPtr.h>
OBJC_CLASS NSView;
-
-namespace WebCore {
-struct CompositionUnderline;
-struct KeypressCommand;
-}
#endif
#if PLATFORM(GTK)
@@ -113,5 +107,3 @@
};
} // namespace WebKit
-
-#endif // NativeWebKeyboardEvent_h
Modified: trunk/Source/WebKit/Shared/NativeWebMouseEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/NativeWebMouseEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/NativeWebMouseEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,10 +23,9 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NativeWebMouseEvent_h
-#define NativeWebMouseEvent_h
+#pragma once
-#include "WebEvent.h"
+#include "WebMouseEvent.h"
#if USE(APPKIT)
#include <wtf/RetainPtr.h>
@@ -102,5 +101,3 @@
};
} // namespace WebKit
-
-#endif // NativeWebMouseEvent_h
Modified: trunk/Source/WebKit/Shared/NativeWebTouchEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/NativeWebTouchEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/NativeWebTouchEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,7 @@
#pragma once
-#include "WebEvent.h"
+#include "WebTouchEvent.h"
#if PLATFORM(IOS_FAMILY) && defined(__OBJC__)
#include <UIKit/UIKit.h>
Modified: trunk/Source/WebKit/Shared/NativeWebWheelEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/NativeWebWheelEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/NativeWebWheelEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,10 +23,9 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NativeWebWheelEvent_h
-#define NativeWebWheelEvent_h
+#pragma once
-#include "WebEvent.h"
+#include "WebWheelEvent.h"
#if USE(APPKIT)
#include <wtf/RetainPtr.h>
@@ -89,5 +88,3 @@
};
} // namespace WebKit
-
-#endif // NativeWebWheelEvent_h
Modified: trunk/Source/WebKit/Shared/NavigationActionData.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/NavigationActionData.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/NavigationActionData.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,7 @@
#pragma once
-#include "WebEvent.h"
+#include "WebMouseEvent.h"
#include <WebCore/AdClickAttribution.h>
#include <WebCore/BackForwardItemIdentifier.h>
#include <WebCore/FloatPoint.h>
Modified: trunk/Source/WebKit/Shared/WebEvent.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebEvent.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebEvent.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -62,16 +62,4 @@
return true;
}
-#if ENABLE(TOUCH_EVENTS)
-bool WebTouchEvent::allTouchPointsAreReleased() const
-{
- for (const auto& touchPoint : touchPoints()) {
- if (touchPoint.state() != WebPlatformTouchPoint::TouchReleased && touchPoint.state() != WebPlatformTouchPoint::TouchCancelled)
- return false;
- }
-
- return true;
-}
-#endif
-
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/WebEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -29,13 +29,6 @@
// FIXME: We should probably move to makeing the WebCore/PlatformFooEvents trivial classes so that
// we can use them as the event type.
-#include "EditingRange.h"
-#include <WebCore/CompositionUnderline.h>
-#include <WebCore/FloatPoint.h>
-#include <WebCore/FloatSize.h>
-#include <WebCore/IntPoint.h>
-#include <WebCore/IntSize.h>
-#include <WebCore/KeypressCommand.h>
#include <wtf/EnumTraits.h>
#include <wtf/OptionSet.h>
#include <wtf/WallTime.h>
@@ -46,12 +39,6 @@
class Encoder;
}
-#if USE(APPKIT)
-namespace WebCore {
-struct KeypressCommand;
-}
-#endif
-
namespace WebKit {
class WebEvent {
@@ -126,373 +113,6 @@
WallTime m_timestamp;
};
-// FIXME: Move this class to its own header file.
-class WebMouseEvent : public WebEvent {
-public:
- enum Button {
- LeftButton = 0,
- MiddleButton,
- RightButton,
- NoButton = -2
- };
-
- enum SyntheticClickType { NoTap, OneFingerTap, TwoFingerTap };
-
- WebMouseEvent();
-
-#if PLATFORM(MAC)
- WebMouseEvent(Type, Button, unsigned short buttons, const WebCore::IntPoint& positionInView, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<Modifier>, WallTime timestamp, double force, SyntheticClickType = NoTap, int eventNumber = -1, int menuType = 0);
-#else
- WebMouseEvent(Type, Button, unsigned short buttons, const WebCore::IntPoint& positionInView, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<Modifier>, WallTime timestamp, double force = 0, SyntheticClickType = NoTap);
-#endif
-
- Button button() const { return static_cast<Button>(m_button); }
- unsigned short buttons() const { return m_buttons; }
- const WebCore::IntPoint& position() const { return m_position; } // Relative to the view.
- const WebCore::IntPoint& globalPosition() const { return m_globalPosition; }
- float deltaX() const { return m_deltaX; }
- float deltaY() const { return m_deltaY; }
- float deltaZ() const { return m_deltaZ; }
- int32_t clickCount() const { return m_clickCount; }
-#if PLATFORM(MAC)
- int32_t eventNumber() const { return m_eventNumber; }
- int32_t menuTypeForEvent() const { return m_menuTypeForEvent; }
-#endif
- double force() const { return m_force; }
- SyntheticClickType syntheticClickType() const { return static_cast<SyntheticClickType>(m_syntheticClickType); }
-
- void encode(IPC::Encoder&) const;
- static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebMouseEvent&);
-
-private:
- static bool isMouseEventType(Type);
-
- uint32_t m_button { static_cast<uint32_t>(NoButton) };
- unsigned short m_buttons { 0 };
- WebCore::IntPoint m_position; // Relative to the view.
- WebCore::IntPoint m_globalPosition;
- float m_deltaX { 0 };
- float m_deltaY { 0 };
- float m_deltaZ { 0 };
- int32_t m_clickCount { 0 };
-#if PLATFORM(MAC)
- int32_t m_eventNumber { -1 };
- int32_t m_menuTypeForEvent { 0 };
-#endif
- double m_force { 0 };
- uint32_t m_syntheticClickType { NoTap };
-};
-
-// FIXME: Move this class to its own header file.
-class WebWheelEvent : public WebEvent {
-public:
- enum Granularity {
- ScrollByPageWheelEvent,
- ScrollByPixelWheelEvent
- };
-
- enum Phase {
- PhaseNone = 0,
- PhaseBegan = 1 << 0,
- PhaseStationary = 1 << 1,
- PhaseChanged = 1 << 2,
- PhaseEnded = 1 << 3,
- PhaseCancelled = 1 << 4,
- PhaseMayBegin = 1 << 5,
- };
-
- WebWheelEvent() = default;
-
- WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, OptionSet<Modifier>, WallTime timestamp);
-#if PLATFORM(COCOA)
- WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, bool directionInvertedFromDevice, Phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, uint32_t scrollCount, const WebCore::FloatSize& unacceleratedScrollingDelta, OptionSet<Modifier>, WallTime timestamp);
-#elif PLATFORM(GTK) || USE(LIBWPE)
- WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Phase, Phase momentumPhase, Granularity, OptionSet<Modifier>, WallTime timestamp);
-#endif
-
- const WebCore::IntPoint position() const { return m_position; }
- const WebCore::IntPoint globalPosition() const { return m_globalPosition; }
- const WebCore::FloatSize delta() const { return m_delta; }
- const WebCore::FloatSize wheelTicks() const { return m_wheelTicks; }
- Granularity granularity() const { return static_cast<Granularity>(m_granularity); }
- bool directionInvertedFromDevice() const { return m_directionInvertedFromDevice; }
- Phase phase() const { return static_cast<Phase>(m_phase); }
- Phase momentumPhase() const { return static_cast<Phase>(m_momentumPhase); }
-#if PLATFORM(COCOA)
- bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
- uint32_t scrollCount() const { return m_scrollCount; }
- const WebCore::FloatSize& unacceleratedScrollingDelta() const { return m_unacceleratedScrollingDelta; }
-#endif
-
- void encode(IPC::Encoder&) const;
- static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebWheelEvent&);
-
-private:
- static bool isWheelEventType(Type);
-
- WebCore::IntPoint m_position;
- WebCore::IntPoint m_globalPosition;
- WebCore::FloatSize m_delta;
- WebCore::FloatSize m_wheelTicks;
- uint32_t m_granularity { ScrollByPageWheelEvent };
- bool m_directionInvertedFromDevice { false };
- uint32_t m_phase { Phase::PhaseNone };
- uint32_t m_momentumPhase { Phase::PhaseNone };
-#if PLATFORM(COCOA)
- bool m_hasPreciseScrollingDeltas { false };
- uint32_t m_scrollCount { 0 };
- WebCore::FloatSize m_unacceleratedScrollingDelta;
-#endif
-};
-
-// FIXME: Move this class to its own header file.
-class WebKeyboardEvent : public WebEvent {
-public:
- WebKeyboardEvent();
- ~WebKeyboardEvent();
-
-#if USE(APPKIT)
- WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
-#elif PLATFORM(GTK)
- WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier>, 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 handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
-#elif USE(LIBWPE)
- WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
-#else
- 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, OptionSet<Modifier>, WallTime timestamp);
-#endif
-
- const String& text() const { return m_text; }
- const String& unmodifiedText() const { return m_unmodifiedText; }
- const String& key() const { return m_key; }
- const String& code() const { return m_code; }
- const String& keyIdentifier() const { return m_keyIdentifier; }
- int32_t windowsVirtualKeyCode() const { return m_windowsVirtualKeyCode; }
- int32_t nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; }
- int32_t macCharCode() const { return m_macCharCode; }
-#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK) || USE(LIBWPE)
- bool handledByInputMethod() const { return m_handledByInputMethod; }
-#endif
-#if PLATFORM(GTK) || USE(LIBWPE)
- const Optional<Vector<WebCore::CompositionUnderline>>& preeditUnderlines() const { return m_preeditUnderlines; }
- const Optional<EditingRange>& preeditSelectionRange() const { return m_preeditSelectionRange; }
-#endif
-#if USE(APPKIT)
- const Vector<WebCore::KeypressCommand>& commands() const { return m_commands; }
-#elif PLATFORM(GTK)
- const Vector<String>& commands() const { return m_commands; }
-#endif
- bool isAutoRepeat() const { return m_isAutoRepeat; }
- bool isKeypad() const { return m_isKeypad; }
- bool isSystemKey() const { return m_isSystemKey; }
-
- void encode(IPC::Encoder&) const;
- static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebKeyboardEvent&);
-
- static bool isKeyboardEventType(Type);
-
-private:
- String m_text;
- String m_unmodifiedText;
- String m_key;
- String m_code;
- String m_keyIdentifier;
- int32_t m_windowsVirtualKeyCode { 0 };
- int32_t m_nativeVirtualKeyCode { 0 };
- int32_t m_macCharCode { 0 };
-#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK) || USE(LIBWPE)
- bool m_handledByInputMethod { false };
-#endif
-#if PLATFORM(GTK) || USE(LIBWPE)
- Optional<Vector<WebCore::CompositionUnderline>> m_preeditUnderlines;
- Optional<EditingRange> m_preeditSelectionRange;
-#endif
-#if USE(APPKIT)
- Vector<WebCore::KeypressCommand> m_commands;
-#elif PLATFORM(GTK)
- Vector<String> m_commands;
-#endif
- bool m_isAutoRepeat { false };
- bool m_isKeypad { false };
- bool m_isSystemKey { false };
-};
-
-#if ENABLE(TOUCH_EVENTS)
-#if PLATFORM(IOS_FAMILY)
-class WebPlatformTouchPoint {
-public:
- enum TouchPointState {
- TouchReleased,
- TouchPressed,
- TouchMoved,
- TouchStationary,
- TouchCancelled
- };
-
- enum class TouchType {
- Direct,
- Stylus
- };
-
- WebPlatformTouchPoint() = default;
- WebPlatformTouchPoint(unsigned identifier, WebCore::IntPoint location, TouchPointState phase)
- : m_identifier(identifier)
- , m_location(location)
- , m_phase(phase)
- {
- }
-
- unsigned identifier() const { return m_identifier; }
- WebCore::IntPoint location() const { return m_location; }
- TouchPointState phase() const { return static_cast<TouchPointState>(m_phase); }
- TouchPointState state() const { return phase(); }
-
-#if ENABLE(IOS_TOUCH_EVENTS)
- void setRadiusX(double radiusX) { m_radiusX = radiusX; }
- double radiusX() const { return m_radiusX; }
- void setRadiusY(double radiusY) { m_radiusY = radiusY; }
- double radiusY() const { return m_radiusY; }
- void setRotationAngle(double rotationAngle) { m_rotationAngle = rotationAngle; }
- double rotationAngle() const { return m_rotationAngle; }
- void setForce(double force) { m_force = force; }
- double force() const { return m_force; }
- void setAltitudeAngle(double altitudeAngle) { m_altitudeAngle = altitudeAngle; }
- double altitudeAngle() const { return m_altitudeAngle; }
- void setAzimuthAngle(double azimuthAngle) { m_azimuthAngle = azimuthAngle; }
- double azimuthAngle() const { return m_azimuthAngle; }
- void setTouchType(TouchType touchType) { m_touchType = static_cast<uint32_t>(touchType); }
- TouchType touchType() const { return static_cast<TouchType>(m_touchType); }
-#endif
-
- void encode(IPC::Encoder&) const;
- static Optional<WebPlatformTouchPoint> decode(IPC::Decoder&);
-
-private:
- unsigned m_identifier { 0 };
- WebCore::IntPoint m_location;
- uint32_t m_phase { TouchReleased };
-#if ENABLE(IOS_TOUCH_EVENTS)
- double m_radiusX { 0 };
- double m_radiusY { 0 };
- double m_rotationAngle { 0 };
- double m_force { 0 };
- double m_altitudeAngle { 0 };
- double m_azimuthAngle { 0 };
- uint32_t m_touchType { static_cast<uint32_t>(TouchType::Direct) };
-#endif
-};
-
-class WebTouchEvent : public WebEvent {
-public:
- WebTouchEvent() = default;
- WebTouchEvent(WebEvent::Type type, OptionSet<Modifier> modifiers, WallTime timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isPotentialTap, bool isGesture, float gestureScale, float gestureRotation)
- : WebEvent(type, modifiers, timestamp)
- , m_touchPoints(touchPoints)
- , m_position(position)
- , m_canPreventNativeGestures(true)
- , m_isPotentialTap(isPotentialTap)
- , m_isGesture(isGesture)
- , m_gestureScale(gestureScale)
- , m_gestureRotation(gestureRotation)
- {
- ASSERT(type == TouchStart || type == TouchMove || type == TouchEnd || type == TouchCancel);
- }
-
- const Vector<WebPlatformTouchPoint>& touchPoints() const { return m_touchPoints; }
-
- WebCore::IntPoint position() const { return m_position; }
-
- bool isPotentialTap() const { return m_isPotentialTap; }
-
- bool isGesture() const { return m_isGesture; }
- float gestureScale() const { return m_gestureScale; }
- float gestureRotation() const { return m_gestureRotation; }
-
- bool canPreventNativeGestures() const { return m_canPreventNativeGestures; }
- void setCanPreventNativeGestures(bool canPreventNativeGestures) { m_canPreventNativeGestures = canPreventNativeGestures; }
-
- bool allTouchPointsAreReleased() const;
-
- void encode(IPC::Encoder&) const;
- static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebTouchEvent&);
-
-private:
- Vector<WebPlatformTouchPoint> m_touchPoints;
-
- WebCore::IntPoint m_position;
- bool m_canPreventNativeGestures { false };
- bool m_isPotentialTap { false };
- bool m_isGesture { false };
- float m_gestureScale { 0 };
- float m_gestureRotation { 0 };
-};
-#else
-// FIXME: Move this class to its own header file.
-// FIXME: Having "Platform" in the name makes it sound like this event is platform-specific or low-
-// level in some way. That doesn't seem to be the case.
-class WebPlatformTouchPoint {
-public:
- enum TouchPointState {
- TouchReleased,
- TouchPressed,
- TouchMoved,
- TouchStationary,
- TouchCancelled
- };
-
- WebPlatformTouchPoint() : m_rotationAngle(0.0), m_force(0.0) { }
-
- WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position);
-
- WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position, const WebCore::IntSize& radius, float rotationAngle = 0.0, float force = 0.0);
-
- uint32_t id() const { return m_id; }
- TouchPointState state() const { return static_cast<TouchPointState>(m_state); }
-
- const WebCore::IntPoint& screenPosition() const { return m_screenPosition; }
- const WebCore::IntPoint& position() const { return m_position; }
- const WebCore::IntSize& radius() const { return m_radius; }
- float rotationAngle() const { return m_rotationAngle; }
- float force() const { return m_force; }
-
- void setState(TouchPointState state) { m_state = state; }
-
- void encode(IPC::Encoder&) const;
- static Optional<WebPlatformTouchPoint> decode(IPC::Decoder&);
-
-private:
- uint32_t m_id;
- uint32_t m_state;
- WebCore::IntPoint m_screenPosition;
- WebCore::IntPoint m_position;
- WebCore::IntSize m_radius;
- float m_rotationAngle;
- float m_force;
-};
-
-// FIXME: Move this class to its own header file.
-class WebTouchEvent : public WebEvent {
-public:
- WebTouchEvent() { }
- WebTouchEvent(Type, Vector<WebPlatformTouchPoint>&&, OptionSet<Modifier>, WallTime timestamp);
-
- const Vector<WebPlatformTouchPoint>& touchPoints() const { return m_touchPoints; }
-
- bool allTouchPointsAreReleased() const;
-
- void encode(IPC::Encoder&) const;
- static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebTouchEvent&);
-
-private:
- static bool isTouchEventType(Type);
-
- Vector<WebPlatformTouchPoint> m_touchPoints;
-};
-
-#endif // PLATFORM(IOS_FAMILY)
-#endif // ENABLE(TOUCH_EVENTS)
-
} // namespace WebKit
namespace WTF {
@@ -508,23 +128,4 @@
>;
};
-template<> struct EnumTraits<WebKit::WebMouseEvent::Button> {
- using values = EnumValues<
- WebKit::WebMouseEvent::Button,
- WebKit::WebMouseEvent::Button::LeftButton,
- WebKit::WebMouseEvent::Button::MiddleButton,
- WebKit::WebMouseEvent::Button::RightButton,
- WebKit::WebMouseEvent::Button::NoButton
- >;
-};
-
-template<> struct EnumTraits<WebKit::WebMouseEvent::SyntheticClickType> {
- using values = EnumValues<
- WebKit::WebMouseEvent::SyntheticClickType,
- WebKit::WebMouseEvent::SyntheticClickType::NoTap,
- WebKit::WebMouseEvent::SyntheticClickType::OneFingerTap,
- WebKit::WebMouseEvent::SyntheticClickType::TwoFingerTap
- >;
-};
-
} // namespace WTF
Modified: trunk/Source/WebKit/Shared/WebEventConversion.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebEventConversion.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebEventConversion.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -26,7 +26,10 @@
#include "config.h"
#include "WebEventConversion.h"
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
+#include "WebMouseEvent.h"
+#include "WebTouchEvent.h"
+#include "WebWheelEvent.h"
#if ENABLE(MAC_GESTURE_EVENTS)
#include "WebGestureEvent.h"
Modified: trunk/Source/WebKit/Shared/WebKeyboardEvent.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebKeyboardEvent.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebKeyboardEvent.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
#include "WebCoreArgumentCoders.h"
#include <WebCore/KeypressCommand.h>
Added: trunk/Source/WebKit/Shared/WebKeyboardEvent.h (0 => 267916)
--- trunk/Source/WebKit/Shared/WebKeyboardEvent.h (rev 0)
+++ trunk/Source/WebKit/Shared/WebKeyboardEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "EditingRange.h"
+#include "WebEvent.h"
+#include <WebCore/CompositionUnderline.h>
+
+#if USE(APPKIT)
+#include <WebCore/KeypressCommand.h>
+#endif
+
+namespace WebKit {
+
+class WebKeyboardEvent : public WebEvent {
+public:
+ WebKeyboardEvent();
+ ~WebKeyboardEvent();
+
+#if USE(APPKIT)
+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
+#elif PLATFORM(GTK)
+ WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier>, 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 handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
+#elif USE(LIBWPE)
+ WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
+#else
+ 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, OptionSet<Modifier>, WallTime timestamp);
+#endif
+
+ const String& text() const { return m_text; }
+ const String& unmodifiedText() const { return m_unmodifiedText; }
+ const String& key() const { return m_key; }
+ const String& code() const { return m_code; }
+ const String& keyIdentifier() const { return m_keyIdentifier; }
+ int32_t windowsVirtualKeyCode() const { return m_windowsVirtualKeyCode; }
+ int32_t nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; }
+ int32_t macCharCode() const { return m_macCharCode; }
+#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK) || USE(LIBWPE)
+ bool handledByInputMethod() const { return m_handledByInputMethod; }
+#endif
+#if PLATFORM(GTK) || USE(LIBWPE)
+ const Optional<Vector<WebCore::CompositionUnderline>>& preeditUnderlines() const { return m_preeditUnderlines; }
+ const Optional<EditingRange>& preeditSelectionRange() const { return m_preeditSelectionRange; }
+#endif
+#if USE(APPKIT)
+ const Vector<WebCore::KeypressCommand>& commands() const { return m_commands; }
+#elif PLATFORM(GTK)
+ const Vector<String>& commands() const { return m_commands; }
+#endif
+ bool isAutoRepeat() const { return m_isAutoRepeat; }
+ bool isKeypad() const { return m_isKeypad; }
+ bool isSystemKey() const { return m_isSystemKey; }
+
+ void encode(IPC::Encoder&) const;
+ static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebKeyboardEvent&);
+
+ static bool isKeyboardEventType(Type);
+
+private:
+ String m_text;
+ String m_unmodifiedText;
+ String m_key;
+ String m_code;
+ String m_keyIdentifier;
+ int32_t m_windowsVirtualKeyCode { 0 };
+ int32_t m_nativeVirtualKeyCode { 0 };
+ int32_t m_macCharCode { 0 };
+#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK) || USE(LIBWPE)
+ bool m_handledByInputMethod { false };
+#endif
+#if PLATFORM(GTK) || USE(LIBWPE)
+ Optional<Vector<WebCore::CompositionUnderline>> m_preeditUnderlines;
+ Optional<EditingRange> m_preeditSelectionRange;
+#endif
+#if USE(APPKIT)
+ Vector<WebCore::KeypressCommand> m_commands;
+#elif PLATFORM(GTK)
+ Vector<String> m_commands;
+#endif
+ bool m_isAutoRepeat { false };
+ bool m_isKeypad { false };
+ bool m_isSystemKey { false };
+};
+
+} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/WebMouseEvent.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebMouseEvent.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebMouseEvent.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebMouseEvent.h"
#include "WebCoreArgumentCoders.h"
Added: trunk/Source/WebKit/Shared/WebMouseEvent.h (0 => 267916)
--- trunk/Source/WebKit/Shared/WebMouseEvent.h (rev 0)
+++ trunk/Source/WebKit/Shared/WebMouseEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+// FIXME: We should probably move to makeing the WebCore/PlatformFooEvents trivial classes so that
+// we can use them as the event type.
+
+#include "WebEvent.h"
+#include <WebCore/IntPoint.h>
+
+namespace WebKit {
+
+class WebMouseEvent : public WebEvent {
+public:
+ enum Button {
+ LeftButton = 0,
+ MiddleButton,
+ RightButton,
+ NoButton = -2
+ };
+
+ enum SyntheticClickType { NoTap, OneFingerTap, TwoFingerTap };
+
+ WebMouseEvent();
+
+#if PLATFORM(MAC)
+ WebMouseEvent(Type, Button, unsigned short buttons, const WebCore::IntPoint& positionInView, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<Modifier>, WallTime timestamp, double force, SyntheticClickType = NoTap, int eventNumber = -1, int menuType = 0);
+#else
+ WebMouseEvent(Type, Button, unsigned short buttons, const WebCore::IntPoint& positionInView, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<Modifier>, WallTime timestamp, double force = 0, SyntheticClickType = NoTap);
+#endif
+
+ Button button() const { return static_cast<Button>(m_button); }
+ unsigned short buttons() const { return m_buttons; }
+ const WebCore::IntPoint& position() const { return m_position; } // Relative to the view.
+ const WebCore::IntPoint& globalPosition() const { return m_globalPosition; }
+ float deltaX() const { return m_deltaX; }
+ float deltaY() const { return m_deltaY; }
+ float deltaZ() const { return m_deltaZ; }
+ int32_t clickCount() const { return m_clickCount; }
+#if PLATFORM(MAC)
+ int32_t eventNumber() const { return m_eventNumber; }
+ int32_t menuTypeForEvent() const { return m_menuTypeForEvent; }
+#endif
+ double force() const { return m_force; }
+ SyntheticClickType syntheticClickType() const { return static_cast<SyntheticClickType>(m_syntheticClickType); }
+
+ void encode(IPC::Encoder&) const;
+ static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebMouseEvent&);
+
+private:
+ static bool isMouseEventType(Type);
+
+ uint32_t m_button { static_cast<uint32_t>(NoButton) };
+ unsigned short m_buttons { 0 };
+ WebCore::IntPoint m_position; // Relative to the view.
+ WebCore::IntPoint m_globalPosition;
+ float m_deltaX { 0 };
+ float m_deltaY { 0 };
+ float m_deltaZ { 0 };
+ int32_t m_clickCount { 0 };
+#if PLATFORM(MAC)
+ int32_t m_eventNumber { -1 };
+ int32_t m_menuTypeForEvent { 0 };
+#endif
+ double m_force { 0 };
+ uint32_t m_syntheticClickType { NoTap };
+};
+
+} // namespace WebKit
+
+namespace WTF {
+
+template<> struct EnumTraits<WebKit::WebMouseEvent::Button> {
+ using values = EnumValues<
+ WebKit::WebMouseEvent::Button,
+ WebKit::WebMouseEvent::Button::LeftButton,
+ WebKit::WebMouseEvent::Button::MiddleButton,
+ WebKit::WebMouseEvent::Button::RightButton,
+ WebKit::WebMouseEvent::Button::NoButton
+ >;
+};
+
+template<> struct EnumTraits<WebKit::WebMouseEvent::SyntheticClickType> {
+ using values = EnumValues<
+ WebKit::WebMouseEvent::SyntheticClickType,
+ WebKit::WebMouseEvent::SyntheticClickType::NoTap,
+ WebKit::WebMouseEvent::SyntheticClickType::OneFingerTap,
+ WebKit::WebMouseEvent::SyntheticClickType::TwoFingerTap
+ >;
+};
+
+} // namespace WTF
Modified: trunk/Source/WebKit/Shared/WebPlatformTouchPoint.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebPlatformTouchPoint.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebPlatformTouchPoint.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebTouchEvent.h"
#if ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/Shared/WebTouchEvent.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebTouchEvent.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebTouchEvent.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -24,14 +24,16 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebTouchEvent.h"
-#if ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS_FAMILY)
+#if ENABLE(TOUCH_EVENTS)
#include "ArgumentCoders.h"
namespace WebKit {
+#if !PLATFORM(IOS_FAMILY)
+
WebTouchEvent::WebTouchEvent(WebEvent::Type type, Vector<WebPlatformTouchPoint>&& touchPoints, OptionSet<Modifier> modifiers, WallTime timestamp)
: WebEvent(type, modifiers, timestamp)
, m_touchPoints(WTFMove(touchPoints))
@@ -61,7 +63,19 @@
{
return type == TouchStart || type == TouchMove || type == TouchEnd || type == TouchCancel;
}
-
+
+#endif // !PLATFORM(IOS_FAMILY)
+
+bool WebTouchEvent::allTouchPointsAreReleased() const
+{
+ for (const auto& touchPoint : touchPoints()) {
+ if (touchPoint.state() != WebPlatformTouchPoint::TouchReleased && touchPoint.state() != WebPlatformTouchPoint::TouchCancelled)
+ return false;
+ }
+
+ return true;
+}
+
} // namespace WebKit
-#endif // ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS_FAMILY)
+#endif // ENABLE(TOUCH_EVENTS)
Added: trunk/Source/WebKit/Shared/WebTouchEvent.h (0 => 267916)
--- trunk/Source/WebKit/Shared/WebTouchEvent.h (rev 0)
+++ trunk/Source/WebKit/Shared/WebTouchEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "WebEvent.h"
+#include <WebCore/IntPoint.h>
+
+namespace WebKit {
+
+#if ENABLE(TOUCH_EVENTS)
+#if PLATFORM(IOS_FAMILY)
+
+// FIXME: Having "Platform" in the name makes it sound like this event is platform-specific or
+// low-level in some way. That doesn't seem to be the case.
+class WebPlatformTouchPoint {
+public:
+ enum TouchPointState {
+ TouchReleased,
+ TouchPressed,
+ TouchMoved,
+ TouchStationary,
+ TouchCancelled
+ };
+
+ enum class TouchType {
+ Direct,
+ Stylus
+ };
+
+ WebPlatformTouchPoint() = default;
+ WebPlatformTouchPoint(unsigned identifier, WebCore::IntPoint location, TouchPointState phase)
+ : m_identifier(identifier)
+ , m_location(location)
+ , m_phase(phase)
+ {
+ }
+
+ unsigned identifier() const { return m_identifier; }
+ WebCore::IntPoint location() const { return m_location; }
+ TouchPointState phase() const { return static_cast<TouchPointState>(m_phase); }
+ TouchPointState state() const { return phase(); }
+
+#if ENABLE(IOS_TOUCH_EVENTS)
+ void setRadiusX(double radiusX) { m_radiusX = radiusX; }
+ double radiusX() const { return m_radiusX; }
+ void setRadiusY(double radiusY) { m_radiusY = radiusY; }
+ double radiusY() const { return m_radiusY; }
+ void setRotationAngle(double rotationAngle) { m_rotationAngle = rotationAngle; }
+ double rotationAngle() const { return m_rotationAngle; }
+ void setForce(double force) { m_force = force; }
+ double force() const { return m_force; }
+ void setAltitudeAngle(double altitudeAngle) { m_altitudeAngle = altitudeAngle; }
+ double altitudeAngle() const { return m_altitudeAngle; }
+ void setAzimuthAngle(double azimuthAngle) { m_azimuthAngle = azimuthAngle; }
+ double azimuthAngle() const { return m_azimuthAngle; }
+ void setTouchType(TouchType touchType) { m_touchType = static_cast<uint32_t>(touchType); }
+ TouchType touchType() const { return static_cast<TouchType>(m_touchType); }
+#endif
+
+ void encode(IPC::Encoder&) const;
+ static Optional<WebPlatformTouchPoint> decode(IPC::Decoder&);
+
+private:
+ unsigned m_identifier { 0 };
+ WebCore::IntPoint m_location;
+ uint32_t m_phase { TouchReleased };
+#if ENABLE(IOS_TOUCH_EVENTS)
+ double m_radiusX { 0 };
+ double m_radiusY { 0 };
+ double m_rotationAngle { 0 };
+ double m_force { 0 };
+ double m_altitudeAngle { 0 };
+ double m_azimuthAngle { 0 };
+ uint32_t m_touchType { static_cast<uint32_t>(TouchType::Direct) };
+#endif
+};
+
+class WebTouchEvent : public WebEvent {
+public:
+ WebTouchEvent() = default;
+ WebTouchEvent(WebEvent::Type type, OptionSet<Modifier> modifiers, WallTime timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isPotentialTap, bool isGesture, float gestureScale, float gestureRotation)
+ : WebEvent(type, modifiers, timestamp)
+ , m_touchPoints(touchPoints)
+ , m_position(position)
+ , m_canPreventNativeGestures(true)
+ , m_isPotentialTap(isPotentialTap)
+ , m_isGesture(isGesture)
+ , m_gestureScale(gestureScale)
+ , m_gestureRotation(gestureRotation)
+ {
+ ASSERT(type == TouchStart || type == TouchMove || type == TouchEnd || type == TouchCancel);
+ }
+
+ const Vector<WebPlatformTouchPoint>& touchPoints() const { return m_touchPoints; }
+
+ WebCore::IntPoint position() const { return m_position; }
+
+ bool isPotentialTap() const { return m_isPotentialTap; }
+
+ bool isGesture() const { return m_isGesture; }
+ float gestureScale() const { return m_gestureScale; }
+ float gestureRotation() const { return m_gestureRotation; }
+
+ bool canPreventNativeGestures() const { return m_canPreventNativeGestures; }
+ void setCanPreventNativeGestures(bool canPreventNativeGestures) { m_canPreventNativeGestures = canPreventNativeGestures; }
+
+ bool allTouchPointsAreReleased() const;
+
+ void encode(IPC::Encoder&) const;
+ static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebTouchEvent&);
+
+private:
+ Vector<WebPlatformTouchPoint> m_touchPoints;
+
+ WebCore::IntPoint m_position;
+ bool m_canPreventNativeGestures { false };
+ bool m_isPotentialTap { false };
+ bool m_isGesture { false };
+ float m_gestureScale { 0 };
+ float m_gestureRotation { 0 };
+};
+
+#else // !PLATFORM(IOS_FAMILY)
+
+class WebPlatformTouchPoint {
+public:
+ enum TouchPointState {
+ TouchReleased,
+ TouchPressed,
+ TouchMoved,
+ TouchStationary,
+ TouchCancelled
+ };
+
+ WebPlatformTouchPoint()
+ : m_rotationAngle(0.0), m_force(0.0) { }
+
+ WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position);
+
+ WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position, const WebCore::IntSize& radius, float rotationAngle = 0.0, float force = 0.0);
+
+ uint32_t id() const { return m_id; }
+ TouchPointState state() const { return static_cast<TouchPointState>(m_state); }
+
+ const WebCore::IntPoint& screenPosition() const { return m_screenPosition; }
+ const WebCore::IntPoint& position() const { return m_position; }
+ const WebCore::IntSize& radius() const { return m_radius; }
+ float rotationAngle() const { return m_rotationAngle; }
+ float force() const { return m_force; }
+
+ void setState(TouchPointState state) { m_state = state; }
+
+ void encode(IPC::Encoder&) const;
+ static Optional<WebPlatformTouchPoint> decode(IPC::Decoder&);
+
+private:
+ uint32_t m_id;
+ uint32_t m_state;
+ WebCore::IntPoint m_screenPosition;
+ WebCore::IntPoint m_position;
+ WebCore::IntSize m_radius;
+ float m_rotationAngle;
+ float m_force;
+};
+
+class WebTouchEvent : public WebEvent {
+public:
+ WebTouchEvent() { }
+ WebTouchEvent(Type, Vector<WebPlatformTouchPoint>&&, OptionSet<Modifier>, WallTime timestamp);
+
+ const Vector<WebPlatformTouchPoint>& touchPoints() const { return m_touchPoints; }
+
+ bool allTouchPointsAreReleased() const;
+
+ void encode(IPC::Encoder&) const;
+ static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebTouchEvent&);
+
+private:
+ static bool isTouchEventType(Type);
+
+ Vector<WebPlatformTouchPoint> m_touchPoints;
+};
+
+#endif // PLATFORM(IOS_FAMILY)
+#endif // ENABLE(TOUCH_EVENTS)
+
+} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/WebWheelEvent.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/WebWheelEvent.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/WebWheelEvent.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebWheelEvent.h"
#include "WebCoreArgumentCoders.h"
@@ -39,11 +39,6 @@
, m_delta(delta)
, m_wheelTicks(wheelTicks)
, m_granularity(granularity)
- , m_directionInvertedFromDevice(false)
-#if PLATFORM(COCOA)
- , m_hasPreciseScrollingDeltas(false)
- , m_scrollCount(0)
-#endif
{
ASSERT(isWheelEventType(type));
}
@@ -56,9 +51,9 @@
, m_delta(delta)
, m_wheelTicks(wheelTicks)
, m_granularity(granularity)
- , m_directionInvertedFromDevice(directionInvertedFromDevice)
, m_phase(phase)
, m_momentumPhase(momentumPhase)
+ , m_directionInvertedFromDevice(directionInvertedFromDevice)
, m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
, m_scrollCount(scrollCount)
, m_unacceleratedScrollingDelta(unacceleratedScrollingDelta)
@@ -73,7 +68,6 @@
, m_delta(delta)
, m_wheelTicks(wheelTicks)
, m_granularity(granularity)
- , m_directionInvertedFromDevice(false)
, m_phase(phase)
, m_momentumPhase(momentumPhase)
{
Added: trunk/Source/WebKit/Shared/WebWheelEvent.h (0 => 267916)
--- trunk/Source/WebKit/Shared/WebWheelEvent.h (rev 0)
+++ trunk/Source/WebKit/Shared/WebWheelEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "WebEvent.h"
+#include <WebCore/FloatSize.h>
+#include <WebCore/IntPoint.h>
+
+namespace WebKit {
+
+class WebWheelEvent : public WebEvent {
+public:
+ enum Granularity {
+ ScrollByPageWheelEvent,
+ ScrollByPixelWheelEvent
+ };
+
+ enum Phase {
+ PhaseNone = 0,
+ PhaseBegan = 1 << 0,
+ PhaseStationary = 1 << 1,
+ PhaseChanged = 1 << 2,
+ PhaseEnded = 1 << 3,
+ PhaseCancelled = 1 << 4,
+ PhaseMayBegin = 1 << 5,
+ };
+
+ WebWheelEvent() = default;
+
+ WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, OptionSet<Modifier>, WallTime timestamp);
+#if PLATFORM(COCOA)
+ WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, bool directionInvertedFromDevice, Phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, uint32_t scrollCount, const WebCore::FloatSize& unacceleratedScrollingDelta, OptionSet<Modifier>, WallTime timestamp);
+#elif PLATFORM(GTK) || USE(LIBWPE)
+ WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Phase, Phase momentumPhase, Granularity, OptionSet<Modifier>, WallTime timestamp);
+#endif
+
+ const WebCore::IntPoint position() const { return m_position; }
+ const WebCore::IntPoint globalPosition() const { return m_globalPosition; }
+ const WebCore::FloatSize delta() const { return m_delta; }
+ const WebCore::FloatSize wheelTicks() const { return m_wheelTicks; }
+ Granularity granularity() const { return static_cast<Granularity>(m_granularity); }
+ bool directionInvertedFromDevice() const { return m_directionInvertedFromDevice; }
+ Phase phase() const { return static_cast<Phase>(m_phase); }
+ Phase momentumPhase() const { return static_cast<Phase>(m_momentumPhase); }
+#if PLATFORM(COCOA)
+ bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
+ uint32_t scrollCount() const { return m_scrollCount; }
+ const WebCore::FloatSize& unacceleratedScrollingDelta() const { return m_unacceleratedScrollingDelta; }
+#endif
+
+ void encode(IPC::Encoder&) const;
+ static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebWheelEvent&);
+
+private:
+ static bool isWheelEventType(Type);
+
+ WebCore::IntPoint m_position;
+ WebCore::IntPoint m_globalPosition;
+ WebCore::FloatSize m_delta;
+ WebCore::FloatSize m_wheelTicks;
+ uint32_t m_granularity { ScrollByPageWheelEvent };
+ uint32_t m_phase { Phase::PhaseNone };
+ uint32_t m_momentumPhase { Phase::PhaseNone };
+ bool m_directionInvertedFromDevice { false };
+#if PLATFORM(COCOA)
+ bool m_hasPreciseScrollingDeltas { false };
+ uint32_t m_scrollCount { 0 };
+ WebCore::FloatSize m_unacceleratedScrollingDelta;
+#endif
+};
+
+} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/gtk/WebEventFactory.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/gtk/WebEventFactory.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/gtk/WebEventFactory.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -26,8 +26,14 @@
#pragma once
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
+#include "WebMouseEvent.h"
+#include "WebWheelEvent.h"
+#if ENABLE(TOUCH_EVENTS)
+#include "WebTouchEvent.h"
+#endif
+
#if USE(GTK4)
typedef struct _GdkEvent GdkEvent;
#else
Modified: trunk/Source/WebKit/Shared/ios/WebIOSEventFactory.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/ios/WebIOSEventFactory.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/ios/WebIOSEventFactory.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -27,7 +27,8 @@
#if PLATFORM(IOS_FAMILY)
-#import "WebEvent.h"
+#import "WebKeyboardEvent.h"
+#import "WebMouseEvent.h"
#import <UIKit/UIKit.h>
#import <WebCore/WebEvent.h>
Modified: trunk/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebTouchEvent.h"
#if ENABLE(TOUCH_EVENTS)
Modified: trunk/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp (267915 => 267916)
--- trunk/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebTouchEvent.h"
#if ENABLE(TOUCH_EVENTS)
Modified: trunk/Source/WebKit/Shared/libwpe/WebEventFactory.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/libwpe/WebEventFactory.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/libwpe/WebEventFactory.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,8 +25,14 @@
#pragma once
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
+#include "WebMouseEvent.h"
+#include "WebWheelEvent.h"
+#if ENABLE(TOUCH_EVENTS)
+#include "WebTouchEvent.h"
+#endif
+
struct wpe_input_axis_event;
struct wpe_input_keyboard_event;
struct wpe_input_pointer_event;
Modified: trunk/Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm (267915 => 267916)
--- trunk/Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm 2020-10-03 03:55:47 UTC (rev 267916)
@@ -28,7 +28,6 @@
#if ENABLE(MAC_GESTURE_EVENTS)
-#import "WebEvent.h"
#import "WebGestureEvent.h"
#import <WebCore/IntPoint.h>
#import <WebCore/PlatformEventFactoryMac.h>
Modified: trunk/Source/WebKit/Shared/mac/WebEventFactory.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/mac/WebEventFactory.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/mac/WebEventFactory.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,9 @@
#pragma once
-#import "WebEvent.h"
+#import "WebKeyboardEvent.h"
+#import "WebMouseEvent.h"
+#import "WebWheelEvent.h"
#if USE(APPKIT)
#if defined(__OBJC__)
Modified: trunk/Source/WebKit/Shared/mac/WebGestureEvent.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/mac/WebGestureEvent.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/mac/WebGestureEvent.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,8 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebGestureEvent_h
-#define WebGestureEvent_h
+#pragma once
#if ENABLE(MAC_GESTURE_EVENTS)
@@ -73,5 +72,3 @@
} // namespace WebKit
#endif // ENABLE(MAC_GESTURE_EVENTS)
-
-#endif // WebGestureEvent_h
Modified: trunk/Source/WebKit/Shared/win/WebEventFactory.h (267915 => 267916)
--- trunk/Source/WebKit/Shared/win/WebEventFactory.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/Shared/win/WebEventFactory.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -26,7 +26,14 @@
#pragma once
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
+#include "WebMouseEvent.h"
+#include "WebWheelEvent.h"
+
+#if ENABLE(TOUCH_EVENTS)
+#include "WebTouchEvent.h"
+#endif
+
#include <windows.h>
namespace WebKit {
Modified: trunk/Source/WebKit/UIProcess/API/APINavigationClient.h (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/API/APINavigationClient.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/API/APINavigationClient.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -33,7 +33,6 @@
#include "PluginModuleInfo.h"
#include "ProcessTerminationReason.h"
#include "SameDocumentNavigationType.h"
-#include "WebEvent.h"
#include "WebFramePolicyListenerProxy.h"
#include "WebsitePoliciesData.h"
#include <WebCore/FrameLoaderTypes.h>
Modified: trunk/Source/WebKit/UIProcess/API/APIPolicyClient.h (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/API/APIPolicyClient.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/API/APIPolicyClient.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,6 @@
#pragma once
-#include "WebEvent.h"
#include "WebFramePolicyListenerProxy.h"
#include <WebCore/FrameLoaderTypes.h>
#include <wtf/Forward.h>
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitPrivate.h (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitPrivate.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitPrivate.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,8 +25,8 @@
#pragma once
-#include "WebEvent.h"
#include "WebKitNavigationAction.h"
+#include "WebMouseEvent.h"
#include <WebCore/FrameLoaderTypes.h>
unsigned toPlatformModifiers(OptionSet<WebKit::WebEvent::Modifier>);
Modified: trunk/Source/WebKit/UIProcess/API/wpe/ScrollGestureController.h (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/API/wpe/ScrollGestureController.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/API/wpe/ScrollGestureController.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,7 @@
#pragma once
-#include "WebEvent.h"
+#include "WebWheelEvent.h"
#include <wpe/wpe.h>
namespace WebKit {
Modified: trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -27,8 +27,8 @@
#if ENABLE(WEBDRIVER_ACTIONS_API)
-#include "WebEvent.h"
#include <WebCore/FrameIdentifier.h>
+#include <WebCore/IntPoint.h>
#include <wtf/CompletionHandler.h>
#include <wtf/HashSet.h>
#include <wtf/Optional.h>
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -104,7 +104,6 @@
#include "WebContextMenuProxy.h"
#include "WebCoreArgumentCoders.h"
#include "WebEditCommandProxy.h"
-#include "WebEvent.h"
#include "WebEventConversion.h"
#include "WebFramePolicyListenerProxy.h"
#include "WebFullScreenManagerProxy.h"
@@ -112,6 +111,7 @@
#include "WebImage.h"
#include "WebInspectorProxy.h"
#include "WebInspectorUtilities.h"
+#include "WebKeyboardEvent.h"
#include "WebNavigationDataStore.h"
#include "WebNavigationState.h"
#include "WebNotificationManagerProxy.h"
Modified: trunk/Source/WebKit/UIProcess/gtk/PointerLockManager.h (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/gtk/PointerLockManager.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/gtk/PointerLockManager.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -25,7 +25,7 @@
#pragma once
-#include "WebEvent.h"
+#include "WebMouseEvent.h"
#include <WebCore/FloatPoint.h>
#include <wtf/Noncopyable.h>
Modified: trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm (267915 => 267916)
--- trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm 2020-10-03 03:55:47 UTC (rev 267916)
@@ -32,6 +32,7 @@
#import "UIKitSPI.h"
#import <pal/spi/ios/GraphicsServicesSPI.h>
#import <wtf/Compiler.h>
+#import <wtf/MonotonicTime.h>
#import <wtf/Optional.h>
static OptionSet<WebKit::WebEvent::Modifier> webEventModifiersForUIKeyModifierFlags(UIKeyModifierFlags flags)
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (267915 => 267916)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-10-03 03:55:47 UTC (rev 267916)
@@ -2202,6 +2202,10 @@
0F189CAB24749F2F00E58D81 /* DisplayLinkObserverID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayLinkObserverID.h; sourceTree = "<group>"; };
0F3C7257196F5F5000AEDD0C /* WKInspectorHighlightView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKInspectorHighlightView.mm; sourceTree = "<group>"; };
0F3C7259196F5F6800AEDD0C /* WKInspectorHighlightView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKInspectorHighlightView.h; sourceTree = "<group>"; };
+ 0F4000FD2527D69D00E91DA7 /* WebWheelEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebWheelEvent.h; sourceTree = "<group>"; };
+ 0F4000FE2527D6C300E91DA7 /* WebMouseEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMouseEvent.h; sourceTree = "<group>"; };
+ 0F4000FF2527D6F700E91DA7 /* WebKeyboardEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebKeyboardEvent.h; sourceTree = "<group>"; };
+ 0F4001002527D73C00E91DA7 /* WebTouchEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebTouchEvent.h; sourceTree = "<group>"; };
0F45A32F239D89A000294ABF /* WKWebViewPrivateForTestingIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivateForTestingIOS.h; sourceTree = "<group>"; };
0F45A330239D89A100294ABF /* WKWebViewTestingIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewTestingIOS.mm; sourceTree = "<group>"; };
0F45A333239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivateForTestingMac.h; sourceTree = "<group>"; };
@@ -6114,11 +6118,13 @@
BCCF6ABA12C91EF9008F9C35 /* WebImage.cpp */,
BCCF6ABB12C91EF9008F9C35 /* WebImage.h */,
C0337DD2127A2A0E008FF4F4 /* WebKeyboardEvent.cpp */,
+ 0F4000FF2527D6F700E91DA7 /* WebKeyboardEvent.h */,
BC9BA5021697C45300E44616 /* WebKit2Initialize.cpp */,
BC9BA5031697C45300E44616 /* WebKit2Initialize.h */,
905620E812BC248B000799B6 /* WebMemorySampler.cpp */,
905620E912BC248B000799B6 /* WebMemorySampler.h */,
C0337DAF127A28D0008FF4F4 /* WebMouseEvent.cpp */,
+ 0F4000FE2527D6C300E91DA7 /* WebMouseEvent.h */,
BCF69F981176CED600471A52 /* WebNavigationDataStore.h */,
C06C6093124C14430001682F /* WebPageCreationParameters.cpp */,
C06C6094124C14430001682F /* WebPageCreationParameters.h */,
@@ -6148,10 +6154,12 @@
8360349D1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp */,
8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */,
C0337DD7127A51B6008FF4F4 /* WebTouchEvent.cpp */,
+ 0F4001002527D73C00E91DA7 /* WebTouchEvent.h */,
7C065F291C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp */,
7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */,
4960A3BC23C5286400961842 /* WebViewCategory.h */,
C0337DD0127A2980008FF4F4 /* WebWheelEvent.cpp */,
+ 0F4000FD2527D69D00E91DA7 /* WebWheelEvent.h */,
);
path = Shared;
sourceTree = "<group>";
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,20 +23,19 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InjectedBundleNavigationAction_h
-#define InjectedBundleNavigationAction_h
+#pragma once
#include "APIObject.h"
#include "InjectedBundleHitTestResult.h"
#include "InjectedBundleNodeHandle.h"
-#include "WebEvent.h"
+#include "WebMouseEvent.h"
#include <WebCore/FrameLoaderTypes.h>
#include <wtf/Ref.h>
#include <wtf/RefPtr.h>
namespace WebCore {
- class FormState;
- class NavigationAction;
+class FormState;
+class NavigationAction;
}
namespace WebKit {
@@ -80,5 +79,3 @@
};
} // namespace WebKit
-
-#endif // InjectedBundleNavigationAction_h
Modified: trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm 2020-10-03 03:55:47 UTC (rev 267916)
@@ -31,7 +31,9 @@
#import "LayerTreeContext.h"
#import "NetscapeBrowserFuncs.h"
#import "PluginController.h"
-#import "WebEvent.h"
+#import "WebKeyboardEvent.h"
+#import "WebMouseEvent.h"
+#import "WebWheelEvent.h"
#import <Carbon/Carbon.h>
#import <WebCore/GraphicsContext.h>
#import <WebCore/NotImplemented.h>
Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2020-10-03 03:55:47 UTC (rev 267916)
@@ -41,10 +41,11 @@
#import "WKAccessibilityWebPageObjectMac.h"
#import "WKPageFindMatchesClient.h"
#import "WebCoreArgumentCoders.h"
-#import "WebEvent.h"
#import "WebEventConversion.h"
#import "WebFindOptions.h"
+#import "WebKeyboardEvent.h"
#import "WebLoaderStrategy.h"
+#import "WebMouseEvent.h"
#import "WebPage.h"
#import "WebPageProxyMessages.h"
#import "WebPasteboardProxyMessages.h"
Modified: trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -39,9 +39,11 @@
#include "PluginProcessConnectionManager.h"
#include "ShareableBitmap.h"
#include "WebCoreArgumentCoders.h"
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
+#include "WebMouseEvent.h"
#include "WebProcess.h"
#include "WebProcessConnectionMessages.h"
+#include "WebWheelEvent.h"
#include <WebCore/GraphicsContext.h>
#include <WebCore/SharedBuffer.h>
Modified: trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -30,11 +30,13 @@
#include "Plugin.h"
#include "ShareableBitmap.h"
#include "WebCoreArgumentCoders.h"
-#include "WebEvent.h"
+#include "WebKeyboardEvent.h"
#include "WebLoaderStrategy.h"
+#include "WebMouseEvent.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
+#include "WebWheelEvent.h"
#include <WebCore/BitmapImage.h>
#include <WebCore/Chrome.h>
#include <WebCore/CookieJar.h>
Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -27,11 +27,12 @@
#include "EventDispatcher.h"
#include "EventDispatcherMessages.h"
-#include "WebEvent.h"
#include "WebEventConversion.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
+#include "WebTouchEvent.h"
+#include "WebWheelEvent.h"
#include <WebCore/Page.h>
#include <WebCore/WheelEventTestMonitor.h>
#include <wtf/MainThread.h>
Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -51,6 +51,10 @@
class WebPage;
class WebWheelEvent;
+#if ENABLE(IOS_TOUCH_EVENTS)
+class WebTouchEvent;
+#endif
+
class EventDispatcher : public IPC::Connection::WorkQueueMessageReceiver {
public:
static Ref<EventDispatcher> create();
Modified: trunk/Source/WebKit/WebProcess/WebPage/PageBanner.h (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/PageBanner.h 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/PageBanner.h 2020-10-03 03:55:47 UTC (rev 267916)
@@ -23,11 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PageBanner_h
-#define PageBanner_h
+#pragma once
#include "APIObject.h"
-#include "WebEvent.h"
+#include "WebMouseEvent.h"
#if PLATFORM(MAC)
OBJC_CLASS CALayer;
@@ -96,5 +95,3 @@
};
} // namespace WebKit
-
-#endif // PageBanner_h
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -85,7 +85,6 @@
#include "WebDocumentLoader.h"
#include "WebDragClient.h"
#include "WebEditorClient.h"
-#include "WebEvent.h"
#include "WebEventConversion.h"
#include "WebEventFactory.h"
#include "WebFrame.h"
@@ -100,9 +99,11 @@
#include "WebInspectorMessages.h"
#include "WebInspectorUI.h"
#include "WebInspectorUIMessages.h"
+#include "WebKeyboardEvent.h"
#include "WebLoaderStrategy.h"
#include "WebMediaKeyStorageManager.h"
#include "WebMediaStrategy.h"
+#include "WebMouseEvent.h"
#include "WebNotificationClient.h"
#include "WebOpenPanelResultListener.h"
#include "WebPageCreationParameters.h"
@@ -127,11 +128,13 @@
#include "WebSocketProvider.h"
#include "WebSpeechSynthesisClient.h"
#include "WebStorageNamespaceProvider.h"
+#include "WebTouchEvent.h"
#include "WebURLSchemeHandlerProxy.h"
#include "WebUndoStep.h"
#include "WebUserContentController.h"
#include "WebUserMediaClient.h"
#include "WebValidationMessageClient.h"
+#include "WebWheelEvent.h"
#include "WebsiteDataStoreParameters.h"
#include <_javascript_Core/APICast.h>
#include <_javascript_Core/JSCInlines.h>
Modified: trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -28,8 +28,8 @@
#include "config.h"
#include "WebPage.h"
-#include "WebEvent.h"
#include "WebFrame.h"
+#include "WebKeyboardEvent.h"
#include "WebKitWebPageAccessibilityObject.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2020-10-03 03:55:47 UTC (rev 267916)
@@ -59,6 +59,7 @@
#import "WebPageProxyMessages.h"
#import "WebPreviewLoaderClient.h"
#import "WebProcess.h"
+#import "WebTouchEvent.h"
#import <CoreText/CTFont.h>
#import <WebCore/Autofill.h>
#import <WebCore/AutofillElements.h>
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2020-10-03 03:55:47 UTC (rev 267916)
@@ -43,12 +43,13 @@
#import "UserData.h"
#import "WKAccessibilityWebPageObjectMac.h"
#import "WebCoreArgumentCoders.h"
-#import "WebEvent.h"
#import "WebEventConversion.h"
#import "WebFrame.h"
#import "WebHitTestResultData.h"
#import "WebImage.h"
#import "WebInspector.h"
+#import "WebKeyboardEvent.h"
+#import "WebMouseEvent.h"
#import "WebPageOverlay.h"
#import "WebPageProxyMessages.h"
#import "WebPasteboardOverrides.h"
Modified: trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp (267915 => 267916)
--- trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp 2020-10-03 03:23:50 UTC (rev 267915)
+++ trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp 2020-10-03 03:55:47 UTC (rev 267916)
@@ -28,8 +28,8 @@
#include "WebPage.h"
#include "EditorState.h"
-#include "WebEvent.h"
#include "WebFrame.h"
+#include "WebKeyboardEvent.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
#include <WebCore/BackForwardController.h>