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

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

Issue 2553043003: [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: rebased Created 4 years 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 | « third_party/WebKit/Source/devtools/front_end/ui_lazy/OverviewGrid.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js
index 9daeb842bb168367b5b9e388bef5391b89cbc328..3992575fe6531b6a3da6900fa4ba9f4e1768bda3 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js
@@ -49,7 +49,7 @@ UI.TimelineOverviewPane = class extends UI.VBox {
this._overviewGrid.setResizeEnabled(false);
this._overviewGrid.addEventListener(UI.OverviewGrid.Events.WindowChanged, this._onWindowChanged, this);
- this._overviewGrid.addEventListener(UI.OverviewGrid.Events.Click, this._onClick, this);
+ this._overviewGrid.setClickHandler(this._onClick.bind(this));
this._overviewControls = [];
this._markers = new Map();
@@ -264,16 +264,15 @@ UI.TimelineOverviewPane = class extends UI.VBox {
}
/**
- * @param {!Common.Event} event
+ * @param {!Event} event
+ * @return {boolean}
*/
_onClick(event) {
- var domEvent = /** @type {!Event} */ (event.data);
for (var overviewControl of this._overviewControls) {
- if (overviewControl.onClick(domEvent)) {
- event.preventDefault();
- return;
- }
+ if (overviewControl.onClick(event))
+ return true;
}
+ return false;
}
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui_lazy/OverviewGrid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698