https://bugs.webkit.org/show_bug.cgi?id=76421
Patch by Marc-Andre Decoste <mad@chromium.org> on 2012-01-20
Reviewed by Ojan Vafai.
.:
* ManualTests/win/contextmenu-key3.html: Added.
Source/WebCore:
Manual tests only because DRT doesn't support context menu key.
* page/EventHandler.cpp:
(WebCore::EventHandler::sendContextMenuEventForKey):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105538
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-20 Marc-Andre Decoste <mad@chromium.org>
+
+ Add proper offset to position right click to simulate a context menu invocation.
+ https://bugs.webkit.org/show_bug.cgi?id=76421
+
+ Reviewed by Ojan Vafai.
+
+ * ManualTests/win/contextmenu-key3.html: Added.
+
2012-01-20 Kinuko Yasuda <kinuko@chromium.org>
Unreviewed; Windows buildbot update failure fix.
--- /dev/null
+<p>Manual test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76421">bug 76421</a></p>
+<p>Left click on one of the lines in the text area and then hit the keyboard's context menu key to make sure the context menu pops up for the appropriate line.</p>
+
+<textarea style="min-height:75px;">
+ aaaaaaaaa
+ bbbbbbbbb
+ ccccccccc
+</textarea>
+2012-01-20 Marc-Andre Decoste <mad@chromium.org>
+
+ Add proper offset to position right click to simulate a context menu invocation.
+ https://bugs.webkit.org/show_bug.cgi?id=76421
+
+ Reviewed by Ojan Vafai.
+
+ Manual tests only because DRT doesn't support context menu key.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::sendContextMenuEventForKey):
+
2012-01-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r105426.
IntRect firstRect = m_frame->editor()->firstRectForRange(selectionRange.get());
int x = rightAligned ? firstRect.maxX() : firstRect.x();
- location = IntPoint(x, firstRect.maxY());
+ // 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);
} else if (focusedNode) {
RenderBoxModelObject* box = focusedNode->renderBoxModelObject();
if (!box)