Chromium Code Reviews| Index: Source/core/page/EventHandler.cpp |
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
| index 7624a0e919aee46f771d5949e1c03a6043fa0701..7a1de180c82f6f652ecd48193c9cbe7eecb02fb0 100644 |
| --- a/Source/core/page/EventHandler.cpp |
| +++ b/Source/core/page/EventHandler.cpp |
| @@ -2777,7 +2777,7 @@ bool EventHandler::sendContextMenuEventForKey() |
| Element* focusedElement = doc->focusedElement(); |
| FrameSelection& selection = m_frame->selection(); |
| Position start = selection.selection().start(); |
| - bool shouldTranslateToRootView = true; |
| + bool shouldTranslateToRootView = false; |
| if (start.deprecatedNode() && (selection.rootEditableElement() || selection.isRange())) { |
| RefPtrWillBeRawPtr<Range> selectionRange = selection.toNormalizedRange(); |
| @@ -2787,6 +2787,7 @@ bool EventHandler::sendContextMenuEventForKey() |
| // In a multiline edit, firstRect.maxY() would endup on the next line, so -1. |
| int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0; |
| location = IntPoint(x, y); |
| + shouldTranslateToRootView = true; |
|
Rick Byers
2014/12/10 03:09:25
by the way, you don't need this variable at all an
Deepak
2014/12/10 06:40:27
Done.
|
| } else if (focusedElement) { |
| IntRect clippedRect = focusedElement->boundsInRootViewSpace(); |
| location = IntPoint(clippedRect.center()); |
| @@ -2794,7 +2795,6 @@ bool EventHandler::sendContextMenuEventForKey() |
| location = IntPoint( |
| rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin, |
| kContextMenuMargin); |
| - shouldTranslateToRootView = false; |
| } |
| m_frame->view()->setCursor(pointerCursor()); |