Changeset 215790 in webkit
- Timestamp:
- Apr 25, 2017, 9:27:53 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r215786 r215790 1 2017-04-25 Alex Christensen <achristensen@webkit.org> 2 3 REGRESSION(206450): WebKit2PlatformMouseEvent m_modifierFlags not set 4 https://bugs.webkit.org/show_bug.cgi?id=171297 5 <rdar://problem/31530719> 6 7 Reviewed by Geoffrey Garen. 8 9 * Shared/WebEventConversion.cpp: 10 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): 11 1 12 2017-04-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 13 -
trunk/Source/WebKit2/Shared/WebEventConversion.cpp
r207689 r215790 110 110 m_menuTypeForEvent = webEvent.menuTypeForEvent(); 111 111 #endif 112 m_modifierFlags = 0; 113 if (webEvent.shiftKey()) 114 m_modifierFlags |= WebEvent::ShiftKey; 115 if (webEvent.controlKey()) 116 m_modifierFlags |= WebEvent::ControlKey; 117 if (webEvent.altKey()) 118 m_modifierFlags |= WebEvent::AltKey; 119 if (webEvent.metaKey()) 120 m_modifierFlags |= WebEvent::MetaKey; 112 121 } 113 122 }; -
trunk/Tools/ChangeLog
r215785 r215790 1 2017-04-25 Alex Christensen <achristensen@webkit.org> 2 3 REGRESSION(206450): WebKit2PlatformMouseEvent m_modifierFlags not set 4 https://bugs.webkit.org/show_bug.cgi?id=171297 5 <rdar://problem/31530719> 6 7 Reviewed by Geoffrey Garen. 8 9 * TestWebKitAPI/PlatformWebView.h: 10 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 11 * TestWebKitAPI/Tests/WebKit2/EventModifiers.cpp: Added. 12 (TestWebKitAPI::didFinishLoadForFrame): 13 (TestWebKitAPI::mouseDidMoveOverElement): 14 (TestWebKitAPI::setClients): 15 (TestWebKitAPI::TEST): 16 * TestWebKitAPI/mac/PlatformWebViewMac.mm: 17 (TestWebKitAPI::PlatformWebView::simulateRightClick): 18 (TestWebKitAPI::PlatformWebView::simulateMouseMove): 19 1 20 2017-04-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 21 -
trunk/Tools/TestWebKitAPI/PlatformWebView.h
r215758 r215790 70 70 void simulateAltKeyPress(); 71 71 void simulateRightClick(unsigned x, unsigned y); 72 void simulateMouseMove(unsigned x, unsigned y );72 void simulateMouseMove(unsigned x, unsigned y, WKEventModifiers = 0); 73 73 #if PLATFORM(MAC) 74 74 void simulateButtonClick(WKEventMouseButton, unsigned x, unsigned y, WKEventModifiers); -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r215784 r215790 197 197 5C6E65441D5CEFD400F7862E /* URLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C6E65411D5CEF8500F7862E /* URLParser.cpp */; }; 198 198 5C726D6F1D3EE06E00C5E1A1 /* InstanceMethodSwizzler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */; }; 199 5C7964101EB0278D0075D74C /* EventModifiers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C79640F1EB0269B0075D74C /* EventModifiers.cpp */; }; 199 200 5C838F7F1DB04F900082858F /* LoadInvalidURLRequest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 57901FAE1CAF137100ED64F9 /* LoadInvalidURLRequest.mm */; }; 200 201 5C9E56851DF9145400C9EE33 /* WebsitePolicies.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C9E56841DF9143D00C9EE33 /* WebsitePolicies.mm */; }; … … 1146 1147 5C726D6D1D3EE06800C5E1A1 /* InstanceMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstanceMethodSwizzler.h; path = cocoa/InstanceMethodSwizzler.h; sourceTree = "<group>"; }; 1147 1148 5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InstanceMethodSwizzler.mm; path = cocoa/InstanceMethodSwizzler.mm; sourceTree = "<group>"; }; 1149 5C79640F1EB0269B0075D74C /* EventModifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventModifiers.cpp; sourceTree = "<group>"; }; 1148 1150 5C9E56841DF9143D00C9EE33 /* WebsitePolicies.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebsitePolicies.mm; sourceTree = "<group>"; }; 1149 1151 5C9E56861DF9148E00C9EE33 /* contentBlockerCheck.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = contentBlockerCheck.html; sourceTree = "<group>"; }; … … 2044 2046 75F3133F18C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp */, 2045 2047 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */, 2048 5C79640F1EB0269B0075D74C /* EventModifiers.cpp */, 2046 2049 BCC8B95A12611F4700DE46A4 /* FailedLoad.cpp */, 2047 2050 1A02C84E125D4A8400E3F4BD /* Find.cpp */, … … 3049 3052 7CCE7F221A411AE600447C4C /* WKString.cpp in Sources */, 3050 3053 7CCE7F1E1A411AE600447C4C /* WKStringJSString.cpp in Sources */, 3054 5C7964101EB0278D0075D74C /* EventModifiers.cpp in Sources */, 3051 3055 2D4CF8BD1D8360CC0001CE8D /* WKThumbnailView.mm in Sources */, 3052 3056 5CE354D91E70DA5C00BEFE3B /* WKUserContentExtensionStore.mm in Sources */, -
trunk/Tools/TestWebKitAPI/gtk/PlatformWebViewGtk.cpp
r191783 r215790 149 149 } 150 150 151 void PlatformWebView::simulateMouseMove(unsigned x, unsigned y )151 void PlatformWebView::simulateMouseMove(unsigned x, unsigned y, WKEventModifiers) 152 152 { 153 153 GUniquePtr<GdkEvent> event(gdk_event_new(GDK_MOTION_NOTIFY)); -
trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm
r208455 r215790 178 178 179 179 } 180 181 void PlatformWebView::simulateMouseMove(unsigned x, unsigned y)182 {183 NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeMouseMoved184 location:NSMakePoint(x, y)185 modifierFlags:0186 timestamp:GetCurrentEventTime()187 windowNumber:[m_window windowNumber]188 context:[NSGraphicsContext currentContext]189 eventNumber:0190 clickCount:0191 pressure:0];192 193 [m_view mouseMoved:event];194 195 }196 180 197 181 static NSEventType eventTypeForButton(WKEventMouseButton button) … … 227 211 return returnVal; 228 212 } 229 213 214 void PlatformWebView::simulateMouseMove(unsigned x, unsigned y, WKEventModifiers modifiers) 215 { 216 NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeMouseMoved location:NSMakePoint(x, y) modifierFlags:modifierFlagsForWKModifiers(modifiers) timestamp:GetCurrentEventTime() windowNumber:[m_window windowNumber] context:[NSGraphicsContext currentContext] eventNumber:0 clickCount:0 pressure:0]; 217 [m_view mouseMoved:event]; 218 } 219 230 220 void PlatformWebView::simulateButtonClick(WKEventMouseButton button, unsigned x, unsigned y, WKEventModifiers modifiers) 231 221 {
Note:
See TracChangeset
for help on using the changeset viewer.