Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js

Issue 1427823002: DevTools: Grey out outside parts of selection window on timeline overview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refactor Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
index 2231ca073196dbfbe8628824a9f70a07c8a1a871..d656b32b2390b26a034596e18a02aaa658c176e5 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
@@ -44,8 +44,8 @@ WebInspector.TimelineGrid = function()
this._dividersLabelBarElement = this._gridHeaderElement.createChild("div", "resources-dividers-label-bar");
this.element.appendChild(this._gridHeaderElement);
- this._leftCurtainElement = this.element.createChild("div", "timeline-cpu-curtain-left");
- this._rightCurtainElement = this.element.createChild("div", "timeline-cpu-curtain-right");
+ this._leftCurtainElement = this.element.createChild("div", "timeline-curtain-left");
+ this._rightCurtainElement = this.element.createChild("div", "timeline-curtain-right");
}
/**
@@ -278,14 +278,14 @@ WebInspector.TimelineGrid.prototype = {
},
/**
- * @param {number} gapOffset
- * @param {number} gapWidth
+ * @param {number} left
+ * @param {number} right
*/
- showCurtains: function(gapOffset, gapWidth)
+ showCurtains: function(left, right)
{
- this._leftCurtainElement.style.width = gapOffset + "px";
+ this._leftCurtainElement.style.width = (100 * left).toFixed(2) + "%";
this._leftCurtainElement.classList.remove("hidden");
- this._rightCurtainElement.style.left = (gapOffset + gapWidth) + "px";
+ this._rightCurtainElement.style.width = (100 * (1 - right)).toFixed(2) + "%";
this._rightCurtainElement.classList.remove("hidden");
},

Powered by Google App Engine
This is Rietveld 408576698