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

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

Issue 2205853005: [Devtools] Regression fix for double toolbar for images in network (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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/network/RequestPreviewView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js
index a316ec37b3998595b8294d609638079f1f38e944..f61aec70bf6fc934091acd21ea121a75f68bc780 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js
@@ -55,12 +55,10 @@ WebInspector.RequestPreviewView.prototype = {
delete this._emptyWidget;
}
- if (!this._previewView) {
+ if (!this.innerView)
lushnikov 2016/08/03 18:42:14 let's get rid of this.innerView!
allada 2016/08/03 19:02:26 Done.
this._createPreviewView(handlePreviewView.bind(this));
- } else {
- this.innerView = this._previewView;
- handlePreviewView.call(this, this.innerView);
- }
+ else
+ this.innerView.show(this.element);
}
/**
@@ -69,15 +67,14 @@ WebInspector.RequestPreviewView.prototype = {
*/
function handlePreviewView(view)
{
- this._previewView = view;
- this._previewView.show(this.element);
- if (this._previewView instanceof WebInspector.View) {
+ this.innerView = view;
+ this.innerView.show(this.element);
+ if (this.innerView instanceof WebInspector.View) {
var toolbar = new WebInspector.Toolbar("network-item-preview-toolbar", this.element);
- for (var item of /** @type {!WebInspector.View} */ (this._previewView).toolbarItems())
+ for (var item of /** @type {!WebInspector.View} */ (this.innerView).toolbarItems())
toolbar.appendToolbarItem(item);
}
- this.innerView = this._previewView;
- this._previewViewHandledForTest(this._previewView);
+ this._previewViewHandledForTest(this.innerView);
}
},
« 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