Title: [121033] trunk/Source/WebCore
- Revision
- 121033
- Author
- [email protected]
- Date
- 2012-06-22 09:55:59 -0700 (Fri, 22 Jun 2012)
Log Message
Web Inspector: only increase length for timeline bars below minimal width
https://bugs.webkit.org/show_bug.cgi?id=89727
Reviewed by Pavel Feldman.
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
(WebInspector.TimelineCalculator.prototype.setDisplayWindow):
(WebInspector.TimelineRecordGraphRow.prototype.update):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121032 => 121033)
--- trunk/Source/WebCore/ChangeLog 2012-06-22 16:49:31 UTC (rev 121032)
+++ trunk/Source/WebCore/ChangeLog 2012-06-22 16:55:59 UTC (rev 121033)
@@ -1,3 +1,15 @@
+2012-06-21 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: only increase length for timeline bars below minimal width
+ https://bugs.webkit.org/show_bug.cgi?id=89727
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
+ (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
+ (WebInspector.TimelineRecordGraphRow.prototype.update):
+
2012-06-22 David Kilzer <[email protected]>
BUILD FIX: FormController.cpp fails to build on 32-bit architectures
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (121032 => 121033)
--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2012-06-22 16:49:31 UTC (rev 121032)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2012-06-22 16:55:59 UTC (rev 121033)
@@ -831,7 +831,6 @@
}
WebInspector.TimelineCalculator._minWidth = 5;
-WebInspector.TimelineCalculator._borderWidth = 4;
WebInspector.TimelineCalculator.prototype = {
/**
@@ -854,13 +853,19 @@
computeBarGraphWindowPosition: function(record)
{
var percentages = this.computeBarGraphPercentages(record);
+ var widthAdjustment = 0;
var left = this.computePosition(record.startTime);
- var width = (percentages.end - percentages.start) / 100 * this._workingArea + WebInspector.TimelineCalculator._minWidth;
- var widthWithChildren = (percentages.endWithChildren - percentages.start) / 100 * this._workingArea;
- var cpuWidth = percentages.cpuWidth / 100 * this._workingArea + WebInspector.TimelineCalculator._minWidth;
+ var width = (percentages.end - percentages.start) / 100 * this._workingArea;
+ if (width < WebInspector.TimelineCalculator._minWidth) {
+ widthAdjustment = WebInspector.TimelineCalculator._minWidth - width;
+ left -= widthAdjustment / 2;
+ width += widthAdjustment;
+ }
+ var widthWithChildren = (percentages.endWithChildren - percentages.start) / 100 * this._workingArea + widthAdjustment;
+ var cpuWidth = percentages.cpuWidth / 100 * this._workingArea + widthAdjustment;
if (percentages.endWithChildren > percentages.end)
- widthWithChildren += WebInspector.TimelineCalculator._borderWidth + WebInspector.TimelineCalculator._minWidth;
+ widthWithChildren += widthAdjustment;
return {left: left, width: width, widthWithChildren: widthWithChildren, cpuWidth: cpuWidth};
},
@@ -877,7 +882,7 @@
*/
setDisplayWindow: function(paddingLeft, clientWidth)
{
- this._workingArea = clientWidth - WebInspector.TimelineCalculator._minWidth - WebInspector.TimelineCalculator._borderWidth - paddingLeft;
+ this._workingArea = clientWidth - WebInspector.TimelineCalculator._minWidth - paddingLeft;
this.paddingLeft = paddingLeft;
},
@@ -985,7 +990,7 @@
this._barWithChildrenElement.style.left = barPosition.left + "px";
this._barWithChildrenElement.style.width = barPosition.widthWithChildren + "px";
this._barElement.style.left = barPosition.left + "px";
- this._barElement.style.width = barPosition.width + "px";
+ this._barElement.style.width = barPosition.width + "px";
this._barCpuElement.style.left = barPosition.left + "px";
this._barCpuElement.style.width = barPosition.cpuWidth + "px";
this._expandElement._update(record, index, barPosition.left - expandOffset, barPosition.width);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes