Changeset 146969 in webkit


Ignore:
Timestamp:
Mar 27, 2013 12:31:20 AM (11 years ago)
Author:
loislo@chromium.org
Message:

Web Inspector: Timeline. Scroll dividers with the underlying events.
https://bugs.webkit.org/show_bug.cgi?id=113315

Reviewed by Pavel Feldman.

Now when TimelineGrid is able to draw dividers with any offset
we could cut away paddingLeft member of Timeline.Calculator
and clear the code of TimelineGrid.

  • inspector/front-end/TimelineGrid.js:

(WebInspector.TimelineGrid.prototype.updateDividers):

  • inspector/front-end/TimelinePanel.js:

(WebInspector.TimelinePanel.prototype._refresh):
(WebInspector.TimelineCalculator.prototype.computePosition):
(WebInspector.TimelineCalculator.prototype.setDisplayWindow):
(WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):

  • inspector/front-end/inspectorCommon.css:

(.resources-dividers-label-bar):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r146968 r146969  
     12013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: Timeline. Scroll dividers with the underlying events.
     4        https://bugs.webkit.org/show_bug.cgi?id=113315
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Now when TimelineGrid is able to draw dividers with any offset
     9        we could cut away paddingLeft member of Timeline.Calculator
     10        and clear the code of TimelineGrid.
     11
     12        * inspector/front-end/TimelineGrid.js:
     13        (WebInspector.TimelineGrid.prototype.updateDividers):
     14        * inspector/front-end/TimelinePanel.js:
     15        (WebInspector.TimelinePanel.prototype._refresh):
     16        (WebInspector.TimelineCalculator.prototype.computePosition):
     17        (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
     18        (WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):
     19        * inspector/front-end/inspectorCommon.css:
     20        (.resources-dividers-label-bar):
     21
    1222013-03-27  Kondapally Kalyan  <kalyan.kondapally@intel.com>
    223
  • trunk/Source/WebCore/inspector/front-end/TimelineGrid.js

    r146890 r146969  
    9090        var dividerLabelBar = this._dividersLabelBarElement.firstChild;
    9191
    92         var paddingLeft = calculator.paddingLeft;
    9392        var sliceRemainder = (calculator.minimumBoundary() - calculator.grandMinimumBoundary()) % slice;
    94         for (var i = paddingLeft ? 0 : 1; i <= dividerCount; ++i) {
     93        for (var i = 0; i <= dividerCount; ++i) {
    9594            if (!divider) {
    9695                divider = document.createElement("div");
     
    107106            }
    108107
    109             if (i === (paddingLeft ? 0 : 1)) {
     108            if (!i) {
    110109                divider.addStyleClass("first");
    111110                dividerLabelBar.addStyleClass("first");
     
    125124            var left;
    126125            if (!slice) {
    127                 left = dividersElementClientWidth / dividerCount * i + paddingLeft;
     126                left = dividersElementClientWidth / dividerCount * i;
    128127                dividerLabelBar._labelElement.textContent = "";
    129128            } else {
  • trunk/Source/WebCore/inspector/front-end/TimelinePanel.js

    r146890 r146969  
    785785        }
    786786
    787         this._timelinePaddingLeft = !this._overviewPane.windowLeft() ? this._expandOffset : 0;
     787        this._timelinePaddingLeft = this._expandOffset;
    788788        this._calculator.setWindow(this._overviewPane.windowStartTime(), this._overviewPane.windowEndTime());
    789789        this._calculator.setDisplayWindow(this._timelinePaddingLeft, this._graphRowsElementWidth);
     
    12931293    computePosition: function(time)
    12941294    {
    1295         return (time - this._minimumBoundary) / this.boundarySpan() * this._workingArea + this.paddingLeft;
     1295        return (time - this._minimumBoundary) / this.boundarySpan() * this._workingArea + this._paddingLeft;
    12961296    },
    12971297
     
    13371337    {
    13381338        this._workingArea = clientWidth - WebInspector.TimelineCalculator._minWidth - paddingLeft;
    1339         this.paddingLeft = paddingLeft;
     1339        this._paddingLeft = paddingLeft;
    13401340    },
    13411341
     
    13571357    grandMinimumBoundary: function()
    13581358    {
    1359         return this._minimumBoundary;
     1359        return this._model.minimumRecordTime();
    13601360    },
    13611361
  • trunk/Source/WebCore/inspector/front-end/inspectorCommon.css

    r146871 r146969  
    9292    pointer-events: none;
    9393    cursor: move;
     94    overflow: hidden;
    9495}
    9596
Note: See TracChangeset for help on using the changeset viewer.