Bug 32174 - QWebFrame::render() does not repaint QtPluginWidgets in the frame
Summary: QWebFrame::render() does not repaint QtPluginWidgets in the frame
Status: RESOLVED DUPLICATE of bug 34415
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-12-04 15:05 PST by Robert Hogan
Modified: 2010-06-20 08:29 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hogan 2009-12-04 15:05:12 PST
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.
Comment 1 Simon Hausmann 2010-03-10 05:13:53 PST
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 ;(
Comment 2 Tor Arne Vestbø 2010-03-10 06:26:50 PST
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
Comment 3 Kent Hansen 2010-03-12 03:02:57 PST
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?
Comment 4 Robert Hogan 2010-06-20 08:29:58 PDT

*** This bug has been marked as a duplicate of bug 34415 ***