[Webkit-unassigned] [Bug 36373] New: [Qt] Don't construct a QLineEdit every time when painting a text field

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 19 09:40:25 PDT 2010


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

           Summary: [Qt] Don't construct a QLineEdit every time when
                    painting a text field
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jwieczorek at webkit.org


In RenderThemeQt.cpp there is this magic findFrameLineWidth() function, which
queries the style for the frame line width:

static int findFrameLineWidth(QStyle* style)
{
    QLineEdit lineEdit;
    QStyleOptionFrameV2 opt;
    return style->pixelMetric(QStyle::PM_DefaultFrameWidth, &opt, &lineEdit);
}

It needs to provide the style with a widget so that the style will give the
right width, but constructing it every time seems like an overkill. Making it
static and keeping one instance in the memory should not hurt the memory
consumption too much.

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