Commit 54329e89 authored by loislo@chromium.org's avatar loislo@chromium.org
Browse files

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fb89741f
2013-03-26 Ilya Tikhonovsky <loislo@chromium.org>
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):
2013-03-27 Kondapally Kalyan <kalyan.kondapally@intel.com>
 
[CoordGfx] Support to share GraphicsSurface flags with client.
......@@ -89,9 +89,8 @@ WebInspector.TimelineGrid.prototype = {
var divider = this._dividersElement.firstChild;
var dividerLabelBar = this._dividersLabelBarElement.firstChild;
var paddingLeft = calculator.paddingLeft;
var sliceRemainder = (calculator.minimumBoundary() - calculator.grandMinimumBoundary()) % slice;
for (var i = paddingLeft ? 0 : 1; i <= dividerCount; ++i) {
for (var i = 0; i <= dividerCount; ++i) {
if (!divider) {
divider = document.createElement("div");
divider.className = "resources-divider";
......@@ -106,7 +105,7 @@ WebInspector.TimelineGrid.prototype = {
this._dividersLabelBarElement.appendChild(dividerLabelBar);
}
if (i === (paddingLeft ? 0 : 1)) {
if (!i) {
divider.addStyleClass("first");
dividerLabelBar.addStyleClass("first");
} else {
......@@ -124,7 +123,7 @@ WebInspector.TimelineGrid.prototype = {
var left;
if (!slice) {
left = dividersElementClientWidth / dividerCount * i + paddingLeft;
left = dividersElementClientWidth / dividerCount * i;
dividerLabelBar._labelElement.textContent = "";
} else {
left = calculator.computePosition(calculator.minimumBoundary() + slice * i - sliceRemainder);
......
......@@ -784,7 +784,7 @@ WebInspector.TimelinePanel.prototype = {
delete this._refreshTimeout;
}
this._timelinePaddingLeft = !this._overviewPane.windowLeft() ? this._expandOffset : 0;
this._timelinePaddingLeft = this._expandOffset;
this._calculator.setWindow(this._overviewPane.windowStartTime(), this._overviewPane.windowEndTime());
this._calculator.setDisplayWindow(this._timelinePaddingLeft, this._graphRowsElementWidth);
......@@ -1292,7 +1292,7 @@ WebInspector.TimelineCalculator.prototype = {
*/
computePosition: function(time)
{
return (time - this._minimumBoundary) / this.boundarySpan() * this._workingArea + this.paddingLeft;
return (time - this._minimumBoundary) / this.boundarySpan() * this._workingArea + this._paddingLeft;
},
computeBarGraphPercentages: function(record)
......@@ -1336,7 +1336,7 @@ WebInspector.TimelineCalculator.prototype = {
setDisplayWindow: function(paddingLeft, clientWidth)
{
this._workingArea = clientWidth - WebInspector.TimelineCalculator._minWidth - paddingLeft;
this.paddingLeft = paddingLeft;
this._paddingLeft = paddingLeft;
},
formatTime: function(value)
......@@ -1356,7 +1356,7 @@ WebInspector.TimelineCalculator.prototype = {
grandMinimumBoundary: function()
{
return this._minimumBoundary;
return this._model.minimumRecordTime();
},
boundarySpan: function()
......
......@@ -91,6 +91,7 @@ iframe.view {
z-index: 200;
pointer-events: none;
cursor: move;
overflow: hidden;
}
.resources-divider {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment