[Webkit-unassigned] [Bug 72605] New: [Qt] QComboBox and CSS conflicts

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 17 06:17:22 PST 2011


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

           Summary: [Qt] QComboBox and CSS conflicts
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andy.shaw at digia.com


If a Qt application is setting the QComboBox font size to 10 pt and if the
application is also loading external webpages which have the <select>
objects that have a style attributed to them the the popup gets wrong
font. For instance:
<style type="text/css">
select {
font-size:7pt;
}
</style>

In this case the WebKit select combobox gets the 7 pt font (as it
should), but the popup gets the 10 pt font.

What happens is that it first gets set with the css font and then when
it gets shown the widget gets polished which means it gets the font form
the stylesheet.

Please, find an application that reproduces this issue attached.

This patch attached corrects the error:
---
a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
+++
b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -137,7 +137,8 @@ void QtFallbackWebPopup::show()
                                rect.width(),
m_combo->sizeHint().height()));
     }
-
+    m_combo->ensurePolished();
+    m_combo->setFont(font());
     QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(),
Qt::LeftButton,
                       Qt::LeftButton, Qt::NoModifier);
     QCoreApplication::sendEvent(m_combo, &event);

-- 
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