chrome-devtools-frontend 1.0.927127 → 1.0.928589
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/config/gni/all_devtools_files.gni +0 -1
- package/config/gni/devtools_grd_files.gni +30 -4
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/ic_preview_feature.svg +3 -0
- package/front_end/Tests.js +2 -3
- package/front_end/core/common/Settings.ts +26 -45
- package/front_end/core/host/UserMetrics.ts +2 -2
- package/front_end/core/i18n/locales/en-US.json +60 -15
- package/front_end/core/i18n/locales/en-XL.json +60 -15
- package/front_end/core/platform/keyboard-utilities.ts +1 -0
- package/front_end/core/root/Runtime.ts +62 -61
- package/front_end/core/sdk/AccessibilityModel.ts +73 -73
- package/front_end/core/sdk/CPUProfileDataModel.ts +14 -14
- package/front_end/core/sdk/CPUProfilerModel.ts +33 -33
- package/front_end/core/sdk/CPUThrottlingManager.ts +8 -8
- package/front_end/core/sdk/CSSFontFace.ts +10 -10
- package/front_end/core/sdk/CSSMatchedStyles.ts +114 -114
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSMetadata.ts +53 -49
- package/front_end/core/sdk/CSSModel.ts +139 -135
- package/front_end/core/sdk/CSSProperty.ts +18 -18
- package/front_end/core/sdk/CSSRule.ts +15 -15
- package/front_end/core/sdk/CSSStyleDeclaration.ts +49 -47
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +12 -12
- package/front_end/core/sdk/ChildTargetManager.ts +41 -40
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +10 -10
- package/front_end/core/sdk/Connections.ts +81 -81
- package/front_end/core/sdk/ConsoleModel.ts +68 -68
- package/front_end/core/sdk/Cookie.ts +48 -48
- package/front_end/core/sdk/CookieModel.ts +13 -13
- package/front_end/core/sdk/CookieParser.ts +45 -45
- package/front_end/core/sdk/DOMDebuggerModel.ts +131 -131
- package/front_end/core/sdk/DOMModel.ts +264 -252
- package/front_end/core/sdk/DebuggerModel.ts +209 -205
- package/front_end/core/sdk/EmulationModel.ts +76 -76
- package/front_end/core/sdk/FilmStripModel.ts +29 -29
- package/front_end/core/sdk/FrameManager.ts +43 -42
- package/front_end/core/sdk/HeapProfilerModel.ts +36 -36
- package/front_end/core/sdk/IsolateManager.ts +82 -82
- package/front_end/core/sdk/IssuesModel.ts +6 -6
- package/front_end/core/sdk/LayerTreeBase.ts +37 -37
- package/front_end/core/sdk/LogModel.ts +5 -5
- package/front_end/core/sdk/NetworkManager.ts +229 -225
- package/front_end/core/sdk/NetworkRequest.ts +368 -360
- package/front_end/core/sdk/OverlayColorGenerator.ts +9 -9
- package/front_end/core/sdk/OverlayModel.ts +155 -153
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +100 -101
- package/front_end/core/sdk/PageResourceLoader.ts +30 -30
- package/front_end/core/sdk/PaintProfiler.ts +16 -16
- package/front_end/core/sdk/PerformanceMetricsModel.ts +12 -12
- package/front_end/core/sdk/ProfileTreeModel.ts +3 -3
- package/front_end/core/sdk/RemoteObject.ts +108 -104
- package/front_end/core/sdk/Resource.ts +85 -84
- package/front_end/core/sdk/ResourceTreeModel.ts +150 -145
- package/front_end/core/sdk/RuntimeModel.ts +38 -34
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/ScreenCaptureModel.ts +19 -19
- package/front_end/core/sdk/Script.ts +29 -29
- package/front_end/core/sdk/SecurityOriginManager.ts +19 -19
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +43 -43
- package/front_end/core/sdk/ServiceWorkerManager.ts +72 -68
- package/front_end/core/sdk/SourceMap.ts +40 -36
- package/front_end/core/sdk/SourceMapManager.ts +57 -57
- package/front_end/core/sdk/Target.ts +64 -63
- package/front_end/core/sdk/TargetManager.ts +60 -56
- package/front_end/core/sdk/TracingManager.ts +39 -39
- package/front_end/core/sdk/TracingModel.ts +125 -125
- package/front_end/core/sdk/WebAuthnModel.ts +9 -9
- package/front_end/entrypoints/lighthouse_worker/{LighthouseService.js → LighthouseService.ts} +20 -45
- package/front_end/entrypoints/lighthouse_worker/{lighthouse_worker.js → lighthouse_worker.ts} +0 -0
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/legacy_test_runner/elements_test_runner/ElementsTestRunner.js +4 -4
- package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +1 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -6
- package/front_end/models/issues_manager/GenericIssue.ts +86 -0
- package/front_end/models/issues_manager/Issue.ts +24 -0
- package/front_end/models/issues_manager/IssuesManager.ts +18 -6
- package/front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5422 -1
- package/front_end/panels/console/ConsoleSidebar.ts +0 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +53 -61
- package/front_end/panels/elements/ElementsTreeOutline.ts +0 -1
- package/front_end/panels/elements/components/LayoutPane.ts +5 -1
- package/front_end/panels/issues/GenericIssueDetailsView.ts +68 -0
- package/front_end/panels/issues/IssueAggregator.ts +16 -0
- package/front_end/panels/issues/IssueKindView.ts +95 -0
- package/front_end/panels/issues/IssueView.ts +6 -0
- package/front_end/panels/issues/IssuesPane.ts +81 -18
- package/front_end/panels/issues/issuesTree.css +8 -3
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -1
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -0
- package/front_end/panels/settings/settingsScreen.css +24 -0
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +8 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/sources-meta.ts +22 -7
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +4 -4
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +137 -0
- package/front_end/ui/components/code_highlighter/codeHighlighter.css +51 -0
- package/front_end/ui/components/code_highlighter/code_highlighter.ts +11 -0
- package/front_end/ui/components/docs/text_editor/basic.html +28 -0
- package/front_end/ui/components/docs/text_editor/basic.ts +14 -0
- package/front_end/ui/components/docs/text_prompt/basic.html +35 -0
- package/front_end/ui/components/docs/text_prompt/basic.ts +19 -0
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +17 -0
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +161 -0
- package/front_end/ui/components/text_editor/config.ts +264 -0
- package/front_end/{panels/console/components/components.ts → ui/components/text_editor/text_editor.ts} +2 -5
- package/front_end/ui/components/text_editor/theme.ts +113 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +144 -0
- package/front_end/ui/components/text_prompt/textPrompt.css +33 -0
- package/front_end/ui/components/text_prompt/text_prompt.ts +9 -0
- package/front_end/ui/legacy/ARIAUtils.ts +14 -11
- package/front_end/ui/legacy/TabbedPane.ts +32 -3
- package/front_end/ui/legacy/UIUtils.ts +3 -1
- package/front_end/ui/legacy/View.ts +6 -0
- package/front_end/ui/legacy/ViewManager.ts +5 -1
- package/front_end/ui/legacy/ViewRegistration.ts +5 -0
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/closeButton.css +6 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +38 -38
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +10 -4
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +23 -6
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +14 -16
- package/front_end/ui/legacy/filter.css +1 -0
- package/front_end/ui/legacy/tabbedPane.css +24 -0
- package/front_end/ui/legacy/toolbar.css +5 -0
- package/inspector_overlay/main.ts +2 -1
- package/inspector_overlay/tool_screenshot.ts +8 -1
- package/package.json +1 -1
- package/scripts/build/rollup.config.js +9 -0
- package/scripts/migration/class-fields/migrate.js +56 -0
- package/scripts/migration/class-fields/package.json +5 -0
- package/front_end/panels/console/components/SidebarDeprecation.ts +0 -58
- package/front_end/panels/console/components/sidebarDeprecation.css +0 -17
|
@@ -40,119 +40,119 @@ import {Events} from './NetworkRequest.js';
|
|
|
40
40
|
import type {ResourceTreeFrame, ResourceTreeModel} from './ResourceTreeModel.js';
|
|
41
41
|
|
|
42
42
|
export class Resource implements TextUtils.ContentProvider.ContentProvider {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
readonly #resourceTreeModel: ResourceTreeModel;
|
|
44
|
+
#requestInternal: NetworkRequest|null;
|
|
45
|
+
#urlInternal!: string;
|
|
46
|
+
readonly #documentURLInternal: string;
|
|
47
|
+
readonly #frameIdInternal: Protocol.Page.FrameId|null;
|
|
48
|
+
readonly #loaderIdInternal: Protocol.Network.LoaderId|null;
|
|
49
|
+
readonly #type: Common.ResourceType.ResourceType;
|
|
50
|
+
#mimeTypeInternal: string;
|
|
51
|
+
#isGeneratedInternal: boolean;
|
|
52
|
+
#lastModifiedInternal: Date|null;
|
|
53
|
+
readonly #contentSizeInternal: number|null;
|
|
54
|
+
#contentInternal!: string|null;
|
|
55
|
+
#contentLoadError!: string|null;
|
|
56
|
+
#contentEncodedInternal!: boolean;
|
|
57
|
+
readonly #pendingContentCallbacks: ((arg0: Object|null) => void)[];
|
|
58
|
+
#parsedURLInternal?: Common.ParsedURL.ParsedURL;
|
|
59
|
+
#contentRequested?: boolean;
|
|
60
60
|
|
|
61
61
|
constructor(
|
|
62
62
|
resourceTreeModel: ResourceTreeModel, request: NetworkRequest|null, url: string, documentURL: string,
|
|
63
63
|
frameId: Protocol.Page.FrameId|null, loaderId: Protocol.Network.LoaderId|null,
|
|
64
64
|
type: Common.ResourceType.ResourceType, mimeType: string, lastModified: Date|null, contentSize: number|null) {
|
|
65
|
-
this
|
|
66
|
-
this
|
|
65
|
+
this.#resourceTreeModel = resourceTreeModel;
|
|
66
|
+
this.#requestInternal = request;
|
|
67
67
|
this.url = url;
|
|
68
68
|
|
|
69
|
-
this
|
|
70
|
-
this
|
|
71
|
-
this
|
|
72
|
-
this
|
|
73
|
-
this
|
|
74
|
-
this
|
|
75
|
-
|
|
76
|
-
this
|
|
77
|
-
this
|
|
78
|
-
this
|
|
79
|
-
if (this
|
|
80
|
-
this
|
|
69
|
+
this.#documentURLInternal = documentURL;
|
|
70
|
+
this.#frameIdInternal = frameId;
|
|
71
|
+
this.#loaderIdInternal = loaderId;
|
|
72
|
+
this.#type = type || Common.ResourceType.resourceTypes.Other;
|
|
73
|
+
this.#mimeTypeInternal = mimeType;
|
|
74
|
+
this.#isGeneratedInternal = false;
|
|
75
|
+
|
|
76
|
+
this.#lastModifiedInternal = lastModified && Platfrom.DateUtilities.isValid(lastModified) ? lastModified : null;
|
|
77
|
+
this.#contentSizeInternal = contentSize;
|
|
78
|
+
this.#pendingContentCallbacks = [];
|
|
79
|
+
if (this.#requestInternal && !this.#requestInternal.finished) {
|
|
80
|
+
this.#requestInternal.addEventListener(Events.FinishedLoading, this.requestFinished, this);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
lastModified(): Date|null {
|
|
85
|
-
if (this
|
|
86
|
-
return this
|
|
85
|
+
if (this.#lastModifiedInternal || !this.#requestInternal) {
|
|
86
|
+
return this.#lastModifiedInternal;
|
|
87
87
|
}
|
|
88
|
-
const lastModifiedHeader = this
|
|
88
|
+
const lastModifiedHeader = this.#requestInternal.responseLastModified();
|
|
89
89
|
const date = lastModifiedHeader ? new Date(lastModifiedHeader) : null;
|
|
90
|
-
this
|
|
91
|
-
return this
|
|
90
|
+
this.#lastModifiedInternal = date && Platfrom.DateUtilities.isValid(date) ? date : null;
|
|
91
|
+
return this.#lastModifiedInternal;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
contentSize(): number|null {
|
|
95
|
-
if (typeof this
|
|
96
|
-
return this
|
|
95
|
+
if (typeof this.#contentSizeInternal === 'number' || !this.#requestInternal) {
|
|
96
|
+
return this.#contentSizeInternal;
|
|
97
97
|
}
|
|
98
|
-
return this
|
|
98
|
+
return this.#requestInternal.resourceSize;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
get request(): NetworkRequest|null {
|
|
102
|
-
return this
|
|
102
|
+
return this.#requestInternal;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
get url(): string {
|
|
106
|
-
return this
|
|
106
|
+
return this.#urlInternal;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
set url(x: string) {
|
|
110
|
-
this
|
|
111
|
-
this
|
|
110
|
+
this.#urlInternal = x;
|
|
111
|
+
this.#parsedURLInternal = new Common.ParsedURL.ParsedURL(x);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
get parsedURL(): Common.ParsedURL.ParsedURL|undefined {
|
|
115
|
-
return this
|
|
115
|
+
return this.#parsedURLInternal;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
get documentURL(): string {
|
|
119
|
-
return this
|
|
119
|
+
return this.#documentURLInternal;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
get frameId(): Protocol.Page.FrameId|null {
|
|
123
|
-
return this
|
|
123
|
+
return this.#frameIdInternal;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
get loaderId(): Protocol.Network.LoaderId|null {
|
|
127
|
-
return this
|
|
127
|
+
return this.#loaderIdInternal;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
get displayName(): string {
|
|
131
|
-
return this
|
|
131
|
+
return this.#parsedURLInternal ? this.#parsedURLInternal.displayName : '';
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
resourceType(): Common.ResourceType.ResourceType {
|
|
135
|
-
return this
|
|
135
|
+
return this.#requestInternal ? this.#requestInternal.resourceType() : this.#type;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
get mimeType(): string {
|
|
139
|
-
return this
|
|
139
|
+
return this.#requestInternal ? this.#requestInternal.mimeType : this.#mimeTypeInternal;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
get content(): string|null {
|
|
143
|
-
return this
|
|
143
|
+
return this.#contentInternal;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
get isGenerated(): boolean {
|
|
147
|
-
return this
|
|
147
|
+
return this.#isGeneratedInternal;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
set isGenerated(val: boolean) {
|
|
151
|
-
this
|
|
151
|
+
this.#isGeneratedInternal = val;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
contentURL(): string {
|
|
155
|
-
return this
|
|
155
|
+
return this.#urlInternal;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
contentType(): Common.ResourceType.ResourceType {
|
|
@@ -165,17 +165,17 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
|
|
|
165
165
|
|
|
166
166
|
async contentEncoded(): Promise<boolean> {
|
|
167
167
|
await this.requestContent();
|
|
168
|
-
return this
|
|
168
|
+
return this.#contentEncodedInternal;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
|
|
172
|
-
if (typeof this
|
|
173
|
-
return Promise.resolve({content: (this
|
|
172
|
+
if (typeof this.#contentInternal !== 'undefined') {
|
|
173
|
+
return Promise.resolve({content: (this.#contentInternal as string), isEncoded: this.#contentEncodedInternal});
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
return new Promise(resolve => {
|
|
177
|
-
this
|
|
178
|
-
if (!this
|
|
177
|
+
this.#pendingContentCallbacks.push((resolve as (arg0: Object|null) => void));
|
|
178
|
+
if (!this.#requestInternal || this.#requestInternal.finished) {
|
|
179
179
|
this.innerRequestContent();
|
|
180
180
|
}
|
|
181
181
|
});
|
|
@@ -193,31 +193,32 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
|
|
|
193
193
|
if (this.request) {
|
|
194
194
|
return this.request.searchInContent(query, caseSensitive, isRegex);
|
|
195
195
|
}
|
|
196
|
-
const result = await this
|
|
196
|
+
const result = await this.#resourceTreeModel.target().pageAgent().invoke_searchInResource(
|
|
197
197
|
{frameId: this.frameId, url: this.url, query, caseSensitive, isRegex});
|
|
198
198
|
return result.result || [];
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
async populateImageSource(image: HTMLImageElement): Promise<void> {
|
|
202
202
|
const {content} = await this.requestContent();
|
|
203
|
-
const encoded = this
|
|
204
|
-
image.src =
|
|
203
|
+
const encoded = this.#contentEncodedInternal;
|
|
204
|
+
image.src =
|
|
205
|
+
TextUtils.ContentProvider.contentAsDataURL(content, this.#mimeTypeInternal, encoded) || this.#urlInternal;
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
private requestFinished(): void {
|
|
208
|
-
if (this
|
|
209
|
-
this
|
|
209
|
+
if (this.#requestInternal) {
|
|
210
|
+
this.#requestInternal.removeEventListener(Events.FinishedLoading, this.requestFinished, this);
|
|
210
211
|
}
|
|
211
|
-
if (this
|
|
212
|
+
if (this.#pendingContentCallbacks.length) {
|
|
212
213
|
this.innerRequestContent();
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
|
|
216
217
|
private async innerRequestContent(): Promise<void> {
|
|
217
|
-
if (this
|
|
218
|
+
if (this.#contentRequested) {
|
|
218
219
|
return;
|
|
219
220
|
}
|
|
220
|
-
this
|
|
221
|
+
this.#contentRequested = true;
|
|
221
222
|
|
|
222
223
|
let loadResult: {
|
|
223
224
|
content: string,
|
|
@@ -233,53 +234,53 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
|
|
|
233
234
|
if (this.request) {
|
|
234
235
|
const contentData = await this.request.contentData();
|
|
235
236
|
if (!contentData.error) {
|
|
236
|
-
this
|
|
237
|
-
this
|
|
237
|
+
this.#contentInternal = contentData.content;
|
|
238
|
+
this.#contentEncodedInternal = contentData.encoded;
|
|
238
239
|
loadResult = {content: (contentData.content as string), isEncoded: contentData.encoded};
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
if (!loadResult) {
|
|
242
|
-
const response = await this
|
|
243
|
+
const response = await this.#resourceTreeModel.target().pageAgent().invoke_getResourceContent(
|
|
243
244
|
{frameId: this.frameId as Protocol.Page.FrameId, url: this.url});
|
|
244
245
|
const protocolError = response.getError();
|
|
245
246
|
if (protocolError) {
|
|
246
|
-
this
|
|
247
|
-
this
|
|
247
|
+
this.#contentLoadError = protocolError;
|
|
248
|
+
this.#contentInternal = null;
|
|
248
249
|
loadResult = {content: null, error: protocolError, isEncoded: false};
|
|
249
250
|
} else {
|
|
250
|
-
this
|
|
251
|
-
this
|
|
251
|
+
this.#contentInternal = response.content;
|
|
252
|
+
this.#contentLoadError = null;
|
|
252
253
|
loadResult = {content: response.content, isEncoded: response.base64Encoded};
|
|
253
254
|
}
|
|
254
|
-
this
|
|
255
|
+
this.#contentEncodedInternal = response.base64Encoded;
|
|
255
256
|
}
|
|
256
257
|
|
|
257
|
-
if (this
|
|
258
|
-
this
|
|
258
|
+
if (this.#contentInternal === null) {
|
|
259
|
+
this.#contentEncodedInternal = false;
|
|
259
260
|
}
|
|
260
261
|
|
|
261
|
-
for (const callback of this
|
|
262
|
+
for (const callback of this.#pendingContentCallbacks.splice(0)) {
|
|
262
263
|
callback(loadResult);
|
|
263
264
|
}
|
|
264
265
|
|
|
265
|
-
|
|
266
|
+
this.#contentRequested = undefined;
|
|
266
267
|
}
|
|
267
268
|
|
|
268
269
|
hasTextContent(): boolean {
|
|
269
|
-
if (this
|
|
270
|
+
if (this.#type.isTextType()) {
|
|
270
271
|
return true;
|
|
271
272
|
}
|
|
272
|
-
if (this
|
|
273
|
-
return Boolean(this
|
|
273
|
+
if (this.#type === Common.ResourceType.resourceTypes.Other) {
|
|
274
|
+
return Boolean(this.#contentInternal) && !this.#contentEncodedInternal;
|
|
274
275
|
}
|
|
275
276
|
return false;
|
|
276
277
|
}
|
|
277
278
|
|
|
278
279
|
frame(): ResourceTreeFrame|null {
|
|
279
|
-
return this
|
|
280
|
+
return this.#frameIdInternal ? this.#resourceTreeModel.frameForId(this.#frameIdInternal) : null;
|
|
280
281
|
}
|
|
281
282
|
|
|
282
283
|
statusCode(): number {
|
|
283
|
-
return this
|
|
284
|
+
return this.#requestInternal ? this.#requestInternal.statusCode : 0;
|
|
284
285
|
}
|
|
285
286
|
}
|