[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
ap at apple.com
ap at apple.com
Wed Mar 17 18:44:14 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 7f1c8a0bffcfe86f0b5b0653e7526529bd2942b7
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 16 20:40:28 2010 +0000
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=36184
YouTube video resizing doesn't work with OOP plug-ins
Test: plugins/resize-from-plugin.html
We were calling _WKPHResizePluginInstance synchronously or asynchronously, depending on
whether the size has changed. But sync and async messages are not necessarily delivered in
order - plug-in host listens only to the former while waiting for a response to a message it
sent (a call to invoke() in this case).
* Plugins/Hosted/NetscapePluginInstanceProxy.h:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::resize):
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView updateAndSetWindow]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 685845c..13863d1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-03-16 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36184
+ YouTube video resizing doesn't work with OOP plug-ins
+
+ This test is quite fragile, as it depends on when exactly WebCore decides to do layout.
+ If WebCore logic changes, the test will just always pass without executing the code path
+ in question.
+
+ * plugins/resize-from-plugin-expected.txt: Added.
+ * plugins/resize-from-plugin.html: Added.
+ * plugins/resources/resize-from-plugin-frame.html: Added.
+
2010-03-16 Zhenyao Mo <zmo at google.com>
Reviewed by Darin Fisher.
diff --git a/LayoutTests/plugins/resize-from-plugin-expected.txt b/LayoutTests/plugins/resize-from-plugin-expected.txt
new file mode 100644
index 0000000..2376c24
--- /dev/null
+++ b/LayoutTests/plugins/resize-from-plugin-expected.txt
@@ -0,0 +1,13 @@
+Please follow this link for a manual test.
+
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+
+Test for NPP_SetWindow calls sent while a plug-in resizes itself.
+
+x: 18, y: 52, width: 200, height: 200, clipRect: (18, 52, 200, 142)
+Height and width should equal 200, and the plug-in size should not change on scroll.
+
diff --git a/LayoutTests/plugins/resize-from-plugin.html b/LayoutTests/plugins/resize-from-plugin.html
new file mode 100644
index 0000000..895589e
--- /dev/null
+++ b/LayoutTests/plugins/resize-from-plugin.html
@@ -0,0 +1,2 @@
+<p>Please follow <a href="resources/resize-from-plugin-frame.html">this link</a> for a manual test.</p>
+<iframe src="resources/resize-from-plugin-frame.html"></iframe>
diff --git a/LayoutTests/plugins/resources/resize-from-plugin-frame.html b/LayoutTests/plugins/resources/resize-from-plugin-frame.html
new file mode 100644
index 0000000..2e68d18
--- /dev/null
+++ b/LayoutTests/plugins/resources/resize-from-plugin-frame.html
@@ -0,0 +1,41 @@
+<html>
+<body>
+<embed name="plg" type="application/x-webkit-test-netscape" width="100px" height="100px">
+<p>Test for NPP_SetWindow calls sent while a plug-in resizes itself.</p>
+<pre id=result></pre>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpChildFramesAsText();
+}
+
+function resizePlugin(width, height)
+{
+ plg.style.width = width + "px";
+ plg.style.height = height + "px";
+}
+
+function test()
+{
+ try {
+ plg.resizeTo(200, 200);
+ document.getElementById("result").innerHTML = plg.lastSetWindowArguments
+ + "\nHeight and width should equal 200, and the plug-in size should not change on scroll.";
+ } catch (ex) {
+ alert("Exception: " + ex.description + ". Test plugin was not found");
+ }
+}
+
+plg.onclick = test;
+
+if (window.eventSender) {
+ eventSender.mouseMoveTo(50, 70);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+} else
+ document.getElementById("result").innerHTML = "Please click the plug-in square above.\n ";
+
+</script>
+<div style="visibility:hidden;height:5000px"></div>
+</body>
+</html>
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 8decc58..d10e083 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,23 @@
+2010-03-16 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36184
+ YouTube video resizing doesn't work with OOP plug-ins
+
+ Test: plugins/resize-from-plugin.html
+
+ We were calling _WKPHResizePluginInstance synchronously or asynchronously, depending on
+ whether the size has changed. But sync and async messages are not necessarily delivered in
+ order - plug-in host listens only to the former while waiting for a response to a message it
+ sent (a call to invoke() in this case).
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView updateAndSetWindow]):
+
2010-03-16 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index ea31356..e098247 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -89,7 +89,7 @@ public:
void pluginHostDied();
- void resize(NSRect size, NSRect clipRect, bool sync);
+ void resize(NSRect size, NSRect clipRect);
void destroy();
void focusChanged(bool hasFocus);
void windowFocusChanged(bool hasFocus);
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index f710efe..46aec82 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -246,19 +246,17 @@ NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy()
#endif
}
-void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect, bool sync)
+void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect)
{
uint32_t requestID = 0;
- if (sync)
- requestID = nextRequestID();
+ requestID = nextRequestID();
_WKPHResizePluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID,
size.origin.x, size.origin.y, size.size.width, size.size.height,
clipRect.origin.x, clipRect.origin.y, clipRect.size.width, clipRect.size.height);
- if (sync)
- waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
}
void NetscapePluginInstanceProxy::stopAllStreams()
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 156e117..0e099f9 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -180,10 +180,9 @@ extern "C" {
if (!shouldClipOutPlugin)
visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow);
- BOOL sizeChanged = !NSEqualSizes(_previousSize, boundsInWindow.size);
_previousSize = boundsInWindow.size;
- _proxy->resize(boundsInWindow, visibleRectInWindow, sizeChanged);
+ _proxy->resize(boundsInWindow, visibleRectInWindow);
}
- (void)windowFocusChanged:(BOOL)hasFocus
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list