Changeset 50123 in webkit
- Timestamp:
- Oct 26, 2009 7:50:04 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r50122 r50123 1 2009-10-26 Girish Ramakrishnan <girish@forwardbias.in> 2 3 Reviewed by Antti Koivisto. 4 5 [Qt] Windowless Plugins : Print preview shows only part of flash when view is scrolled 6 7 When printing, QPrinter's preview mode uses a QPicture to capture the output. The 8 QPicture holds a reference to the X Pixmap. As a result, the print preview would 9 update itself when the X Pixmap changes. To prevent the print preview from updating 10 whenever m_drawable is updated (i.e when the view updates), we create a copy. 11 12 We require that a QPixmap::copy() result in a QPixmap backed by a XPixmap 13 regardless of the graphicssystem. This is taken care of by 14 commit d310f7c710ecb331a9689861f0551eabd38e946e in Qt (4.6) 15 16 The beauty of this patch is that the newly created X Pixmap is managed by Qt and 17 it will free the Pixmap whenever the user closes the print preview dialog and 18 handles the case of displaying multiple preview dialogs nicely. 19 20 All credit to Samuel Rødal for suggesting usage of QPixmap::copy(). 21 22 https://bugs.webkit.org/show_bug.cgi?id=30714 23 24 * plugins/qt/PluginViewQt.cpp: 25 (WebCore::PluginView::paint): 26 1 27 2009-10-26 Benjamin Otte <otte@gnome.org> 2 28 -
trunk/WebCore/plugins/qt/PluginViewQt.cpp
r49975 r50123 187 187 ASSERT(drawableDepth == qtDrawable.depth()); 188 188 189 // When printing, Qt uses a QPicture the capture the output in preview mode. The 190 // QPicture holds a reference to the X Pixmap. As a result, the print preview would 191 // update itself when the X Pixmap changes. To prevent this, we create a copy. 192 if (m_element->document()->printing()) 193 qtDrawable = qtDrawable.copy(); 194 189 195 if (m_isTransparent && drawableDepth != 32) { 190 196 // Attempt content propagation for drawable with no alpha by copying over from the backing store … … 222 228 exposeEvent.type = GraphicsExpose; 223 229 exposeEvent.display = QX11Info::display(); 224 exposeEvent.drawable = m_drawable;230 exposeEvent.drawable = qtDrawable.handle(); 225 231 exposeEvent.x = exposedRect.x(); 226 232 exposeEvent.y = exposedRect.y();
Note: See TracChangeset
for help on using the changeset viewer.