Title: [86917] branches/safari-534.36-branch/Source/WebKit2

Diff

Modified: branches/safari-534.36-branch/Source/WebKit2/ChangeLog (86916 => 86917)


--- branches/safari-534.36-branch/Source/WebKit2/ChangeLog	2011-05-20 01:16:24 UTC (rev 86916)
+++ branches/safari-534.36-branch/Source/WebKit2/ChangeLog	2011-05-20 01:18:18 UTC (rev 86917)
@@ -1,5 +1,25 @@
 2011-05-19  Lucas Forschler  <[email protected]
 
+    Merged r86851.
+    
+    2011-05-18  Chris Marrin  <[email protected]>
+
+        Reviewed by Anders Carlsson.
+
+        Plug-ins at YouTube, cnn.com, nytimes vanish when their top/left is scrolled out of view when zoomed
+        https://bugs.webkit.org/show_bug.cgi?id=61101
+
+        Scale both bounding boxes sent to m_plugin->geometryDidChange(), not just the frameRect. This fools
+        the plugin into thinking it is drawing into an unscaled box with an unscaled view even when scaled.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::frame):Made this const so it can be used in clipRectInWindowCoordinates()
+        (WebKit::PluginView::viewGeometryDidChange):Used IntRect::scale() rather than scaling by hand
+        (WebKit::PluginView::clipRectInWindowCoordinates):Added scale of clipRect.
+        * WebProcess/Plugins/PluginView.h:
+
+2011-05-19  Lucas Forschler  <[email protected]
+
     Merged r86820.
     
     2011-05-18  Brady Eidson  <[email protected]>

Modified: branches/safari-534.36-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (86916 => 86917)


--- branches/safari-534.36-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-05-20 01:16:24 UTC (rev 86916)
+++ branches/safari-534.36-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-05-20 01:18:18 UTC (rev 86917)
@@ -297,7 +297,7 @@
     m_pluginElement = nullptr;
 }
 
-Frame* PluginView::frame()
+Frame* PluginView::frame() const
 {
     return m_pluginElement->document()->frame();
 }
@@ -645,10 +645,7 @@
     IntRect frameRectInWindowCoordinates = parent()->contentsToWindow(frameRect());
     
     // Adjust bounds to account for pageScaleFactor
-    float scaleFactor = frame()->pageScaleFactor();
-    frameRectInWindowCoordinates.setX(frameRectInWindowCoordinates.x() / scaleFactor);
-    frameRectInWindowCoordinates.setY(frameRectInWindowCoordinates.y() / scaleFactor);
-    frameRectInWindowCoordinates.setSize(m_boundsSize);
+    frameRectInWindowCoordinates.scale(1 / frame()->pageScaleFactor());
     m_plugin->geometryDidChange(frameRectInWindowCoordinates, clipRectInWindowCoordinates());
 }
 
@@ -666,7 +663,7 @@
 
     // Get the frame rect in window coordinates.
     IntRect frameRectInWindowCoordinates = parent()->contentsToWindow(frameRect());
-    frameRectInWindowCoordinates.setSize(m_boundsSize);
+    frameRectInWindowCoordinates.scale(1 / frame()->pageScaleFactor());
 
     // Get the window clip rect for the enclosing layer (in window coordinates).
     RenderLayer* layer = m_pluginElement->renderer()->enclosingLayer();

Modified: branches/safari-534.36-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h (86916 => 86917)


--- branches/safari-534.36-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h	2011-05-20 01:16:24 UTC (rev 86916)
+++ branches/safari-534.36-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h	2011-05-20 01:18:18 UTC (rev 86917)
@@ -51,7 +51,7 @@
 public:
     static PassRefPtr<PluginView> create(PassRefPtr<WebCore::HTMLPlugInElement>, PassRefPtr<Plugin>, const Plugin::Parameters&);
 
-    WebCore::Frame* frame();
+    WebCore::Frame* frame() const;
 
     bool isBeingDestroyed() const { return m_isBeingDestroyed; }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to