Title: [135795] trunk/Source/WebKit2
Revision
135795
Author
[email protected]
Date
2012-11-26 18:00:26 -0800 (Mon, 26 Nov 2012)

Log Message

PDFPlugin: Ctrl-click opens a link in a PDF in addition to context menu
https://bugs.webkit.org/show_bug.cgi?id=103282
<rdar://problem/12710892>

Reviewed by Dan Bernstein.

Don't send standard mouse events to PDFKit if a click will also show/hide the context menu.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleMouseEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (135794 => 135795)


--- trunk/Source/WebKit2/ChangeLog	2012-11-27 02:00:23 UTC (rev 135794)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-27 02:00:26 UTC (rev 135795)
@@ -1,3 +1,16 @@
+2012-11-26  Tim Horton  <[email protected]>
+
+        PDFPlugin: Ctrl-click opens a link in a PDF in addition to context menu
+        https://bugs.webkit.org/show_bug.cgi?id=103282
+        <rdar://problem/12710892>
+
+        Reviewed by Dan Bernstein.
+
+        Don't send standard mouse events to PDFKit if a click will also show/hide the context menu.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::handleMouseEvent):
+
 2012-11-26  Ryuan Choi  <[email protected]>
 
         [EFL] Unreviewed build fix after r135767 without Tiled Backing Store

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (135794 => 135795)


--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm	2012-11-27 02:00:23 UTC (rev 135794)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm	2012-11-27 02:00:26 UTC (rev 135795)
@@ -523,6 +523,10 @@
         || IntRect(m_scrollCornerLayer.get().frame).contains(mousePosition))
         return false;
 
+    // Right-clicks and Control-clicks always call handleContextMenuEvent as well.
+    if (event.button() == WebMouseEvent::RightButton || (event.button() == WebMouseEvent::LeftButton && event.controlKey()))
+        return true;
+
     NSEvent *nsEvent = nsEventForWebMouseEvent(event);
 
     switch (event.type()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to