Title: [195544] trunk/Source/WebInspectorUI
Revision
195544
Author
[email protected]
Date
2016-01-25 11:48:45 -0800 (Mon, 25 Jan 2016)

Log Message

Web Inspector: Reduce unnecessary forced layouts in TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=153392
<rdar://problem/24312344>

Patch by Joseph Pecoraro <[email protected]> on 2016-01-25
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.layout):
Ignore setting the scrollLeft if we would be setting it to 0.
This helps avoid a forced layout in common cases.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (195543 => 195544)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-01-25 18:41:27 UTC (rev 195543)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-01-25 19:48:45 UTC (rev 195544)
@@ -1,3 +1,16 @@
+2016-01-25  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Reduce unnecessary forced layouts in TimelineOverview
+        https://bugs.webkit.org/show_bug.cgi?id=153392
+        <rdar://problem/24312344>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TimelineOverview.js:
+        (WebInspector.TimelineOverview.prototype.layout):
+        Ignore setting the scrollLeft if we would be setting it to 0.
+        This helps avoid a forced layout in common cases.
+
 2016-01-25  Johan K. Jensen  <[email protected]>
 
         Web Inspector: timelines clear button should be inactive if nothing can be cleared

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (195543 => 195544)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-01-25 18:41:27 UTC (rev 195543)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-01-25 19:48:45 UTC (rev 195544)
@@ -373,7 +373,9 @@
 
         if (!this._dontUpdateScrollLeft) {
             this._ignoreNextScrollEvent = true;
-            this._scrollContainerElement.scrollLeft = Math.ceil((scrollStartTime - this._startTime) / this._durationPerPixel);
+            let scrollLeft = Math.ceil((scrollStartTime - this._startTime) / this._durationPerPixel);
+            if (scrollLeft)
+                this._scrollContainerElement.scrollLeft = scrollLeft;
         }
 
         for (let timelineOverviewGraph of this._timelineOverviewGraphsMap.values()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to