Title: [188506] trunk/Source/WebInspectorUI
- Revision
- 188506
- Author
- [email protected]
- Date
- 2015-08-14 20:47:04 -0700 (Fri, 14 Aug 2015)
Log Message
Web Inspector: NavigationBar.updateLayoutSoon should use requestAnimationFrame
https://bugs.webkit.org/show_bug.cgi?id=148010
Reviewed by Brian Burg.
NavigationBar.updateLayoutSoon now uses requestAnimationFrame instead of setTimeout.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.updateLayoutSoon.update):
(WebInspector.NavigationBar.prototype.updateLayoutSoon):
(WebInspector.NavigationBar.prototype.updateLayout):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (188505 => 188506)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-08-15 03:24:41 UTC (rev 188505)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-08-15 03:47:04 UTC (rev 188506)
@@ -1,3 +1,18 @@
+2015-08-14 Matt Baker <[email protected]>
+
+ Web Inspector: NavigationBar.updateLayoutSoon should use requestAnimationFrame
+ https://bugs.webkit.org/show_bug.cgi?id=148010
+
+ Reviewed by Brian Burg.
+
+ NavigationBar.updateLayoutSoon now uses requestAnimationFrame instead of setTimeout.
+
+ * UserInterface/Views/NavigationBar.js:
+ (WebInspector.NavigationBar):
+ (WebInspector.NavigationBar.prototype.updateLayoutSoon.update):
+ (WebInspector.NavigationBar.prototype.updateLayoutSoon):
+ (WebInspector.NavigationBar.prototype.updateLayout):
+
2015-08-14 Devin Rousso <[email protected]>
Web Inspector: Add VisualStyleDetailsPanel
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js (188505 => 188506)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js 2015-08-15 03:24:41 UTC (rev 188505)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js 2015-08-15 03:47:04 UTC (rev 188506)
@@ -122,27 +122,27 @@
updateLayoutSoon()
{
- if (this._updateLayoutTimeout)
+ if (this._updateLayoutIdentifier)
return;
this._needsLayout = true;
function update()
{
- delete this._updateLayoutTimeout;
+ this._updateLayoutIdentifier = undefined;
if (this._needsLayout || this._needsStyleUpdated)
this.updateLayout();
}
- this._updateLayoutTimeout = setTimeout(update.bind(this), 0);
+ this._updateLayoutIdentifier = requestAnimationFrame(update.bind(this));
}
updateLayout()
{
- if (this._updateLayoutTimeout) {
- clearTimeout(this._updateLayoutTimeout);
- delete this._updateLayoutTimeout;
+ if (this._updateLayoutIdentifier) {
+ cancelAnimationFrame(this._updateLayoutIdentifier);
+ this._updateLayoutIdentifier = undefined;
}
if (this._needsStyleUpdated)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes