Changeset 51142 in webkit
- Timestamp:
- Nov 18, 2009 3:10:54 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r51130 r51142 1 2009-11-18 Evan Stade <estade@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Menu button shows wrong content in Chromium 6 https://bugs.webkit.org/show_bug.cgi?id=31448 7 8 Make context menu button (VK_APPS) show context menu for node that has 9 keyboard focus. This affects both the content and the positioning. 10 11 * src/WebViewImpl.cpp: 12 (WebKit::WebViewImpl::sendContextMenuEvent): 13 1 14 2009-11-17 Darin Fisher <darin@chromium.org> 2 15 -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r50808 r51142 588 588 Position end = mainFrameImpl->selection()->selection().end(); 589 589 590 if (!start.node() || !end.node()) { 590 Frame* focusedFrame = page()->focusController()->focusedOrMainFrame(); 591 Node* focusedNode = focusedFrame->document()->focusedNode(); 592 593 if (start.node() && end.node()) { 594 RenderObject* renderer = start.node()->renderer(); 595 if (!renderer) 596 return false; 597 598 RefPtr<Range> selection = mainFrameImpl->selection()->toNormalizedRange(); 599 IntRect firstRect = mainFrameImpl->firstRectForRange(selection.get()); 600 601 int x = rightAligned ? firstRect.right() : firstRect.x(); 602 location = IntPoint(x, firstRect.bottom()); 603 } else if (focusedNode) 604 location = focusedNode->getRect().bottomLeft(); 605 else { 591 606 location = IntPoint( 592 607 rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin, 593 608 kContextMenuMargin); 594 } else {595 RenderObject* renderer = start.node()->renderer();596 if (!renderer)597 return false;598 599 RefPtr<Range> selection = mainFrameImpl->selection()->toNormalizedRange();600 IntRect firstRect = mainFrameImpl->firstRectForRange(selection.get());601 602 int x = rightAligned ? firstRect.right() : firstRect.x();603 location = IntPoint(x, firstRect.bottom());604 609 } 605 610 … … 618 623 page()->contextMenuController()->clearContextMenu(); 619 624 620 Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();621 625 focusedFrame->view()->setCursor(pointerCursor()); 622 626 WebMouseEvent mouseEvent;
Note: See TracChangeset
for help on using the changeset viewer.