2008-12-29 Josh Roesslein <jroesslein@gmail.com>
[WebKit-https.git] / WebCore / page / ContextMenuController.cpp
index 8d7e51a..5e9f8b5 100644 (file)
@@ -86,9 +86,13 @@ void ContextMenuController::handleContextMenuEvent(Event* event)
     IntPoint point = IntPoint(mouseEvent->pageX(), mouseEvent->pageY());
     HitTestResult result(point);
 
-    if (Frame* frame = event->target()->toNode()->document()->frame())
+    if (Frame* frame = event->target()->toNode()->document()->frame()) {
+        float zoomFactor = frame->pageZoomFactor();
+        point.setX(static_cast<int>(point.x() * zoomFactor));
+        point.setY(static_cast<int>(point.y() * zoomFactor));
         result = frame->eventHandler()->hitTestResultAtPoint(point, false);
-    
+    }
+
     if (!result.innerNonSharedNode())
         return;