Title: [87305] trunk/Source/WebKit2
Revision
87305
Author
[email protected]
Date
2011-05-25 10:22:23 -0700 (Wed, 25 May 2011)

Log Message

<rdar://problem/9496795> REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale
https://bugs.webkit.org/show_bug.cgi?id=61448

Reviewed by Anders Carlsson.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale
after intersecting the two rectangles.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (87304 => 87305)


--- trunk/Source/WebKit2/ChangeLog	2011-05-25 17:10:03 UTC (rev 87304)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-25 17:22:23 UTC (rev 87305)
@@ -1,3 +1,14 @@
+2011-05-25  Dan Bernstein  <[email protected]>
+
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/9496795> REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale
+        https://bugs.webkit.org/show_bug.cgi?id=61448
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale
+        after intersecting the two rectangles.
+
 2011-05-24  Timothy Hatcher  <[email protected]>
 
         Make the Web Inspector bring the right window to the front when docked.

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (87304 => 87305)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-05-25 17:10:03 UTC (rev 87304)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-05-25 17:22:23 UTC (rev 87305)
@@ -659,19 +659,20 @@
 
 IntRect PluginView::clipRectInWindowCoordinates() const
 {
-    ASSERT(parent());
-
     // Get the frame rect in window coordinates.
     IntRect frameRectInWindowCoordinates = parent()->contentsToWindow(frameRect());
-    frameRectInWindowCoordinates.scale(1 / frame()->pageScaleFactor());
 
+    Frame* frame = this->frame();
+
     // Get the window clip rect for the enclosing layer (in window coordinates).
     RenderLayer* layer = m_pluginElement->renderer()->enclosingLayer();
-    FrameView* parentView = m_pluginElement->document()->frame()->view();
-    IntRect windowClipRect = parentView->windowClipRectForLayer(layer, true);
+    IntRect windowClipRect = frame->view()->windowClipRectForLayer(layer, true);
 
     // Intersect the two rects to get the view clip rect in window coordinates.
-    return intersection(frameRectInWindowCoordinates, windowClipRect);
+    frameRectInWindowCoordinates.intersect(windowClipRect);
+
+    frameRectInWindowCoordinates.scale(1 / frame->pageScaleFactor());
+    return frameRectInWindowCoordinates;
 }
 
 void PluginView::focusPluginElement()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to