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

Unified Diff: third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js

Issue 2571983002: DevTools: do not add paint profiler tab more than once on Layers panel (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 | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js » ('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/layers/LayersPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js b/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js
index 0986e54bcdd13bd706f249a5dc34920f6f479255..0f9c172f58ee7eed614eabb7382ff1c164aff1f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js
@@ -156,9 +156,11 @@ Layers.LayersPanel = class extends UI.PanelWithSidebar {
if (!snapshotWithRect)
return;
this._layerBeingProfiled = selection.layer();
- this._tabbedPane.appendTab(
- Layers.LayersPanel.DetailsViewTabs.Profiler, Common.UIString('Profiler'), this._paintProfilerView, undefined,
- true, true);
+ if (!this._tabbedPane.hasTab(Layers.LayersPanel.DetailsViewTabs.Profiler)) {
+ this._tabbedPane.appendTab(
+ Layers.LayersPanel.DetailsViewTabs.Profiler, Common.UIString('Profiler'), this._paintProfilerView,
+ undefined, true, true);
+ }
this._tabbedPane.selectTab(Layers.LayersPanel.DetailsViewTabs.Profiler);
this._paintProfilerView.profile(snapshotWithRect.snapshot);
});
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698