Title: [99210] trunk/Source/WebKit2
- Revision
- 99210
- Author
- [email protected]
- Date
- 2011-11-03 10:13:38 -0700 (Thu, 03 Nov 2011)
Log Message
PluginControllerProxy's dirty rect should be in plug-in coordinates
https://bugs.webkit.org/show_bug.cgi?id=71481
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
Convert the dirty rect to window coordinates before passing it to the plug-in.
(WebKit::PluginControllerProxy::invalidate):
No need to convert the dirty rect to window coordinates.
(WebKit::PluginControllerProxy::paintEntirePlugin):
Use m_pluginSize instead of m_frameRectInWindowCoordinates.isEmpty.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (99209 => 99210)
--- trunk/Source/WebKit2/ChangeLog 2011-11-03 17:10:44 UTC (rev 99209)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-03 17:13:38 UTC (rev 99210)
@@ -1,5 +1,22 @@
2011-11-03 Anders Carlsson <[email protected]>
+ PluginControllerProxy's dirty rect should be in plug-in coordinates
+ https://bugs.webkit.org/show_bug.cgi?id=71481
+
+ Reviewed by Sam Weinig.
+
+ * PluginProcess/PluginControllerProxy.cpp:
+ (WebKit::PluginControllerProxy::paint):
+ Convert the dirty rect to window coordinates before passing it to the plug-in.
+
+ (WebKit::PluginControllerProxy::invalidate):
+ No need to convert the dirty rect to window coordinates.
+
+ (WebKit::PluginControllerProxy::paintEntirePlugin):
+ Use m_pluginSize instead of m_frameRectInWindowCoordinates.isEmpty.
+
+2011-11-03 Anders Carlsson <[email protected]>
+
Use the right function to determine whether NPWindow coordinates should be window relative
https://bugs.webkit.org/show_bug.cgi?id=71480
Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp (99209 => 99210)
--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp 2011-11-03 17:10:44 UTC (rev 99209)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp 2011-11-03 17:13:38 UTC (rev 99210)
@@ -169,15 +169,15 @@
graphicsContext->scale(FloatSize(m_contentsScaleFactor, m_contentsScaleFactor));
#endif
- graphicsContext->translate(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
-
if (m_plugin->isTransparent())
graphicsContext->clearRect(dirtyRect);
+ IntRect dirtyRectInWindowCoordinates = dirtyRect;
+ dirtyRectInWindowCoordinates.move(m_frameRectInWindowCoordinates.x(), m_frameRectInWindowCoordinates.y());
+ graphicsContext->translate(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
+
m_plugin->paint(graphicsContext.get(), dirtyRect);
- // Convert the dirty rect back to plug-in coordinates.
- dirtyRect.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
m_connection->connection()->send(Messages::PluginProxy::Update(dirtyRect), m_pluginInstanceID);
}
@@ -211,13 +211,10 @@
void PluginControllerProxy::invalidate(const IntRect& rect)
{
- // Convert the dirty rect to window coordinates.
IntRect dirtyRect = rect;
- dirtyRect.move(m_frameRectInWindowCoordinates.x(), m_frameRectInWindowCoordinates.y());
// Make sure that the dirty rect is not greater than the plug-in itself.
- dirtyRect.intersect(m_frameRectInWindowCoordinates);
-
+ dirtyRect.intersect(IntRect(IntPoint(), m_pluginSize));
m_dirtyRect.unite(dirtyRect);
startPaintTimer();
@@ -550,10 +547,10 @@
void PluginControllerProxy::paintEntirePlugin()
{
- if (m_frameRectInWindowCoordinates.isEmpty())
+ if (m_pluginSize.isEmpty())
return;
- m_dirtyRect = m_frameRectInWindowCoordinates;
+ m_dirtyRect = IntRect(IntPoint(), m_pluginSize);
paint();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes