If I do something like the following in QWebView::paintEvent(): QPainter p(this); QWebFrame* frame; frame->render(&p, QRegion); p.setBrush(QColor(Qt::red)); p.drawRect(rect); A red rectangle is drawn over the frame, however any qtpluginwidgets in the frame are still visible. It turns out frame->render() calls WebCore::FrameView->paintContents() and I believe the qtpluginwidget receives no paint() or paintevent() for one of the following reasons: 1 - the Qt WebCore::Widget doesn't reimplement paint() so nothing gets done with the paint passed from paintContents() 2 - qtpluginwidget is a child of QWebView and the paint event is happening in QWebFrame so it won't receive it I'm currently stuck in trying to understand why the implementation of QtPluginWidget in frameloaderclientqt.cpp expects its parent to be a WebCore::FrameView when in createPlugin() in the same file its parent gets set as qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent()), which is a QWebView. As far as I can tell the two classes aren't related, so there's a gap in my understanding.
QtPluginWidget is a WebCore::Widget, but it exists merely to position the wrapped QWidget correctly, so that it's placed on top of the web content. That's why QWebFrame::render() doesn't include it ;(
Please follow the QtWebKit bug reporting guidelines when reporting bugs. See http://trac.webkit.org/wiki/QtWebKitBugs Specifically: - The 'QtWebKit' component should only be used for bugs/features in the public QtWebKit API layer, not to signify that the bug is specific to the Qt port of WebKit http://trac.webkit.org/wiki/QtWebKitBugs#Component - Add the keyword 'Qt' to signal that it's a Qt-related bug http://trac.webkit.org/wiki/QtWebKitBugs#Keywords
Is this the same underlying issue as https://bugs.webkit.org/show_bug.cgi?id=34415, i.e. that a plugin is a child widget and so is handled completely separately from the page content rendering? Is there a way to fix that?
*** This bug has been marked as a duplicate of bug 34415 ***