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

Side by Side 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, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 * @param {!Event} e 726 * @param {!Event} e
727 */ 727 */
728 _mouseMove: function(e) 728 _mouseMove: function(e)
729 { 729 {
730 var rowElement = e.target.enclosingNodeOrSelfWithClass("timeline-tree-it em"); 730 var rowElement = e.target.enclosingNodeOrSelfWithClass("timeline-tree-it em");
731 if (!this._highlightQuad(rowElement)) 731 if (!this._highlightQuad(rowElement))
732 this._hideQuadHighlight(); 732 this._hideQuadHighlight();
733 733
734 var taskBarElement = e.target.enclosingNodeOrSelfWithClass("timeline-gra ph-bar"); 734 var taskBarElement = e.target.enclosingNodeOrSelfWithClass("timeline-gra ph-bar");
735 if (taskBarElement && taskBarElement._tasksInfo) { 735 if (taskBarElement && taskBarElement._tasksInfo) {
736 var offset = taskBarElement.offsetLeft; 736 var parentWidth = taskBarElement.parentElement.offsetWidth;
737 this._timelineGrid.showCurtains(offset >= 0 ? offset : 0, taskBarEle ment.offsetWidth); 737 var offset = Math.max(0, taskBarElement.offsetLeft);
738 var width = taskBarElement.offsetWidth;
739 this._timelineGrid.showCurtains(offset / parentWidth, (offset + widt h) / parentWidth);
738 } else 740 } else
739 this._timelineGrid.hideCurtains(); 741 this._timelineGrid.hideCurtains();
740 }, 742 },
741 743
742 /** 744 /**
743 * @param {!Event} event 745 * @param {!Event} event
744 */ 746 */
745 _keyDown: function(event) 747 _keyDown: function(event)
746 { 748 {
747 if (!this._lastSelectedRecord || event.shiftKey || event.metaKey || even t.ctrlKey) 749 if (!this._lastSelectedRecord || event.shiftKey || event.metaKey || even t.ctrlKey)
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 } else { 1304 } else {
1303 this._element.classList.add("hidden"); 1305 this._element.classList.add("hidden");
1304 } 1306 }
1305 }, 1307 },
1306 1308
1307 _dispose: function() 1309 _dispose: function()
1308 { 1310 {
1309 this._element.remove(); 1311 this._element.remove();
1310 } 1312 }
1311 } 1313 }
OLDNEW
« 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