Title: [101416] trunk/Source/WebCore
Revision
101416
Author
[email protected]
Date
2011-11-29 13:29:18 -0800 (Tue, 29 Nov 2011)

Log Message

Use contentsToRootView when converting the mouse coordinates for the context menu key event
https://bugs.webkit.org/show_bug.cgi?id=73352

Reviewed by Adam Roben.

No new tests: Already covered by existing tests.

This is another step towards fixing https://bugs.webkit.org/show_bug.cgi?id=71945, by getting
rid of a call to ScrollView::contentsToWindow.

* page/EventHandler.cpp:
(WebCore::EventHandler::sendContextMenuEventForKey):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101415 => 101416)


--- trunk/Source/WebCore/ChangeLog	2011-11-29 21:29:13 UTC (rev 101415)
+++ trunk/Source/WebCore/ChangeLog	2011-11-29 21:29:18 UTC (rev 101416)
@@ -1,3 +1,18 @@
+2011-11-29  Anders Carlsson  <[email protected]>
+
+        Use contentsToRootView when converting the mouse coordinates for the context menu key event
+        https://bugs.webkit.org/show_bug.cgi?id=73352
+
+        Reviewed by Adam Roben.
+
+        No new tests: Already covered by existing tests.
+
+        This is another step towards fixing https://bugs.webkit.org/show_bug.cgi?id=71945, by getting
+        rid of a call to ScrollView::contentsToWindow.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::sendContextMenuEventForKey):
+
 2011-11-15  Anders Carlsson  <[email protected]>
 
         DragClient::dragSourceActionMaskForPoint should use root view coordinates

Modified: trunk/Source/WebCore/page/EventHandler.cpp (101415 => 101416)


--- trunk/Source/WebCore/page/EventHandler.cpp	2011-11-29 21:29:13 UTC (rev 101415)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2011-11-29 21:29:18 UTC (rev 101416)
@@ -2343,8 +2343,8 @@
 
     m_frame->view()->setCursor(pointerCursor());
 
-    IntPoint position = view->contentsToWindow(location);
-    IntPoint globalPosition = view->contentsToScreen(IntRect(location, IntSize())).location();
+    IntPoint position = view->contentsToRootView(location);
+    IntPoint globalPosition = view->hostWindow()->rootViewToScreen(IntRect(position, IntSize())).location();
 
     Node* targetNode = doc->focusedNode();
     if (!targetNode)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to