Title: [126033] releases/WebKitGTK/webkit-1.8/Source/WebCore
- Revision
- 126033
- Author
- [email protected]
- Date
- 2012-08-20 09:18:03 -0700 (Mon, 20 Aug 2012)
Log Message
Merge 121441 - [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: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (126032 => 126033)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-08-20 16:13:19 UTC (rev 126032)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-08-20 16:18:03 UTC (rev 126033)
@@ -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-02-28 Nikolas Zimmermann <[email protected]>
Integrate SVGUseElement within the new shadow root concept
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/win/PluginViewWin.cpp (126032 => 126033)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/win/PluginViewWin.cpp 2012-08-20 16:13:19 UTC (rev 126032)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/win/PluginViewWin.cpp 2012-08-20 16:18:03 UTC (rev 126033)
@@ -628,7 +628,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
@@ -812,7 +820,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/webkit-changes