Title: [135796] trunk/Source/WebKit2
- Revision
- 135796
- Author
- timothy_hor...@apple.com
- Date
- 2012-11-26 18:01:06 -0800 (Mon, 26 Nov 2012)
Log Message
PDFPlugin: Subframe PDF context menus are in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=103284
<rdar://problem/12727972>
Reviewed by Dan Bernstein.
Event position is in window coordinates, not content coordinates.
Since we have no windowToScreen(), use windowToContents and contentsToScreen
to get to screen coordinate space, which WKPopupContextMenu wants.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleContextMenuEvent):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (135795 => 135796)
--- trunk/Source/WebKit2/ChangeLog 2012-11-27 02:00:26 UTC (rev 135795)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-27 02:01:06 UTC (rev 135796)
@@ -1,5 +1,20 @@
2012-11-26 Tim Horton <timothy_hor...@apple.com>
+ PDFPlugin: Subframe PDF context menus are in the wrong place
+ https://bugs.webkit.org/show_bug.cgi?id=103284
+ <rdar://problem/12727972>
+
+ Reviewed by Dan Bernstein.
+
+ Event position is in window coordinates, not content coordinates.
+ Since we have no windowToScreen(), use windowToContents and contentsToScreen
+ to get to screen coordinate space, which WKPopupContextMenu wants.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::handleContextMenuEvent):
+
+2012-11-26 Tim Horton <timothy_hor...@apple.com>
+
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>
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (135795 => 135796)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2012-11-27 02:00:26 UTC (rev 135795)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2012-11-27 02:01:06 UTC (rev 135796)
@@ -578,7 +578,7 @@
NSMenu *nsMenu = [m_pdfLayerController.get() menuForEvent:nsEventForWebMouseEvent(event)];
FrameView* frameView = webFrame()->coreFrame()->view();
- IntPoint point = frameView->contentsToScreen(IntRect(event.position(), IntSize())).location();
+ IntPoint point = frameView->contentsToScreen(IntRect(frameView->windowToContents(event.position()), IntSize())).location();
if (nsMenu) {
WKPopupContextMenu(nsMenu, point);
return true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes