[webkit-reviews] review denied: [Bug 36373] [Qt] Don't construct a QLineEdit every time when painting a text field : [Attachment 51163] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 21 15:40:43 PDT 2010


Simon Hausmann <hausmann at webkit.org> has denied Jakub Wieczorek
<jwieczorek at webkit.org>'s request for review:
Bug 36373: [Qt] Don't construct a QLineEdit every time when painting a text
field
https://bugs.webkit.org/show_bug.cgi?id=36373

Attachment 51163: patch
https://bugs.webkit.org/attachment.cgi?id=51163&action=review

------- Additional Comments from Simon Hausmann <hausmann at webkit.org>
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.

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.

It's not perfect as it wouldn't follow style changes, but it's a start :)

I'm going to say r- because I believe we should destroy the QLineEdit instance
earlier. But otherwise a great catch!


More information about the webkit-reviews mailing list