Diff
Modified: branches/safari-536-branch/LayoutTests/ChangeLog (118423 => 118424)
--- branches/safari-536-branch/LayoutTests/ChangeLog 2012-05-24 22:14:27 UTC (rev 118423)
+++ branches/safari-536-branch/LayoutTests/ChangeLog 2012-05-24 22:16:37 UTC (rev 118424)
@@ -1,3 +1,18 @@
+2012-05-24 Lucas Forschler <[email protected]>
+
+ Merge 117869
+
+ 2012-05-21 Anders Carlsson <[email protected]>
+
+ Flash player buttons do not work when page is zoomed in
+ https://bugs.webkit.org/show_bug.cgi?id=87056
+ <rdar://problem/11491501>
+
+ Reviewed by Oliver Hunt.
+
+ * platform/mac-wk2/plugins/mouse-events-scaled-iframe-expected.txt: Added.
+ * platform/mac-wk2/plugins/mouse-events-scaled-iframe.html: Added.
+
2012-05-23 Jessie Berlin <[email protected]>
Merge r116524 onto the 536 branch, since r116473 was merged onto the branch in r117121.
Copied: branches/safari-536-branch/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe-expected.txt (from rev 117869, trunk/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe-expected.txt) (0 => 118424)
--- branches/safari-536-branch/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe-expected.txt (rev 0)
+++ branches/safari-536-branch/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe-expected.txt 2012-05-24 22:16:37 UTC (rev 118424)
@@ -0,0 +1,7 @@
+CONSOLE MESSAGE: PLUGIN: mouseDown at (400, 400)
+CONSOLE MESSAGE: PLUGIN: mouseUp at (400, 400)
+CONSOLE MESSAGE: PLUGIN: mouseDown at (200, 200)
+CONSOLE MESSAGE: PLUGIN: mouseUp at (200, 200)
+CONSOLE MESSAGE: PLUGIN: mouseDown at (133, 133)
+CONSOLE MESSAGE: PLUGIN: mouseUp at (133, 133)
+
Copied: branches/safari-536-branch/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe.html (from rev 117869, trunk/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe.html) (0 => 118424)
--- branches/safari-536-branch/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe.html (rev 0)
+++ branches/safari-536-branch/LayoutTests/platform/mac-wk2/plugins/mouse-events-scaled-iframe.html 2012-05-24 22:16:37 UTC (rev 118424)
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<html>
+<iframe id="iframe" src="" style="position: absolute; left: 0; top: 0; border:0" width="1000" height="1000"></iframe>
Modified: branches/safari-536-branch/Source/WebKit2/ChangeLog (118423 => 118424)
--- branches/safari-536-branch/Source/WebKit2/ChangeLog 2012-05-24 22:14:27 UTC (rev 118423)
+++ branches/safari-536-branch/Source/WebKit2/ChangeLog 2012-05-24 22:16:37 UTC (rev 118424)
@@ -1,5 +1,30 @@
2012-05-24 Lucas Forschler <[email protected]>
+ Merge 117869
+
+ 2012-05-21 Anders Carlsson <[email protected]>
+
+ Flash player buttons do not work when page is zoomed in
+ https://bugs.webkit.org/show_bug.cgi?id=87056
+ <rdar://problem/11491501>
+
+ Reviewed by Oliver Hunt.
+
+ Use the page scale factor when computing the plug-in to root view transform, otherwise we'll compute an
+ incorrect transform for plug-ins inside subframes. Also, make sure that viewGeometryDidChange is called for all plug-ins
+ when scaling the page since otherwise it won't be called unless the scroll position changes.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::pageScaleFactorDidChange):
+ (WebKit):
+ (WebKit::PluginView::viewGeometryDidChange):
+ * WebProcess/Plugins/PluginView.h:
+ (PluginView):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::scalePage):
+
+2012-05-24 Lucas Forschler <[email protected]>
+
Merge 117471
2012-05-16 Andreas Kling <[email protected]>
Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (118423 => 118424)
--- branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2012-05-24 22:14:27 UTC (rev 118423)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2012-05-24 22:16:37 UTC (rev 118424)
@@ -390,6 +390,11 @@
return toRenderBoxModelObject(m_pluginElement->renderer());
}
+void PluginView::pageScaleFactorDidChange()
+{
+ viewGeometryDidChange();
+}
+
#if PLATFORM(MAC)
void PluginView::setWindowIsVisible(bool windowIsVisible)
{
@@ -738,15 +743,15 @@
return;
ASSERT(frame());
- float frameScaleFactor = frame()->frameScaleFactor();
+ float pageScaleFactor = frame()->page() ? frame()->page()->pageScaleFactor() : 1;
- IntPoint scaledFrameRectLocation(frameRect().location().x() * frameScaleFactor, frameRect().location().y() * frameScaleFactor);
+ IntPoint scaledFrameRectLocation(frameRect().location().x() * pageScaleFactor, frameRect().location().y() * pageScaleFactor);
IntPoint scaledLocationInRootViewCoordinates(parent()->contentsToRootView(scaledFrameRectLocation));
// FIXME: We still don't get the right coordinates for transformed plugins.
AffineTransform transform;
transform.translate(scaledLocationInRootViewCoordinates.x(), scaledLocationInRootViewCoordinates.y());
- transform.scale(frameScaleFactor);
+ transform.scale(pageScaleFactor);
// FIXME: The clip rect isn't correct.
IntRect clipRect = boundsRect();
Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h (118423 => 118424)
--- branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h 2012-05-24 22:14:27 UTC (rev 118423)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h 2012-05-24 22:16:37 UTC (rev 118424)
@@ -72,6 +72,8 @@
// FIXME: Remove this; nobody should have to know about the plug-in view's renderer except the plug-in view itself.
WebCore::RenderBoxModelObject* renderer() const;
+ void pageScaleFactorDidChange();
+
private:
PluginView(PassRefPtr<WebCore::HTMLPlugInElement>, PassRefPtr<Plugin>, const Plugin::Parameters& parameters);
virtual ~PluginView();
Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (118423 => 118424)
--- branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-05-24 22:14:27 UTC (rev 118423)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-05-24 22:16:37 UTC (rev 118424)
@@ -1007,6 +1007,11 @@
{
m_page->setPageScaleFactor(scale, origin);
+#if PLATFORM(MAC)
+ for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
+ (*it)->pageScaleFactorDidChange();
+#endif
+
send(Messages::WebPageProxy::PageScaleFactorDidChange(scale));
}