Changeset 237430 in webkit


Ignore:
Timestamp:
Oct 25, 2018 3:57:45 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Network: more aggressively snap timing blocks together
https://bugs.webkit.org/show_bug.cgi?id=190439

Reviewed by Timothy Hatcher.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
(WI.NetworkTableContentView.prototype._populateWaterfallGraph):
If the time difference between the end of the previous block and the start of this block
would result in less than 2px of space, extend the next block back to the previous block.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r237401 r237430  
     12018-10-25  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Network: more aggressively snap timing blocks together
     4        https://bugs.webkit.org/show_bug.cgi?id=190439
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Views/NetworkTableContentView.js:
     9        (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
     10        (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
     11        If the time difference between the end of the previous block and the start of this block
     12        would result in less than 2px of space, extend the next block back to the previous block.
     13
    1142018-10-24  Devin Rousso  <drousso@apple.com>
    215
  • trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js

    r237349 r237430  
    745745        }
    746746
     747        let lastEndTimestamp = NaN;
    747748        function appendBlock(startTimestamp, endTimestamp, className) {
    748749            if (isNaN(startTimestamp) || isNaN(endTimestamp) || endTimestamp - startTimestamp <= 0)
    749750                return null;
     751
     752            if (Math.abs(startTimestamp - lastEndTimestamp) < secondsPerPixel * 2)
     753                startTimestamp = lastEndTimestamp;
     754            lastEndTimestamp = endTimestamp;
    750755
    751756            let block = container.appendChild(document.createElement("div"));
Note: See TracChangeset for help on using the changeset viewer.