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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js

Issue 2466473003: [Devtools] Fixed contextmenu in network timeline experiment. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.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/network/NetworkLogViewColumns.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js
index 88a6af5f5e541267c0753f132bc4bd7ca1f0f824..3a8b8c3cbd30a9e55703ba50c1d48b34bc902ddb 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js
@@ -461,6 +461,7 @@ WebInspector.NetworkLogViewColumns.prototype = {
{
this._timelineColumn = new WebInspector.NetworkTimelineColumn(this._networkLogView.rowHeight(), this._networkLogView.calculator());
+ this._timelineColumn.element.addEventListener("contextmenu", handleContextMenu.bind(this));
this._timelineColumn.element.addEventListener("mousewheel", this._onMouseWheel.bind(this, false), { passive: true });
this._dataGridScroller.addEventListener("mousewheel",this._onMouseWheel.bind(this, true), true);
@@ -484,6 +485,19 @@ WebInspector.NetworkLogViewColumns.prototype = {
this._splitWidget.setMainWidget(this._timelineColumn);
this.switchViewMode(false);
+
+ /**
+ * @param {!Event} event
+ * @this {WebInspector.NetworkLogViewColumns}
+ */
+ function handleContextMenu(event)
+ {
+ var request = this._timelineColumn.getRequestFromPoint(event.offsetX, event.offsetY);
+ if (!request)
+ return;
+ var contextMenu = new WebInspector.ContextMenu(event);
+ this._networkLogView.handleContextMenuForRequest(contextMenu, request);
+ }
},
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698