Title: [225217] trunk/Source/WebCore
Revision
225217
Author
[email protected]
Date
2017-11-28 07:13:23 -0800 (Tue, 28 Nov 2017)

Log Message

Remove dead debugging code in modern media controls
https://bugs.webkit.org/show_bug.cgi?id=180079

Patch by Antoine Quint <[email protected]> on 2017-11-28
Reviewed by Eric Carlson.

This debug utility is no longer necessary and is just dead code.

* Modules/modern-media-controls/controls/scheduler.js:
(const.scheduler.new.prototype.scheduleLayout):
(const.scheduler.new.prototype.unscheduleLayout):
(const.scheduler.new.prototype._requestFrameIfNeeded):
(const.scheduler.new.prototype._frameDidFire):
(const.scheduler.new.prototype._layout):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (225216 => 225217)


--- trunk/Source/WebCore/ChangeLog	2017-11-28 15:01:22 UTC (rev 225216)
+++ trunk/Source/WebCore/ChangeLog	2017-11-28 15:13:23 UTC (rev 225217)
@@ -1,5 +1,21 @@
 2017-11-28  Antoine Quint  <[email protected]>
 
+        Remove dead debugging code in modern media controls
+        https://bugs.webkit.org/show_bug.cgi?id=180079
+
+        Reviewed by Eric Carlson.
+
+        This debug utility is no longer necessary and is just dead code.
+
+        * Modules/modern-media-controls/controls/scheduler.js:
+        (const.scheduler.new.prototype.scheduleLayout):
+        (const.scheduler.new.prototype.unscheduleLayout):
+        (const.scheduler.new.prototype._requestFrameIfNeeded):
+        (const.scheduler.new.prototype._frameDidFire):
+        (const.scheduler.new.prototype._layout):
+
+2017-11-28  Antoine Quint  <[email protected]>
+
         Skip back and forward buttons should not hard-code their numeric amount in localised strings
         https://bugs.webkit.org/show_bug.cgi?id=180077
 

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js (225216 => 225217)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js	2017-11-28 15:01:22 UTC (rev 225216)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js	2017-11-28 15:13:23 UTC (rev 225217)
@@ -6,7 +6,6 @@
     {
         this._frameID = -1;
         this._layoutCallbacks = new Set;
-        this.debug = new Function;
     }
 
     // Public
@@ -18,29 +17,19 @@
 
     scheduleLayout(callback)
     {
-        this.debug("scheduleLayout() - start");
-        if (typeof callback !== "function") {
-            this.debug("scheduleLayout() - end - callback was not a function");
+        if (typeof callback !== "function")
             return;
-        }
 
         this._layoutCallbacks.add(callback);
         this._requestFrameIfNeeded();
-        this.debug(`scheduleLayout() - _layoutCallbacks.size = ${this._layoutCallbacks.size}`);
-        this.debug("scheduleLayout() - end");
     }
 
     unscheduleLayout(callback)
     {
-        this.debug("unscheduleLayout() - start");
-        if (typeof callback !== "function") {
-            this.debug("unscheduleLayout() - end - callback was not a function");
+        if (typeof callback !== "function")
             return;
-        }
 
         this._layoutCallbacks.delete(callback);
-        this.debug(`unscheduleLayout() - this._layoutCallbacks.size = ${this._layoutCallbacks.size}`);
-        this.debug("unscheduleLayout() - end");
     }
 
     flushScheduledLayoutCallbacks()
@@ -52,17 +41,12 @@
 
     _requestFrameIfNeeded()
     {
-        this.debug("_requestFrameIfNeeded()");
-        if (this._frameID === -1 && this._layoutCallbacks.size > 0) {
+        if (this._frameID === -1 && this._layoutCallbacks.size > 0)
             this._frameID = window.requestAnimationFrame(this._frameDidFire.bind(this));
-            this.debug(`_requestFrameIfNeeded() - registered rAF, _frameID = ${this._frameID}`);
-        } else
-            this.debug(`_requestFrameIfNeeded() - failed to register rAF call, _frameID = ${this._frameID}, _layoutCallbacks.size = ${this._layoutCallbacks.size}`);
     }
 
     _frameDidFire()
     {
-        this.debug("_frameDidFire() - start");
         if (typeof scheduler.frameWillFire === "function")
             scheduler.frameWillFire();
 
@@ -72,21 +56,16 @@
 
         if (typeof scheduler.frameDidFire === "function")
             scheduler.frameDidFire();
-        this.debug("_frameDidFire() - end");
     }
 
     _layout()
     {
-        this.debug("_layout() - start");
         // Layouts are not re-entrant.
         const layoutCallbacks = this._layoutCallbacks;
         this._layoutCallbacks = new Set;
 
-        this.debug(`_layout() - layoutCallbacks.size = ${layoutCallbacks.size}`);
-
         for (let callback of layoutCallbacks)
             callback();
-        this.debug("_layout() - end");
     }
 
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to