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.
Context menu should work with 31979. However, I cannot get Flash to process mouse events for the settings dialog it popups up, ATM.
=== Bulk closing of Qt bugs ===
If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.
If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.