Title: [87556] branches/safari-534-branch/Source/WebKit2
Revision
87556
Author
mr...@apple.com
Date
2011-05-27 13:53:00 -0700 (Fri, 27 May 2011)

Log Message

Merge r87305.

Modified Paths

Diff

Modified: branches/safari-534-branch/Source/WebKit2/ChangeLog (87555 => 87556)


--- branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-05-27 20:51:31 UTC (rev 87555)
+++ branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-05-27 20:53:00 UTC (rev 87556)
@@ -1,5 +1,20 @@
 2011-05-27  Mark Rowe  <mr...@apple.com>
 
+        Merge r87305.
+
+    2011-05-25  Dan Bernstein  <m...@apple.com>
+
+        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-27  Mark Rowe  <mr...@apple.com>
+
         Merge r87272.
 
     2011-05-24  Maciej Stachowiak  <m...@apple.com>

Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (87555 => 87556)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-05-27 20:51:31 UTC (rev 87555)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-05-27 20:53:00 UTC (rev 87556)
@@ -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
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to