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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/ResourcesSection.js

Issue 2809003007: [DevTools] Reset main frame subtree on navigation (Closed)
Patch Set: [DevTools] Reset main frame subtree on navigation Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-on-navigation-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Resources.ResourcesSection = class { 5 Resources.ResourcesSection = class {
6 /** 6 /**
7 * @param {!Resources.ResourcesPanel} storagePanel 7 * @param {!Resources.ResourcesPanel} storagePanel
8 * @param {!UI.TreeElement} treeElement 8 * @param {!UI.TreeElement} treeElement
9 */ 9 */
10 constructor(storagePanel, treeElement) { 10 constructor(storagePanel, treeElement) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 this._treeElementForFrameId.remove(frame.id); 69 this._treeElementForFrameId.remove(frame.id);
70 if (frameTreeElement.parent) 70 if (frameTreeElement.parent)
71 frameTreeElement.parent.removeChild(frameTreeElement); 71 frameTreeElement.parent.removeChild(frameTreeElement);
72 } 72 }
73 73
74 /** 74 /**
75 * @param {!SDK.ResourceTreeFrame} frame 75 * @param {!SDK.ResourceTreeFrame} frame
76 */ 76 */
77 _frameNavigated(frame) { 77 _frameNavigated(frame) {
78 if (!Resources.ResourcesSection._getParentFrame(frame))
79 return;
80 var frameTreeElement = this._treeElementForFrameId.get(frame.id); 78 var frameTreeElement = this._treeElementForFrameId.get(frame.id);
81 if (frameTreeElement) 79 if (frameTreeElement)
82 frameTreeElement.frameNavigated(frame); 80 frameTreeElement.frameNavigated(frame);
83 } 81 }
84 82
85 /** 83 /**
86 * @param {!SDK.Resource} resource 84 * @param {!SDK.Resource} resource
87 */ 85 */
88 _resourceAdded(resource) { 86 _resourceAdded(resource) {
89 var statusCode = resource['statusCode']; 87 var statusCode = resource['statusCode'];
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 _sourceView() { 343 _sourceView() {
346 if (!this._sourceFrame) { 344 if (!this._sourceFrame) {
347 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource); 345 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource);
348 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); 346 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType());
349 } 347 }
350 return this._sourceFrame; 348 return this._sourceFrame;
351 } 349 }
352 }; 350 };
353 351
354 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement'); 352 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement');
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-on-navigation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698