Title: [128505] trunk/Source/WebKit/chromium
Revision
128505
Author
[email protected]
Date
2012-09-13 14:05:54 -0700 (Thu, 13 Sep 2012)

Log Message

[Chromium] REGRESSION(r127457): Context menu on textarea is displayed in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=96593

Reviewed by Adam Barth.

After r127457, the HitTestResult stored in ContextMenuController is in window coordinates.
Trying to convert it again to window coordinates will result in adding the containing frame's
position twice, thus the wrong placing.

Chromium Mac wasn't impacted by the regression and I manually checked that the fix doesn't impact Mac.

Unfortunately, no test as I don't think we have a way of testing context menu position.

* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (128504 => 128505)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-13 21:03:55 UTC (rev 128504)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-13 21:05:54 UTC (rev 128505)
@@ -1,3 +1,21 @@
+2012-09-13  Julien Chaffraix  <[email protected]>
+
+        [Chromium] REGRESSION(r127457): Context menu on textarea is displayed in the wrong place
+        https://bugs.webkit.org/show_bug.cgi?id=96593
+
+        Reviewed by Adam Barth.
+
+        After r127457, the HitTestResult stored in ContextMenuController is in window coordinates.
+        Trying to convert it again to window coordinates will result in adding the containing frame's
+        position twice, thus the wrong placing.
+
+        Chromium Mac wasn't impacted by the regression and I manually checked that the fix doesn't impact Mac.
+
+        Unfortunately, no test as I don't think we have a way of testing context menu position.
+
+        * src/ContextMenuClientImpl.cpp:
+        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+
 2012-09-13  Robert Kroeger  <[email protected]>
 
         [chromium] alter fling animation parameters.

Modified: trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp (128504 => 128505)


--- trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp	2012-09-13 21:03:55 UTC (rev 128504)
+++ trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp	2012-09-13 21:05:54 UTC (rev 128505)
@@ -160,7 +160,7 @@
     Frame* selectedFrame = r.innerNonSharedNode()->document()->frame();
 
     WebContextMenuData data;
-    data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint());
+    data.mousePosition = r.roundedPoint();
 
     // Compute edit flags.
     data.editFlags = WebContextMenuData::CanDoNone;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to