[Webkit-unassigned] [Bug 31975] New: [Qt] Mac Plugins: Printing or drawing to QImage does not paint plugins

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 29 21:30:39 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31975

           Summary: [Qt] Mac Plugins: Printing or drawing to QImage does
                    not paint plugins
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: Plug-ins
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: girish at forwardbias.in


Currently, if you print a web page with flash, the flash does not appear.

The problem is that when painting, we paint using the contextref of the
platformPluginWidget. When printing you have to print using the printer's
contextref (same goes for drawing to QImage except that a QImage does not have
a contextref, afaik).

Problem can be solved in two ways in Qt:
1. Disable direct painting and always paint to offscreen drawable (in essence
this means removing the call to setPlatformPluginWidget for Qt). Since, we draw
to an offscreen drawable, QPainter takes care of painting to the QPixmap to the
target paint device. The two main things to fix are:
    * context menu positioning (since platformPluginWidget is not set,
topLevelOffset will return 0 and the context menu ends up in the wrong place)
    * check if there are performance regressions. Obviously, it will slower
with this change, we just need to know how much.

2. Probe the paint device and set the appropriate context ref. This is the
fastest approach but we will end up with some ugly code. Considerations for
this approach are
   * qt_mac_cg_context does not work for all paint devices - it does not work
for printers and qimage. I don't know if we can even return a cgcontext for a
QImage. This requires a fix in Qt.
   * I am not a big fan of device probing. As seen from the X11 code, it gets
really ugly and is based on Qt's implementation/internal behavior.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list