Title: [165297] trunk/Source/WebKit2
Revision
165297
Author
[email protected]
Date
2014-03-07 15:43:57 -0800 (Fri, 07 Mar 2014)

Log Message

REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
https://bugs.webkit.org/show_bug.cgi?id=129872

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
But this SPI is unused, and can be simply removed.

* UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
locationInWindow is undefined for keyboard events, so we have to use current location.
Thankfully, there is a method that returns the location in appropriate coordinate
space, unlike +[NSEvent mouseLocation] that we used before.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (165296 => 165297)


--- trunk/Source/WebKit2/ChangeLog	2014-03-07 23:21:18 UTC (rev 165296)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-07 23:43:57 UTC (rev 165297)
@@ -1,3 +1,19 @@
+2014-03-07  Alexey Proskuryakov  <[email protected]>
+
+        REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
+        https://bugs.webkit.org/show_bug.cgi?id=129872
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
+        were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
+        But this SPI is unused, and can be simply removed.
+
+        * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
+        locationInWindow is undefined for keyboard events, so we have to use current location.
+        Thankfully, there is a method that returns the location in appropriate coordinate
+        space, unlike +[NSEvent mouseLocation] that we used before.
+
 2014-03-07  Andy Estes  <[email protected]>
 
         [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (165296 => 165297)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h	2014-03-07 23:21:18 UTC (rev 165296)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h	2014-03-07 23:43:57 UTC (rev 165297)
@@ -68,7 +68,6 @@
 - (void)enableFrameSizeUpdates;
 - (BOOL)frameSizeUpdatesDisabled;
 
-- (void)performDictionaryLookupAtCurrentMouseLocation;
 + (void)hideWordDefinitionWindow;
 
 @property (readwrite) CGFloat minimumLayoutWidth;

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (165296 => 165297)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2014-03-07 23:21:18 UTC (rev 165296)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2014-03-07 23:43:57 UTC (rev 165297)
@@ -2133,7 +2133,7 @@
 
 - (void)_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent
 {
-    NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:flagsChangedEvent.locationInWindow
+    NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:[[flagsChangedEvent window] mouseLocationOutsideOfEventStream]
         modifierFlags:[flagsChangedEvent modifierFlags] timestamp:[flagsChangedEvent timestamp] windowNumber:[flagsChangedEvent windowNumber]
         context:[flagsChangedEvent context] eventNumber:0 clickCount:0 pressure:0];
     NativeWebMouseEvent webEvent(fakeEvent, self);
@@ -3070,11 +3070,6 @@
     return _data->_frameSizeUpdatesDisabledCount > 0;
 }
 
-- (void)performDictionaryLookupAtCurrentMouseLocation
-{
-    _data->_page->performDictionaryLookupAtLocation([self convertPoint:[[NSApp currentEvent] locationInWindow] fromView:nil]);
-}
-
 + (void)hideWordDefinitionWindow
 {
     WKHideWordDefinitionWindow();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to