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

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

Issue 2573323002: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: 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 3992575fe6531b6a3da6900fa4ba9f4e1768bda3..9daeb842bb168367b5b9e388bef5391b89cbc328 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 @@
this._overviewGrid.setResizeEnabled(false);
this._overviewGrid.addEventListener(UI.OverviewGrid.Events.WindowChanged, this._onWindowChanged, this);
- this._overviewGrid.setClickHandler(this._onClick.bind(this));
+ this._overviewGrid.addEventListener(UI.OverviewGrid.Events.Click, this._onClick, this);
this._overviewControls = [];
this._markers = new Map();
@@ -264,15 +264,16 @@
}
/**
- * @param {!Event} event
- * @return {boolean}
+ * @param {!Common.Event} event
*/
_onClick(event) {
+ var domEvent = /** @type {!Event} */ (event.data);
for (var overviewControl of this._overviewControls) {
- if (overviewControl.onClick(event))
- return true;
- }
- return false;
+ if (overviewControl.onClick(domEvent)) {
+ event.preventDefault();
+ return;
+ }
+ }
}
/**
« 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