Title: [92302] trunk/Source/WebKit2
Revision
92302
Author
[email protected]
Date
2011-08-03 12:36:04 -0700 (Wed, 03 Aug 2011)

Log Message

[Qt] [WK2] Improve position of context menu for QDesktopWebView
https://bugs.webkit.org/show_bug.cgi?id=65635

Reviewed by Andreas Kling.

Do not assume that the QDesktopWebView takes the entire canvas when
positioning the context menu.

* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::showContextMenu):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (92301 => 92302)


--- trunk/Source/WebKit2/ChangeLog	2011-08-03 19:18:25 UTC (rev 92301)
+++ trunk/Source/WebKit2/ChangeLog	2011-08-03 19:36:04 UTC (rev 92302)
@@ -1,3 +1,16 @@
+2011-08-03  Caio Marcelo de Oliveira Filho  <[email protected]>
+
+        [Qt] [WK2] Improve position of context menu for QDesktopWebView
+        https://bugs.webkit.org/show_bug.cgi?id=65635
+
+        Reviewed by Andreas Kling.
+
+        Do not assume that the QDesktopWebView takes the entire canvas when
+        positioning the context menu.
+
+        * UIProcess/API/qt/qdesktopwebview.cpp:
+        (QDesktopWebViewPrivate::showContextMenu):
+
 2011-08-03  Anders Carlsson  <[email protected]>
 
         Fix API tests.

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp (92301 => 92302)


--- trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp	2011-08-03 19:18:25 UTC (rev 92301)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp	2011-08-03 19:36:04 UTC (rev 92302)
@@ -151,7 +151,8 @@
     activeMenu = menu;
 
     menu->setParent(widget, menu->windowFlags());
-    menu->exec(widget->mapToGlobal(menu->pos()));
+    QPoint menuPositionInScene = q->mapToScene(menu->pos()).toPoint();
+    menu->exec(widget->mapToGlobal(menuPositionInScene));
     // The last function to get out of exec() clear the local copy.
     if (activeMenu == menu)
         activeMenu.clear();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to