Changeset 52124 in webkit
- Timestamp:
- Dec 14, 2009 2:45:35 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r52103 r52124 1 2009-12-14 Evan Stade <estade@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 https://bugs.webkit.org/show_bug.cgi?id=32347 6 Chromium: Context menu launched by menu key has funky behavior 7 8 Make the context menu's position depend on the selection only when an 9 editable field has focus. Also, don't send multiple context menu events 10 for a single keypress. 11 12 * src/WebViewImpl.cpp: 13 (WebKit::WebViewImpl::keyEvent): 14 (WebKit::WebViewImpl::sendContextMenuEvent): 15 1 16 2009-12-13 Sam Weinig <sam@webkit.org> 2 17 -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r52103 r52124 454 454 455 455 #if PLATFORM(WIN_OS) || PLATFORM(LINUX) 456 if ((!event.modifiers && (event.windowsKeyCode == VKEY_APPS)) 457 || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10))) { 456 const WebInputEvent::Type contextMenuTriggeringEventType = 457 #if PLATFORM(WIN_OS) 458 WebInputEvent::KeyUp; 459 #elif PLATFORM(LINUX) 460 WebInputEvent::RawKeyDown; 461 #endif 462 463 if (((!event.modifiers && (event.windowsKeyCode == VKEY_APPS)) 464 || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10))) 465 && event.type == contextMenuTriggeringEventType) { 458 466 sendContextMenuEvent(event); 459 467 return true; … … 593 601 IntPoint location; 594 602 595 // The context menu event was generated from the keyboard, so show the596 // context menu by the current selection.597 Position start = mainFrameImpl->selection()->selection().start();598 Position end = mainFrameImpl->selection()->selection().end();599 603 600 604 Frame* focusedFrame = page()->focusController()->focusedOrMainFrame(); 601 605 Node* focusedNode = focusedFrame->document()->focusedNode(); 602 603 if (start.node() && end.node()) { 606 Position start = mainFrameImpl->selection()->selection().start(); 607 608 if (focusedFrame->editor() && focusedFrame->editor()->canEdit() && start.node()) { 604 609 RenderObject* renderer = start.node()->renderer(); 605 610 if (!renderer)
Note: See TracChangeset
for help on using the changeset viewer.