[Webkit-unassigned] [Bug 40082] New: [Qt] Dropdown box is seen twice in a webpage.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 2 13:52:26 PDT 2010


           Summary: [Qt] Dropdown box is seen twice in a webpage.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: S60 Hardware
        OS/Version: S60 3rd edition
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ostapenko.viatcheslav at nokia.com

Easy to reproduce with QGraphicsWebView: load a page with a select list, open the dropdown, then switch windows and see the page again. The select combobox is drawn twice (possibly need to scroll the page to see the second one). Reproducible on ALL platforms when using the QGraphicsWebView.

Drawing the dropdowns consist of two parts: drawing the combobox itself and drawing the dropdown (or popup as it’s called). When not using graphics view, Webkit renders the combobox itself via RenderTheme, and draws the popup using QComboBox::showPopup. When using QGraphicsWebView the combobox gets drawn twice because the popup is rendered via a QGraphicsProxyWidget that is wrapping a QComboBox. So, in graphics scene there is a graphics item having the QComboBox on top of the QGraphicsWebView, and the QGraphicsWebView has already drawn the combobox once.

When clicking somewhere on the page, we are calling hidePopup() for the popup and proxy->setVisible(false) gets called specifically. However, when QGraphicsView loses the focus, popups are removed but the graphics item (combobox) itself is not. So, graphics view really works as expected. It’s not even supposed to remove any comboboxes added to it when the focus changes, just to close any open popups. It’s not possible to get focus events to QWebPopup so we cannot just call proxy->setVisible(false) when losing the focus.

Anyway, I think the real problem is that we are overdrawing the combobox when using the proxy widget. One way to fix this would be to make sure we are not drawing twice. Just inherit from QGraphicsProxyWidget and overwrite the paint method and don’t draw anything there.

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