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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js

Issue 2647153002: [DevTools] Improve context and target naming. (Closed)
Patch Set: fixed comments and sorting Created 3 years, 11 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
Index: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
index ae9c1d0cec0eb374ed91f641e213c561a4e32264..035b0987e0d1938ecc5baff2e44ee14204a2fdb3 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
@@ -404,6 +404,9 @@ SDK.ResourceTreeModel = class extends SDK.SDKModel {
return parents.reverse();
}
+ if (a.target() !== b.target())
+ return SDK.ExecutionContext.comparator(a, b);
+
var framesA = a.frameId ? framePath(this.frameForId(a.frameId)) : [];
var framesB = b.frameId ? framePath(this.frameForId(b.frameId)) : [];
var frameA;
@@ -723,7 +726,7 @@ SDK.ResourceTreeFrame = class {
* @return {string}
*/
displayName() {
- if (!this._parentFrame)
+ if (!this._parentFrame && !this._model.target().parentTarget())
return Common.UIString('top');
var subtitle = new Common.ParsedURL(this._url).displayName;
if (subtitle) {

Powered by Google App Engine
This is Rietveld 408576698