Title: [135357] trunk/Source/WebCore
Revision
135357
Author
commit-qu...@webkit.org
Date
2012-11-21 01:04:28 -0800 (Wed, 21 Nov 2012)

Log Message

Web Inspector: [Canvas] throttle wait icon in the ui
https://bugs.webkit.org/show_bug.cgi?id=102685

Patch by Andrey Adaikin <aand...@chromium.org> on 2012-11-21
Reviewed by Vsevolod Vlasov.

Do not show the wait icon for small operations during the replay to reduce flickering.

* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileView.prototype._enableWaitIcon):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (135356 => 135357)


--- trunk/Source/WebCore/ChangeLog	2012-11-21 08:51:09 UTC (rev 135356)
+++ trunk/Source/WebCore/ChangeLog	2012-11-21 09:04:28 UTC (rev 135357)
@@ -1,3 +1,15 @@
+2012-11-21  Andrey Adaikin  <aand...@chromium.org>
+
+        Web Inspector: [Canvas] throttle wait icon in the ui
+        https://bugs.webkit.org/show_bug.cgi?id=102685
+
+        Reviewed by Vsevolod Vlasov.
+
+        Do not show the wait icon for small operations during the replay to reduce flickering.
+
+        * inspector/front-end/CanvasProfileView.js:
+        (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
+
 2012-11-21  Kunihiko Sakamoto  <ksakam...@chromium.org>
 
         Enable datalist UI for input types datetime and datetime-local

Modified: trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js (135356 => 135357)


--- trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js	2012-11-21 08:51:09 UTC (rev 135356)
+++ trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js	2012-11-21 09:04:28 UTC (rev 135357)
@@ -106,7 +106,23 @@
      */
     _enableWaitIcon: function(enable)
     {
-        this._replayImageElement.className = enable ? "wait" : "";
+        function showWaitIcon()
+        {
+            this._replayImageElement.className = "wait";
+            this._debugInfoElement.textContent = "";
+            delete this._showWaitIconTimer;
+        }
+
+        if (enable && this._replayImageElement.src && !this._showWaitIconTimer)
+            this._showWaitIconTimer = setTimeout(showWaitIcon.bind(this), 250);
+        else {
+            if (this._showWaitIconTimer) {
+                clearTimeout(this._showWaitIconTimer);
+                delete this._showWaitIconTimer;
+            }
+            this._replayImageElement.className = enable ? "wait" : "";
+            this._debugInfoElement.textContent = "";
+        }
     },
 
     _replayTraceLog: function()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to