Changeset 55991 in webkit


Ignore:
Timestamp:
Mar 15, 2010 6:02:28 AM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2010-03-13 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Timothy Hatcher.

WebInspector: Position of GraphBar elements is calculating more carefully
and they fully visible at the bottom of Timeline panel.


http://bugs.webkit.org/show_bug.cgi?id=35966

  • inspector/front-end/TimelinePanel.js: (WebInspector.TimelineRecordGraphRow.prototype.update):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55990 r55991  
     12010-03-13  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        WebInspector: Position of GraphBar elements is calculating more carefully
     6        and they fully visible at the bottom of Timeline panel.
     7       
     8        http://bugs.webkit.org/show_bug.cgi?id=35966
     9
     10        * inspector/front-end/TimelinePanel.js:
     11        (WebInspector.TimelineRecordGraphRow.prototype.update):
     12
    1132010-03-15  MORITA Hajime  <morrita@google.com>
    214
  • trunk/WebCore/inspector/front-end/TimelinePanel.js

    r55806 r55991  
    571571    update: function(record, isEven, calculator, clientWidth, expandOffset, index)
    572572    {
     573        const minWidth = 5;
     574        const borderWidth = 4;
     575        var workingArea = clientWidth - expandOffset - minWidth - borderWidth;
    573576        this._record = record;
    574577        this.element.className = "timeline-graph-side timeline-category-" + record.category.name + (isEven ? " even" : "");
    575578        var percentages = calculator.computeBarGraphPercentages(record);
    576         var left = percentages.start / 100 * clientWidth;
    577         var width = (percentages.end - percentages.start) / 100 * clientWidth;
     579        var left = percentages.start / 100 * workingArea;
     580        var width = (percentages.end - percentages.start) / 100 * workingArea;
     581        width = width > minWidth ? width : minWidth;
    578582        this._barElement.style.left = (left + expandOffset) + "px";
    579583        this._barElement.style.width = width + "px";
Note: See TracChangeset for help on using the changeset viewer.