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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js

Issue 1805743002: [DevTools] Do not detach view just to reattach it again in SplitWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 | 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/SplitWidget.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
index e313e2b41d86601be4284c8bf6113c25ad02499c..caac11604d4affc93f10b5cd9aa201c1200e843c 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
@@ -150,6 +150,8 @@ WebInspector.SplitWidget.prototype = {
*/
setMainWidget: function(widget)
{
+ if (this._mainWidget === widget)
+ return;
if (this._mainWidget)
this._mainWidget.detach();
this._mainWidget = widget;
@@ -166,6 +168,8 @@ WebInspector.SplitWidget.prototype = {
*/
setSidebarWidget: function(widget)
{
+ if (this._sidebarWidget === widget)
+ return;
if (this._sidebarWidget)
this._sidebarWidget.detach();
this._sidebarWidget = widget;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698