[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
weinig at apple.com
weinig at apple.com
Wed Dec 22 15:38:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7d9ca271e5cc5334de5feac84a3934385bd668af
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 9 19:20:10 2010 +0000
Context menus show up in the wrong place when the page is scrolled
https://bugs.webkit.org/show_bug.cgi?id=49264
Reviewed by Anders Carlsson.
Convert the hitTestResult point into 'window' coordinates before sending over
to the UIProcess to show the menu.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
Convert to use message sender interface.
(WebKit::WebContextMenu::itemSelected):
Remove unnecessary WebCore::'s.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 386f522..b21c883 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,23 @@
Reviewed by Anders Carlsson.
+ Context menus show up in the wrong place when the page is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=49264
+
+ Convert the hitTestResult point into 'window' coordinates before sending over
+ to the UIProcess to show the menu.
+
+ * WebProcess/WebPage/WebContextMenu.cpp:
+ (WebKit::WebContextMenu::show):
+ Convert to use message sender interface.
+
+ (WebKit::WebContextMenu::itemSelected):
+ Remove unnecessary WebCore::'s.
+
+2010-11-09 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
Send messages directly to the WebContext
https://bugs.webkit.org/show_bug.cgi?id=49262
diff --git a/WebKit2/WebProcess/WebPage/WebContextMenu.cpp b/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
index 1f78f83..29ff339 100644
--- a/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
+++ b/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
@@ -27,6 +27,7 @@
#include "WebProcess.h"
#include <WebCore/ContextMenu.h>
#include <WebCore/ContextMenuController.h>
+#include <WebCore/FrameView.h>
#include <WebCore/Page.h>
using namespace WebCore;
@@ -44,18 +45,28 @@ WebContextMenu::~WebContextMenu()
void WebContextMenu::show()
{
- WebCore::ContextMenu* menu = m_page->corePage()->contextMenuController()->contextMenu();
+ ContextMenu* menu = m_page->corePage()->contextMenuController()->contextMenu();
if (!menu)
return;
-
- Vector<WebCore::ContextMenuItem> coreItems = WebCore::contextMenuItemVector(menu->platformDescription());
-
- WebProcess::shared().connection()->send(Messages::WebPageProxy::ShowContextMenu(menu->hitTestResult().point(), kitItems(coreItems, menu)), m_page->pageID());
+ Node* node = menu->hitTestResult().innerNonSharedNode();
+ if (!node)
+ return;
+ Frame* frame = node->document()->frame();
+ if (!frame)
+ return;
+ FrameView* view = frame->view();
+ if (!view)
+ return;
+
+ IntPoint point = view->contentsToWindow(menu->hitTestResult().point());
+ Vector<ContextMenuItem> items = contextMenuItemVector(menu->platformDescription());
+
+ m_page->send(Messages::WebPageProxy::ShowContextMenu(point, kitItems(items, menu)));
}
void WebContextMenu::itemSelected(const WebContextMenuItemData& item)
{
- WebCore::ContextMenuItem coreItem(WebCore::ActionType, static_cast<WebCore::ContextMenuAction>(item.action()), item.title());
+ ContextMenuItem coreItem(ActionType, static_cast<ContextMenuAction>(item.action()), item.title());
m_page->corePage()->contextMenuController()->contextMenuItemSelected(&coreItem);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list