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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js
index 448c76f556da986d4d96e1e65ff9d55a50718e02..6353e4831046faa0d9d619ee93dde7bc238cc19e 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js
@@ -733,8 +733,10 @@ WebInspector.TimelineView.prototype = {
var taskBarElement = e.target.enclosingNodeOrSelfWithClass("timeline-graph-bar");
if (taskBarElement && taskBarElement._tasksInfo) {
- var offset = taskBarElement.offsetLeft;
- this._timelineGrid.showCurtains(offset >= 0 ? offset : 0, taskBarElement.offsetWidth);
+ var parentWidth = taskBarElement.parentElement.offsetWidth;
+ var offset = Math.max(0, taskBarElement.offsetLeft);
+ var width = taskBarElement.offsetWidth;
+ this._timelineGrid.showCurtains(offset / parentWidth, (offset + width) / parentWidth);
} else
this._timelineGrid.hideCurtains();
},
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698