[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:49:33 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit e1b6ff50fc041eab59732c0a131b6be700a9f873
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 14 22:45:35 2009 +0000
2009-12-14 Evan Stade <estade at chromium.org>
Reviewed by Darin Fisher.
https://bugs.webkit.org/show_bug.cgi?id=32347
Chromium: Context menu launched by menu key has funky behavior
Make the context menu's position depend on the selection only when an
editable field has focus. Also, don't send multiple context menu events
for a single keypress.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::keyEvent):
(WebKit::WebViewImpl::sendContextMenuEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index d5d5c2d..483d7a8 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-14 Evan Stade <estade at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32347
+ Chromium: Context menu launched by menu key has funky behavior
+
+ Make the context menu's position depend on the selection only when an
+ editable field has focus. Also, don't send multiple context menu events
+ for a single keypress.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::keyEvent):
+ (WebKit::WebViewImpl::sendContextMenuEvent):
+
2009-12-13 Sam Weinig <sam at webkit.org>
Reviewed by Dan Bernstein.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 030c4bd..87a150a 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -453,8 +453,16 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
return keyEventDefault(event);
#if PLATFORM(WIN_OS) || PLATFORM(LINUX)
- if ((!event.modifiers && (event.windowsKeyCode == VKEY_APPS))
- || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10))) {
+ const WebInputEvent::Type contextMenuTriggeringEventType =
+#if PLATFORM(WIN_OS)
+ WebInputEvent::KeyUp;
+#elif PLATFORM(LINUX)
+ WebInputEvent::RawKeyDown;
+#endif
+
+ if (((!event.modifiers && (event.windowsKeyCode == VKEY_APPS))
+ || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10)))
+ && event.type == contextMenuTriggeringEventType) {
sendContextMenuEvent(event);
return true;
}
@@ -592,15 +600,12 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
#endif
IntPoint location;
- // The context menu event was generated from the keyboard, so show the
- // context menu by the current selection.
- Position start = mainFrameImpl->selection()->selection().start();
- Position end = mainFrameImpl->selection()->selection().end();
Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
Node* focusedNode = focusedFrame->document()->focusedNode();
+ Position start = mainFrameImpl->selection()->selection().start();
- if (start.node() && end.node()) {
+ if (focusedFrame->editor() && focusedFrame->editor()->canEdit() && start.node()) {
RenderObject* renderer = start.node()->renderer();
if (!renderer)
return false;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list