Title: [99122] trunk/Source/WebKit2
- Revision
- 99122
- Author
- [email protected]
- Date
- 2011-11-02 16:57:03 -0700 (Wed, 02 Nov 2011)
Log Message
Don't call NPP_SetWindow if the plug-in size or clip rect hasn't changed if the plug-in isn't using window relative coordinates
https://bugs.webkit.org/show_bug.cgi?id=71418
Reviewed by Adam Roben.
This avoids calling into the plug-in when only the plug-in position relative to the window changes.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (99121 => 99122)
--- trunk/Source/WebKit2/ChangeLog 2011-11-02 23:43:11 UTC (rev 99121)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-02 23:57:03 UTC (rev 99122)
@@ -1,3 +1,15 @@
+2011-11-02 Anders Carlsson <[email protected]>
+
+ Don't call NPP_SetWindow if the plug-in size or clip rect hasn't changed if the plug-in isn't using window relative coordinates
+ https://bugs.webkit.org/show_bug.cgi?id=71418
+
+ Reviewed by Adam Roben.
+
+ This avoids calling into the plug-in when only the plug-in position relative to the window changes.
+
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::geometryDidChange):
+
2011-11-02 Jon Lee <[email protected]>
Fix syntax error.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (99121 => 99122)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-11-02 23:43:11 UTC (rev 99121)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-11-02 23:57:03 UTC (rev 99122)
@@ -681,6 +681,12 @@
return;
}
+ bool shouldCallWindow = true;
+
+ // If the plug-in doesn't want window relative coordinates, we don't need to call setWindow unless its size or clip rect changes.
+ if (!wantsWindowRelativeCoordinates() && m_pluginSize == pluginSize && m_clipRect == clipRect)
+ shouldCallWindow = false;
+
m_pluginSize = pluginSize;
m_clipRect = clipRect;
m_pluginToRootViewTransform = pluginToRootViewTransform;
@@ -692,6 +698,10 @@
m_clipRectInWindowCoordinates = IntRect(clipRectLocationInWindowCoordinates, m_clipRect.size());
platformGeometryDidChange();
+
+ if (!shouldCallWindow)
+ return;
+
callSetWindow();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes