[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:19:59 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit a4236fb02ab53263119d5e5d5c709a316457fbd0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 27 02:50:04 2009 +0000
2009-10-26 Girish Ramakrishnan <girish at forwardbias.in>
Reviewed by Antti Koivisto.
[Qt] Windowless Plugins : Print preview shows only part of flash when view is scrolled
When printing, QPrinter's preview mode uses a QPicture to capture the output. The
QPicture holds a reference to the X Pixmap. As a result, the print preview would
update itself when the X Pixmap changes. To prevent the print preview from updating
whenever m_drawable is updated (i.e when the view updates), we create a copy.
We require that a QPixmap::copy() result in a QPixmap backed by a XPixmap
regardless of the graphicssystem. This is taken care of by
commit d310f7c710ecb331a9689861f0551eabd38e946e in Qt (4.6)
The beauty of this patch is that the newly created X Pixmap is managed by Qt and
it will free the Pixmap whenever the user closes the print preview dialog and
handles the case of displaying multiple preview dialogs nicely.
All credit to Samuel Rødal for suggesting usage of QPixmap::copy().
https://bugs.webkit.org/show_bug.cgi?id=30714
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::paint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a9b095a..3745704 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2009-10-26 Girish Ramakrishnan <girish at forwardbias.in>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Windowless Plugins : Print preview shows only part of flash when view is scrolled
+
+ When printing, QPrinter's preview mode uses a QPicture to capture the output. The
+ QPicture holds a reference to the X Pixmap. As a result, the print preview would
+ update itself when the X Pixmap changes. To prevent the print preview from updating
+ whenever m_drawable is updated (i.e when the view updates), we create a copy.
+
+ We require that a QPixmap::copy() result in a QPixmap backed by a XPixmap
+ regardless of the graphicssystem. This is taken care of by
+ commit d310f7c710ecb331a9689861f0551eabd38e946e in Qt (4.6)
+
+ The beauty of this patch is that the newly created X Pixmap is managed by Qt and
+ it will free the Pixmap whenever the user closes the print preview dialog and
+ handles the case of displaying multiple preview dialogs nicely.
+
+ All credit to Samuel Rødal for suggesting usage of QPixmap::copy().
+
+ https://bugs.webkit.org/show_bug.cgi?id=30714
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paint):
+
2009-10-26 Benjamin Otte <otte at gnome.org>
Reviewed by Gustavo Noronha.
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index 9d025a8..a8270dd 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -186,6 +186,12 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
const int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth;
ASSERT(drawableDepth == qtDrawable.depth());
+ // When printing, Qt uses a QPicture the capture the output in preview mode. The
+ // QPicture holds a reference to the X Pixmap. As a result, the print preview would
+ // update itself when the X Pixmap changes. To prevent this, we create a copy.
+ if (m_element->document()->printing())
+ qtDrawable = qtDrawable.copy();
+
if (m_isTransparent && drawableDepth != 32) {
// Attempt content propagation for drawable with no alpha by copying over from the backing store
QPoint offset;
@@ -221,7 +227,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
XGraphicsExposeEvent& exposeEvent = xevent.xgraphicsexpose;
exposeEvent.type = GraphicsExpose;
exposeEvent.display = QX11Info::display();
- exposeEvent.drawable = m_drawable;
+ exposeEvent.drawable = qtDrawable.handle();
exposeEvent.x = exposedRect.x();
exposeEvent.y = exposedRect.y();
exposeEvent.width = exposedRect.x() + exposedRect.width(); // flash bug? it thinks width is the right in transparent mode
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list