[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:39:32 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit a6104447a436bbd1e5b23b765f43cab2f18ee5bd
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 18 23:10:54 2009 +0000
2009-11-18 Evan Stade <estade at chromium.org>
Reviewed by Darin Fisher.
Menu button shows wrong content in Chromium
https://bugs.webkit.org/show_bug.cgi?id=31448
Make context menu button (VK_APPS) show context menu for node that has
keyboard focus. This affects both the content and the positioning.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::sendContextMenuEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0aafd2b..1545dd8 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-18 Evan Stade <estade at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Menu button shows wrong content in Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=31448
+
+ Make context menu button (VK_APPS) show context menu for node that has
+ keyboard focus. This affects both the content and the positioning.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::sendContextMenuEvent):
+
2009-11-17 Darin Fisher <darin at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 3a569a9..aaf7174 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -587,11 +587,10 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
Position start = mainFrameImpl->selection()->selection().start();
Position end = mainFrameImpl->selection()->selection().end();
- if (!start.node() || !end.node()) {
- location = IntPoint(
- rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin,
- kContextMenuMargin);
- } else {
+ Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
+ Node* focusedNode = focusedFrame->document()->focusedNode();
+
+ if (start.node() && end.node()) {
RenderObject* renderer = start.node()->renderer();
if (!renderer)
return false;
@@ -601,6 +600,12 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
int x = rightAligned ? firstRect.right() : firstRect.x();
location = IntPoint(x, firstRect.bottom());
+ } else if (focusedNode)
+ location = focusedNode->getRect().bottomLeft();
+ else {
+ location = IntPoint(
+ rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin,
+ kContextMenuMargin);
}
location = view->contentsToWindow(location);
@@ -617,7 +622,6 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
// not run.
page()->contextMenuController()->clearContextMenu();
- Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
focusedFrame->view()->setCursor(pointerCursor());
WebMouseEvent mouseEvent;
mouseEvent.button = WebMouseEvent::ButtonRight;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list