Title: [98394] trunk/Source/WebKit2
Revision
98394
Author
[email protected]
Date
2011-10-25 14:11:00 -0700 (Tue, 25 Oct 2011)

Log Message

Assertion failure when zooming a PDF in an iframe
https://bugs.webkit.org/show_bug.cgi?id=70849

Reviewed by Alexey Proskuryakov.

If the plug-in doesn't want window relative coordinates, we shouldn't give the plug-in window relative coordinates.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (98393 => 98394)


--- trunk/Source/WebKit2/ChangeLog	2011-10-25 21:10:12 UTC (rev 98393)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-25 21:11:00 UTC (rev 98394)
@@ -1,3 +1,15 @@
+2011-10-25  Anders Carlsson  <[email protected]>
+
+        Assertion failure when zooming a PDF in an iframe
+        https://bugs.webkit.org/show_bug.cgi?id=70849
+
+        Reviewed by Alexey Proskuryakov.
+
+        If the plug-in doesn't want window relative coordinates, we shouldn't give the plug-in window relative coordinates.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::viewGeometryDidChange):
+
 2011-10-25  Sam Weinig  <[email protected]>
 
         Make loadFileURL:restrictToFilesWithin: work, albeit, without the correct

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (98393 => 98394)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-10-25 21:10:12 UTC (rev 98393)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-10-25 21:11:00 UTC (rev 98394)
@@ -708,10 +708,17 @@
     if (!m_isInitialized || !m_plugin || !parent())
         return;
 
-    // Get the frame rect in window coordinates.
-    // FIXME: Figure out what we should pass here when m_plugin->wantsWindowRelativeCoordinates() returns false.
-    IntRect frameRectInWindowCoordinates = parent()->contentsToWindow(frameRect());
-    m_plugin->geometryDidChange(frameRectInWindowCoordinates, clipRectInWindowCoordinates());
+    IntRect rect;
+
+    if (m_plugin->wantsWindowRelativeCoordinates()) {
+        // Get the frame rect in window coordinates.
+        rect = parent()->contentsToWindow(frameRect());
+    } else {
+        // FIXME: The plug-in shouldn't know its location relative to its parent frame.
+        rect = frameRect();
+    }
+
+    m_plugin->geometryDidChange(rect, clipRectInWindowCoordinates());
 }
 
 void PluginView::viewVisibilityDidChange()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to