Title: [121441] trunk/Source/WebCore
- Revision
- 121441
- Author
- [email protected]
- Date
- 2012-06-28 11:00:42 -0700 (Thu, 28 Jun 2012)
Log Message
[GTK][Win]: Fix plugin drawing to an offscreen buffer
https://bugs.webkit.org/show_bug.cgi?id=89499
Patch by Kalev Lember <[email protected]> on 2012-06-28
Reviewed by Brent Fulgham.
Take into account that the GTK+ port draws to a backing store and adjust
the target rectangle calculation accordingly.
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::paint):
(WebCore::PluginView::setNPWindowRect):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121440 => 121441)
--- trunk/Source/WebCore/ChangeLog 2012-06-28 17:14:23 UTC (rev 121440)
+++ trunk/Source/WebCore/ChangeLog 2012-06-28 18:00:42 UTC (rev 121441)
@@ -1,3 +1,17 @@
+2012-06-28 Kalev Lember <[email protected]>
+
+ [GTK][Win]: Fix plugin drawing to an offscreen buffer
+ https://bugs.webkit.org/show_bug.cgi?id=89499
+
+ Reviewed by Brent Fulgham.
+
+ Take into account that the GTK+ port draws to a backing store and adjust
+ the target rectangle calculation accordingly.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::setNPWindowRect):
+
2012-06-28 Kentaro Hara <[email protected]>
Optimize Dromaeo/dom-attr.html by speeding up Element::getAttribute()
Modified: trunk/Source/WebCore/plugins/win/PluginViewWin.cpp (121440 => 121441)
--- trunk/Source/WebCore/plugins/win/PluginViewWin.cpp 2012-06-28 17:14:23 UTC (rev 121440)
+++ trunk/Source/WebCore/plugins/win/PluginViewWin.cpp 2012-06-28 18:00:42 UTC (rev 121441)
@@ -648,7 +648,15 @@
}
ASSERT(parent()->isFrameView());
+
+ // In the GTK port we draw in an offscreen buffer and don't want to use the window
+ // coordinates.
+#if PLATFORM(GTK)
+ IntRect rectInWindow(rect);
+ rectInWindow.intersect(frameRect());
+#else
IntRect rectInWindow = static_cast<FrameView*>(parent())->contentsToWindow(frameRect());
+#endif
LocalWindowsContext windowsContext(context, rectInWindow, m_isTransparent);
// On Safari/Windows without transparency layers the GraphicsContext returns the HDC
@@ -832,7 +840,13 @@
m_npWindow.clipRect.right = r.width();
m_npWindow.clipRect.bottom = r.height();
#else
+ // In the GTK port we draw in an offscreen buffer and don't want to use the window
+ // coordinates.
+# if PLATFORM(GTK)
+ IntPoint p = rect.location();
+# else
IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(rect.location());
+# endif
m_npWindow.x = p.x();
m_npWindow.y = p.y();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes