Changeset 195544 in webkit


Ignore:
Timestamp:
Jan 25, 2016 11:48:45 AM (8 years ago)
Author:
commit-queue@webkit.org
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 <Joseph Pecoraro> 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.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r195536 r195544  
     12016-01-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Reduce unnecessary forced layouts in TimelineOverview
     4        https://bugs.webkit.org/show_bug.cgi?id=153392
     5        <rdar://problem/24312344>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Views/TimelineOverview.js:
     10        (WebInspector.TimelineOverview.prototype.layout):
     11        Ignore setting the scrollLeft if we would be setting it to 0.
     12        This helps avoid a forced layout in common cases.
     13
    1142016-01-25  Johan K. Jensen  <jj@johanjensen.dk>
    215
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js

    r195504 r195544  
    374374        if (!this._dontUpdateScrollLeft) {
    375375            this._ignoreNextScrollEvent = true;
    376             this._scrollContainerElement.scrollLeft = Math.ceil((scrollStartTime - this._startTime) / this._durationPerPixel);
     376            let scrollLeft = Math.ceil((scrollStartTime - this._startTime) / this._durationPerPixel);
     377            if (scrollLeft)
     378                this._scrollContainerElement.scrollLeft = scrollLeft;
    377379        }
    378380
Note: See TracChangeset for help on using the changeset viewer.