Changeset 230461 in webkit
- Timestamp:
- Apr 9, 2018 6:33:34 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 1 added
- 6 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r230454 r230461 1 2018-04-09 Yousuke Kimoto <yousuke.kimoto@sony.com> and Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [WinCairo] Add WebKit Shared/win event files for wincairo webkit 4 https://bugs.webkit.org/show_bug.cgi?id=183043 5 6 Reviewed by Brent Fulgham. 7 8 * Shared/NativeWebKeyboardEvent.h: 9 (WebKit::NativeWebKeyboardEvent::nativeEvent const): 10 * Shared/NativeWebMouseEvent.h: 11 (WebKit::NativeWebMouseEvent::nativeEvent const): 12 * Shared/NativeWebTouchEvent.h: 13 * Shared/NativeWebWheelEvent.h: 14 (WebKit::NativeWebWheelEvent::nativeEvent const): 15 * Shared/win/NativeWebKeyboardEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h. 16 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): 17 * Shared/win/NativeWebMouseEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h. 18 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): 19 * Shared/win/NativeWebTouchEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebTouchEvent.h. 20 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): 21 * Shared/win/NativeWebWheelEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h. 22 (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): 23 * Shared/win/WebEventFactory.cpp: Added. 24 (WebKit::relativeCursorPosition): 25 (WebKit::point): 26 (WebKit::horizontalScrollChars): 27 (WebKit::verticalScrollLines): 28 (WebKit::clickCount): 29 (WebKit::IsKeyInDownState): 30 (WebKit::modifiersForEvent): 31 (WebKit::modifiersForCurrentKeyState): 32 (WebKit::keyboardEventTypeForEvent): 33 (WebKit::isSystemKeyEvent): 34 (WebKit::isKeypadEvent): 35 (WebKit::textFromEvent): 36 (WebKit::unmodifiedTextFromEvent): 37 (WebKit::keyIdentifierFromEvent): 38 (WebKit::WebEventFactory::createWebMouseEvent): 39 (WebKit::WebEventFactory::createWebWheelEvent): 40 (WebKit::WebEventFactory::createWebKeyboardEvent): 41 (WebKit::WebEventFactory::createWebTouchEvent): 42 * Shared/win/WebEventFactory.h: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h. 43 (WebKit::createNativeEvent): 44 1 45 2018-04-09 Brent Fulgham <bfulgham@apple.com> 2 46 -
trunk/Source/WebKit/PlatformWin.cmake
r230385 r230461 19 19 Platform/win/ModuleWin.cpp 20 20 Platform/win/SharedMemoryWin.cpp 21 22 Shared/win/NativeWebKeyboardEventWin.cpp 23 Shared/win/NativeWebMouseEventWin.cpp 24 Shared/win/NativeWebTouchEventWin.cpp 25 Shared/win/NativeWebWheelEventWin.cpp 26 Shared/win/WebEventFactory.cpp 21 27 22 28 StorageProcess/win/StorageProcessMainWin.cpp -
trunk/Source/WebKit/Shared/NativeWebKeyboardEvent.h
r228496 r230461 3 3 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. 4 4 * Copyright (C) 2011, 2012 Igalia S.L 5 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 5 6 * 6 7 * Redistribution and use in source and binary forms, with or without … … 56 57 #endif 57 58 59 #if PLATFORM(WIN) 60 #include <windows.h> 61 #endif 62 58 63 namespace WebKit { 59 64 … … 69 74 #elif PLATFORM(WPE) 70 75 NativeWebKeyboardEvent(struct wpe_input_keyboard_event*); 76 #elif PLATFORM(WIN) 77 NativeWebKeyboardEvent(HWND, UINT message, WPARAM, LPARAM); 71 78 #endif 72 79 … … 79 86 #elif PLATFORM(IOS) 80 87 ::WebEvent* nativeEvent() const { return m_nativeEvent.get(); } 88 #elif PLATFORM(WIN) 89 const MSG* nativeEvent() const { return &m_nativeEvent; } 81 90 #else 82 91 const void* nativeEvent() const { return nullptr; } … … 92 101 #elif PLATFORM(IOS) 93 102 RetainPtr<::WebEvent> m_nativeEvent; 103 #elif PLATFORM(WIN) 104 MSG m_nativeEvent; 94 105 #endif 95 106 }; -
trunk/Source/WebKit/Shared/NativeWebMouseEvent.h
r228496 r230461 43 43 #endif 44 44 45 #if PLATFORM(WIN) 46 #include <windows.h> 47 #endif 48 49 45 50 namespace WebKit { 46 51 … … 54 59 #elif PLATFORM(WPE) 55 60 NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor); 61 #elif PLATFORM(WIN) 62 NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool); 56 63 #endif 57 64 … … 60 67 #elif PLATFORM(GTK) 61 68 const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 69 #elif PLATFORM(WIN) 70 const MSG* nativeEvent() const { return &m_nativeEvent; } 62 71 #else 63 72 const void* nativeEvent() const { return nullptr; } … … 69 78 #elif PLATFORM(GTK) 70 79 GUniquePtr<GdkEvent> m_nativeEvent; 80 #elif PLATFORM(WIN) 81 MSG m_nativeEvent; 71 82 #endif 72 83 }; -
trunk/Source/WebKit/Shared/NativeWebTouchEvent.h
r216497 r230461 52 52 NativeWebTouchEvent(struct wpe_input_touch_event*, float deviceScaleFactor); 53 53 const struct wpe_input_touch_event_raw* nativeFallbackTouchPoint() const { return &m_fallbackTouchPoint; } 54 #elif PLATFORM(WIN) 55 NativeWebTouchEvent(); 54 56 #endif 55 57 -
trunk/Source/WebKit/Shared/NativeWebWheelEvent.h
r228496 r230461 43 43 #endif 44 44 45 #if PLATFORM(WIN) 46 #include <windows.h> 47 #endif 48 45 49 namespace WebKit { 46 50 … … 55 59 #elif PLATFORM(WPE) 56 60 NativeWebWheelEvent(struct wpe_input_axis_event*, float deviceScaleFactor); 61 #elif PLATFORM(WIN) 62 NativeWebWheelEvent(HWND, UINT message, WPARAM, LPARAM); 57 63 #endif 58 64 … … 61 67 #elif PLATFORM(GTK) 62 68 GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 69 #elif PLATFORM(WIN) 70 const MSG* nativeEvent() const { return &m_nativeEvent; } 63 71 #else 64 72 const void* nativeEvent() const { return nullptr; } … … 70 78 #elif PLATFORM(GTK) 71 79 GUniquePtr<GdkEvent> m_nativeEvent; 80 #elif PLATFORM(WIN) 81 MSG m_nativeEvent; 72 82 #endif 73 83 }; -
trunk/Source/WebKit/Shared/win/NativeWebKeyboardEventWin.cpp
r230460 r230461 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #i fndef NativeWebMouseEvent_h27 # define NativeWebMouseEvent_h27 #include "config.h" 28 #include "NativeWebKeyboardEvent.h" 28 29 29 #include "WebEvent .h"30 #include "WebEventFactory.h" 30 31 31 #if USE(APPKIT) 32 #include <wtf/RetainPtr.h> 33 OBJC_CLASS NSView; 34 #endif 35 36 #if PLATFORM(GTK) 37 #include <WebCore/GUniquePtrGtk.h> 38 typedef union _GdkEvent GdkEvent; 39 #endif 40 41 #if PLATFORM(WPE) 42 struct wpe_input_pointer_event; 43 #endif 32 using namespace WebCore; 44 33 45 34 namespace WebKit { 46 35 47 class NativeWebMouseEvent : public WebMouseEvent { 48 public: 49 #if USE(APPKIT) 50 NativeWebMouseEvent(NSEvent *, NSEvent *lastPressureEvent, NSView *); 51 #elif PLATFORM(GTK) 52 NativeWebMouseEvent(const NativeWebMouseEvent&); 53 NativeWebMouseEvent(GdkEvent*, int); 54 #elif PLATFORM(WPE) 55 NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor); 56 #endif 57 58 #if USE(APPKIT) 59 NSEvent* nativeEvent() const { return m_nativeEvent.get(); } 60 #elif PLATFORM(GTK) 61 const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 62 #else 63 const void* nativeEvent() const { return nullptr; } 64 #endif 65 66 private: 67 #if USE(APPKIT) 68 RetainPtr<NSEvent> m_nativeEvent; 69 #elif PLATFORM(GTK) 70 GUniquePtr<GdkEvent> m_nativeEvent; 71 #endif 72 }; 36 NativeWebKeyboardEvent::NativeWebKeyboardEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 37 : WebKeyboardEvent(WebEventFactory::createWebKeyboardEvent(hwnd, message, wParam, lParam)) 38 , m_nativeEvent(createNativeEvent(hwnd, message, wParam, lParam)) 39 { 40 } 73 41 74 42 } // namespace WebKit 75 76 #endif // NativeWebMouseEvent_h -
trunk/Source/WebKit/Shared/win/NativeWebMouseEventWin.cpp
r230460 r230461 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #i fndef NativeWebMouseEvent_h27 # define NativeWebMouseEvent_h27 #include "config.h" 28 #include "NativeWebMouseEvent.h" 28 29 29 #include "WebEvent.h" 30 31 #if USE(APPKIT) 32 #include <wtf/RetainPtr.h> 33 OBJC_CLASS NSView; 34 #endif 35 36 #if PLATFORM(GTK) 37 #include <WebCore/GUniquePtrGtk.h> 38 typedef union _GdkEvent GdkEvent; 39 #endif 40 41 #if PLATFORM(WPE) 42 struct wpe_input_pointer_event; 43 #endif 30 #include "WebEventFactory.h" 44 31 45 32 namespace WebKit { 46 33 47 class NativeWebMouseEvent : public WebMouseEvent { 48 public: 49 #if USE(APPKIT) 50 NativeWebMouseEvent(NSEvent *, NSEvent *lastPressureEvent, NSView *); 51 #elif PLATFORM(GTK) 52 NativeWebMouseEvent(const NativeWebMouseEvent&); 53 NativeWebMouseEvent(GdkEvent*, int); 54 #elif PLATFORM(WPE) 55 NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor); 56 #endif 57 58 #if USE(APPKIT) 59 NSEvent* nativeEvent() const { return m_nativeEvent.get(); } 60 #elif PLATFORM(GTK) 61 const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 62 #else 63 const void* nativeEvent() const { return nullptr; } 64 #endif 65 66 private: 67 #if USE(APPKIT) 68 RetainPtr<NSEvent> m_nativeEvent; 69 #elif PLATFORM(GTK) 70 GUniquePtr<GdkEvent> m_nativeEvent; 71 #endif 72 }; 34 NativeWebMouseEvent::NativeWebMouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, bool didActivateWebView) 35 : WebMouseEvent(WebEventFactory::createWebMouseEvent(hwnd, message, wParam, lParam, didActivateWebView)) 36 , m_nativeEvent(createNativeEvent(hwnd, message, wParam, lParam)) 37 { 38 } 73 39 74 40 } // namespace WebKit 75 76 #endif // NativeWebMouseEvent_h -
trunk/Source/WebKit/Shared/win/NativeWebTouchEventWin.cpp
r230460 r230461 1 1 /* 2 * Copyright (C) 2011 Benjamin Poulain <benjamin@webkit.org> 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #i fndef NativeWebTouchEvent_h27 # define NativeWebTouchEvent_h27 #include "config.h" 28 #include "NativeWebTouchEvent.h" 28 29 29 30 #if ENABLE(TOUCH_EVENTS) 30 31 31 #include "WebEvent.h" 32 33 #if PLATFORM(IOS) 34 struct _UIWebTouchEvent; 35 #elif PLATFORM(GTK) 36 #include <WebCore/GUniquePtrGtk.h> 37 #elif PLATFORM(WPE) 38 #include <wpe/input.h> 39 #endif 32 #include "WebEventFactory.h" 40 33 41 34 namespace WebKit { 42 35 43 class NativeWebTouchEvent : public WebTouchEvent { 44 public: 45 #if PLATFORM(IOS) 46 explicit NativeWebTouchEvent(const _UIWebTouchEvent*); 47 #elif PLATFORM(GTK) 48 NativeWebTouchEvent(GdkEvent*, Vector<WebPlatformTouchPoint>&&); 49 NativeWebTouchEvent(const NativeWebTouchEvent&); 50 const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 51 #elif PLATFORM(WPE) 52 NativeWebTouchEvent(struct wpe_input_touch_event*, float deviceScaleFactor); 53 const struct wpe_input_touch_event_raw* nativeFallbackTouchPoint() const { return &m_fallbackTouchPoint; } 54 #endif 55 56 private: 57 #if PLATFORM(IOS) 58 Vector<WebPlatformTouchPoint> extractWebTouchPoint(const _UIWebTouchEvent*); 59 #endif 60 61 #if PLATFORM(GTK) 62 GUniquePtr<GdkEvent> m_nativeEvent; 63 #elif PLATFORM(WPE) 64 struct wpe_input_touch_event_raw m_fallbackTouchPoint; 65 #endif 66 }; 36 NativeWebTouchEvent::NativeWebTouchEvent() 37 : WebTouchEvent(WebEventFactory::createWebTouchEvent()) 38 { 39 } 67 40 68 41 } // namespace WebKit 69 42 70 43 #endif // ENABLE(TOUCH_EVENTS) 71 72 #endif // NativeWebTouchEvent_h -
trunk/Source/WebKit/Shared/win/NativeWebWheelEventWin.cpp
r230460 r230461 1 1 /* 2 2 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #i fndef NativeWebMouseEvent_h27 # define NativeWebMouseEvent_h27 #include "config.h" 28 #include "NativeWebWheelEvent.h" 28 29 29 #include "WebEvent.h" 30 31 #if USE(APPKIT) 32 #include <wtf/RetainPtr.h> 33 OBJC_CLASS NSView; 34 #endif 35 36 #if PLATFORM(GTK) 37 #include <WebCore/GUniquePtrGtk.h> 38 typedef union _GdkEvent GdkEvent; 39 #endif 40 41 #if PLATFORM(WPE) 42 struct wpe_input_pointer_event; 43 #endif 30 #include "WebEventFactory.h" 44 31 45 32 namespace WebKit { 46 33 47 class NativeWebMouseEvent : public WebMouseEvent { 48 public: 49 #if USE(APPKIT) 50 NativeWebMouseEvent(NSEvent *, NSEvent *lastPressureEvent, NSView *); 51 #elif PLATFORM(GTK) 52 NativeWebMouseEvent(const NativeWebMouseEvent&); 53 NativeWebMouseEvent(GdkEvent*, int); 54 #elif PLATFORM(WPE) 55 NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor); 56 #endif 57 58 #if USE(APPKIT) 59 NSEvent* nativeEvent() const { return m_nativeEvent.get(); } 60 #elif PLATFORM(GTK) 61 const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 62 #else 63 const void* nativeEvent() const { return nullptr; } 64 #endif 65 66 private: 67 #if USE(APPKIT) 68 RetainPtr<NSEvent> m_nativeEvent; 69 #elif PLATFORM(GTK) 70 GUniquePtr<GdkEvent> m_nativeEvent; 71 #endif 72 }; 34 NativeWebWheelEvent::NativeWebWheelEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 35 : WebWheelEvent(WebEventFactory::createWebWheelEvent(hwnd, message, wParam, lParam)) 36 , m_nativeEvent(createNativeEvent(hwnd, message, wParam, lParam)) 37 { 38 } 73 39 74 40 } // namespace WebKit 75 76 #endif // NativeWebMouseEvent_h -
trunk/Source/WebKit/Shared/win/WebEventFactory.h
r230460 r230461 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #ifndef NativeWebMouseEvent_h 27 #define NativeWebMouseEvent_h 27 #pragma once 28 28 29 29 #include "WebEvent.h" 30 31 #if USE(APPKIT) 32 #include <wtf/RetainPtr.h> 33 OBJC_CLASS NSView; 34 #endif 35 36 #if PLATFORM(GTK) 37 #include <WebCore/GUniquePtrGtk.h> 38 typedef union _GdkEvent GdkEvent; 39 #endif 40 41 #if PLATFORM(WPE) 42 struct wpe_input_pointer_event; 43 #endif 30 #include <windows.h> 44 31 45 32 namespace WebKit { 46 33 47 class NativeWebMouseEvent : public WebMouseEvent{34 class WebEventFactory { 48 35 public: 49 #if USE(APPKIT) 50 NativeWebMouseEvent(NSEvent *, NSEvent *lastPressureEvent, NSView *); 51 #elif PLATFORM(GTK) 52 NativeWebMouseEvent(const NativeWebMouseEvent&); 53 NativeWebMouseEvent(GdkEvent*, int); 54 #elif PLATFORM(WPE) 55 NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor); 56 #endif 57 58 #if USE(APPKIT) 59 NSEvent* nativeEvent() const { return m_nativeEvent.get(); } 60 #elif PLATFORM(GTK) 61 const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } 62 #else 63 const void* nativeEvent() const { return nullptr; } 64 #endif 65 66 private: 67 #if USE(APPKIT) 68 RetainPtr<NSEvent> m_nativeEvent; 69 #elif PLATFORM(GTK) 70 GUniquePtr<GdkEvent> m_nativeEvent; 36 static WebMouseEvent createWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool didActivateWebView); 37 static WebWheelEvent createWebWheelEvent(HWND, UINT message, WPARAM, LPARAM); 38 static WebKeyboardEvent createWebKeyboardEvent(HWND, UINT message, WPARAM, LPARAM); 39 #if ENABLE(TOUCH_EVENTS) 40 static WebTouchEvent createWebTouchEvent(); 71 41 #endif 72 42 }; 73 43 44 inline MSG createNativeEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { return { hwnd, message, wParam, lParam }; } 45 74 46 } // namespace WebKit 75 76 #endif // NativeWebMouseEvent_h
Note: See TracChangeset
for help on using the changeset viewer.