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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 21 15:48:33 PDT 2010


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





--- Comment #3 from Jakub Wieczorek <jwieczorek at webkit.org>  2010-03-21 15:48:33 PST ---
(In reply to comment #2)
> (From update of attachment 51163 [details])
> Good catch Jakub!!
> 
> It really sucks that we have to create a QLineEdit instance in the first place
> :-(, but I understand that this is a flaw in the QStyle API.
> 
> Instead of creating a global QLineEdit that runs the risk of being destructed
> after the QApplication destructor, how about assocating it with the
> RenderTheme? Then it would be destroyed when the page dies.

With this patch, QLineEdit would not be destructed as such -
DEFINE_STATIC_LOCAL allocates an object on the heap so the destructor would not
be called at the exit.

> Alternatively you could _cache_ the frame width in the RenderThemeQt as a
> member variable and initialize it through a temporary QLineEdit instance the
> first time it's queried.

Would this work with style changes during the application lifetime?

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