RESOLVED INVALID 105649
[Qt/Windows7] QWebView/QGraphicsWebView CPU consumption and wrong widgets state when animations are enabled
https://bugs.webkit.org/show_bug.cgi?id=105649
Summary [Qt/Windows7] QWebView/QGraphicsWebView CPU consumption and wrong widgets sta...
Mozhaev Grigory
Reported 2012-12-21 12:10:35 PST
Created attachment 180542 [details] CPU high load when visited webpage with radiogroup widgets in it When animations for widgets in Windows 7 are enabled then QtWebkit textareas, radiogroups and some other widgets makes CPU high load (see attachment screenshot). Btw, animations also do not work properly (see attachment picture, radiogroup with 2 checked radioboxes). The problem is how widgets/style/qwindowsvistastyle.cpp stores widget previous style state to compare with current state: QObject *styleObject = option->styleObject; styleObject->setProperty("_q_no_animation", true); int oldState = styleObject->property("_q_stylestate").toInt(); oldRect = styleObject->property("_q_stylerect").toRect(); newRect = option->rect; styleObject->setProperty("_q_stylestate", (int)option->state); styleObject->setProperty("_q_stylerect", option->rect); However for each normal widget this object (widget itself) is unique, but for QtWebkit widgets styleObject - a global object (a painting surface?) returned by QStyleFacadeImp::widgetForPainter(QPainter* painter) function (see, WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp). This global object produces problem by sharing set/get style option state for different widgets on a page. This makes CPU high and memory leaking due inifite loop of animations. How to reproduce: 1. Turn all animations on in Windows 7 2. Visit any webpage where is textarea or radiogroups presented from QWebView or QGraphicsView, like: http://echoecho.com/htmlforms10.htm 3. Got CPU High and sometimes memory leaking
Attachments
CPU high load when visited webpage with radiogroup widgets in it (115.07 KB, image/png)
2012-12-21 12:10 PST, Mozhaev Grigory
no flags
Force to disable state animations for qtwebkit widgets for windows7 (938 bytes, patch)
2012-12-21 12:13 PST, Mozhaev Grigory
no flags
Mozhaev Grigory
Comment 1 2012-12-21 12:13:31 PST
Created attachment 180543 [details] Force to disable state animations for qtwebkit widgets for windows7 The easiest way to solve the problem is force to disable animations for widgets from QtWebkit (patch attached) at least for a while.
Note You need to log in before you can comment on or make changes to this bug.