Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 8d33eba40c5b70d75204e2d4f385d2877b167ecb..231d0b33fa750b34c39224ce390efe4c9679d766 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -2711,11 +2711,8 @@ bool EventHandler::sendContextMenuEventForKey() |
int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0; |
location = IntPoint(x, y); |
} else if (focusedElement) { |
- RenderBoxModelObject* box = focusedElement->renderBoxModelObject(); |
- if (!box) |
- return false; |
- IntRect clippedRect = box->pixelSnappedAbsoluteClippedOverflowRect(); |
- location = IntPoint(clippedRect.x(), clippedRect.maxY() - 1); |
+ IntRect clippedRect = focusedElement->boundsInRootViewSpace(); |
+ location = IntPoint(clippedRect.center()); |
} else { |
location = IntPoint( |
rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin, |