chrome-devtools-frontend 1.0.1029795 → 1.0.1030946
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/config/gni/devtools_grd_files.gni +3 -0
- package/config/gni/devtools_image_files.gni +2 -0
- package/docs/workflows.md +1 -1
- package/front_end/Images/src/file-sync_icon.svg +62 -0
- package/front_end/Images/src/file_icon.svg +52 -0
- package/front_end/Tests.js +0 -28
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +16 -7
- package/front_end/core/i18n/locales/en-XL.json +16 -7
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -4
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -4
- package/front_end/core/sdk/NetworkRequest.ts +0 -4
- package/front_end/core/sdk/Resource.ts +0 -5
- package/front_end/core/sdk/Script.ts +71 -76
- package/front_end/entrypoints/main/MainImpl.ts +4 -0
- package/front_end/generated/InspectorBackendCommands.js +10 -8
- package/front_end/generated/protocol-mapping.d.ts +16 -2
- package/front_end/generated/protocol-proxy-api.d.ts +11 -1
- package/front_end/generated/protocol.ts +75 -1
- package/front_end/models/bindings/CompilerScriptMapping.ts +6 -3
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
- package/front_end/models/bindings/IgnoreListManager.ts +10 -8
- package/front_end/models/bindings/ResourceMapping.ts +0 -4
- package/front_end/models/bindings/StylesSourceMapping.ts +0 -5
- package/front_end/models/extensions/ExtensionServer.ts +2 -3
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +8 -0
- package/front_end/models/issues_manager/DeprecationIssue.ts +5 -1
- package/front_end/models/issues_manager/descriptions/arTooManyConcurrentRequests.md +5 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -6
- package/front_end/models/persistence/PersistenceActions.ts +5 -4
- package/front_end/models/text_utils/CodeMirrorUtils.ts +17 -4
- package/front_end/models/text_utils/ContentProvider.ts +0 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +0 -4
- package/front_end/models/workspace/UISourceCode.ts +10 -5
- package/front_end/panels/elements/CSSRuleValidator.ts +382 -63
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +34 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +23 -20
- package/front_end/panels/elements/components/cssHintDetailsView.css +2 -0
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +12 -0
- package/front_end/panels/network/components/RequestHeadersView.css +41 -8
- package/front_end/panels/network/components/RequestHeadersView.ts +102 -12
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
- package/front_end/panels/sources/NavigatorView.ts +22 -0
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1247 -116
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
- package/front_end/ui/components/data_grid/DataGrid.ts +15 -10
- package/front_end/ui/components/data_grid/DataGridController.ts +7 -0
- package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +64 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -11
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +49 -0
- package/package.json +6 -5
@@ -2160,7 +2160,7 @@ export namespace ProtocolMapping {
|
|
2160
2160
|
* Requests database names for given security origin.
|
2161
2161
|
*/
|
2162
2162
|
'IndexedDB.requestDatabaseNames': {
|
2163
|
-
paramsType: [Protocol.IndexedDB.RequestDatabaseNamesRequest];
|
2163
|
+
paramsType: [Protocol.IndexedDB.RequestDatabaseNamesRequest?];
|
2164
2164
|
returnType: Protocol.IndexedDB.RequestDatabaseNamesResponse;
|
2165
2165
|
};
|
2166
2166
|
/**
|
@@ -3472,6 +3472,13 @@ export namespace ProtocolMapping {
|
|
3472
3472
|
paramsType: [Protocol.Storage.TrackIndexedDBForOriginRequest];
|
3473
3473
|
returnType: void;
|
3474
3474
|
};
|
3475
|
+
/**
|
3476
|
+
* Registers storage key to be notified when an update occurs to its IndexedDB.
|
3477
|
+
*/
|
3478
|
+
'Storage.trackIndexedDBForStorageKey': {
|
3479
|
+
paramsType: [Protocol.Storage.TrackIndexedDBForStorageKeyRequest];
|
3480
|
+
returnType: void;
|
3481
|
+
};
|
3475
3482
|
/**
|
3476
3483
|
* Unregisters origin from receiving notifications for cache storage.
|
3477
3484
|
*/
|
@@ -3486,6 +3493,13 @@ export namespace ProtocolMapping {
|
|
3486
3493
|
paramsType: [Protocol.Storage.UntrackIndexedDBForOriginRequest];
|
3487
3494
|
returnType: void;
|
3488
3495
|
};
|
3496
|
+
/**
|
3497
|
+
* Unregisters storage key from receiving notifications for IndexedDB.
|
3498
|
+
*/
|
3499
|
+
'Storage.untrackIndexedDBForStorageKey': {
|
3500
|
+
paramsType: [Protocol.Storage.UntrackIndexedDBForStorageKeyRequest];
|
3501
|
+
returnType: void;
|
3502
|
+
};
|
3489
3503
|
/**
|
3490
3504
|
* Returns the number of stored Trust Tokens per issuer for the
|
3491
3505
|
* current browsing context.
|
@@ -3620,7 +3634,7 @@ export namespace ProtocolMapping {
|
|
3620
3634
|
* Retrieves a list of available targets.
|
3621
3635
|
*/
|
3622
3636
|
'Target.getTargets': {
|
3623
|
-
paramsType: [];
|
3637
|
+
paramsType: [Protocol.Target.GetTargetsRequest?];
|
3624
3638
|
returnType: Protocol.Target.GetTargetsResponse;
|
3625
3639
|
};
|
3626
3640
|
/**
|
@@ -2917,6 +2917,11 @@ declare namespace ProtocolProxyApi {
|
|
2917
2917
|
*/
|
2918
2918
|
invoke_trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest): Promise<Protocol.ProtocolResponseWithError>;
|
2919
2919
|
|
2920
|
+
/**
|
2921
|
+
* Registers storage key to be notified when an update occurs to its IndexedDB.
|
2922
|
+
*/
|
2923
|
+
invoke_trackIndexedDBForStorageKey(params: Protocol.Storage.TrackIndexedDBForStorageKeyRequest): Promise<Protocol.ProtocolResponseWithError>;
|
2924
|
+
|
2920
2925
|
/**
|
2921
2926
|
* Unregisters origin from receiving notifications for cache storage.
|
2922
2927
|
*/
|
@@ -2927,6 +2932,11 @@ declare namespace ProtocolProxyApi {
|
|
2927
2932
|
*/
|
2928
2933
|
invoke_untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest): Promise<Protocol.ProtocolResponseWithError>;
|
2929
2934
|
|
2935
|
+
/**
|
2936
|
+
* Unregisters storage key from receiving notifications for IndexedDB.
|
2937
|
+
*/
|
2938
|
+
invoke_untrackIndexedDBForStorageKey(params: Protocol.Storage.UntrackIndexedDBForStorageKeyRequest): Promise<Protocol.ProtocolResponseWithError>;
|
2939
|
+
|
2930
2940
|
/**
|
2931
2941
|
* Returns the number of stored Trust Tokens per issuer for the
|
2932
2942
|
* current browsing context.
|
@@ -3061,7 +3071,7 @@ declare namespace ProtocolProxyApi {
|
|
3061
3071
|
/**
|
3062
3072
|
* Retrieves a list of available targets.
|
3063
3073
|
*/
|
3064
|
-
invoke_getTargets(): Promise<Protocol.Target.GetTargetsResponse>;
|
3074
|
+
invoke_getTargets(params: Protocol.Target.GetTargetsRequest): Promise<Protocol.Target.GetTargetsResponse>;
|
3065
3075
|
|
3066
3076
|
/**
|
3067
3077
|
* Sends protocol message over session with given id.
|
@@ -968,6 +968,7 @@ export namespace Audits {
|
|
968
968
|
InvalidHeader = 'InvalidHeader',
|
969
969
|
InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
|
970
970
|
InvalidEligibleHeader = 'InvalidEligibleHeader',
|
971
|
+
TooManyConcurrentRequests = 'TooManyConcurrentRequests',
|
971
972
|
}
|
972
973
|
|
973
974
|
/**
|
@@ -6017,9 +6018,14 @@ export namespace IndexedDB {
|
|
6017
6018
|
|
6018
6019
|
export interface RequestDatabaseNamesRequest {
|
6019
6020
|
/**
|
6021
|
+
* At least and at most one of securityOrigin, storageKey must be specified.
|
6020
6022
|
* Security origin.
|
6021
6023
|
*/
|
6022
|
-
securityOrigin
|
6024
|
+
securityOrigin?: string;
|
6025
|
+
/**
|
6026
|
+
* Storage key.
|
6027
|
+
*/
|
6028
|
+
storageKey?: string;
|
6023
6029
|
}
|
6024
6030
|
|
6025
6031
|
export interface RequestDatabaseNamesResponse extends ProtocolResponseWithError {
|
@@ -13035,6 +13041,13 @@ export namespace Storage {
|
|
13035
13041
|
origin: string;
|
13036
13042
|
}
|
13037
13043
|
|
13044
|
+
export interface TrackIndexedDBForStorageKeyRequest {
|
13045
|
+
/**
|
13046
|
+
* Storage key.
|
13047
|
+
*/
|
13048
|
+
storageKey: string;
|
13049
|
+
}
|
13050
|
+
|
13038
13051
|
export interface UntrackCacheStorageForOriginRequest {
|
13039
13052
|
/**
|
13040
13053
|
* Security origin.
|
@@ -13049,6 +13062,13 @@ export namespace Storage {
|
|
13049
13062
|
origin: string;
|
13050
13063
|
}
|
13051
13064
|
|
13065
|
+
export interface UntrackIndexedDBForStorageKeyRequest {
|
13066
|
+
/**
|
13067
|
+
* Storage key.
|
13068
|
+
*/
|
13069
|
+
storageKey: string;
|
13070
|
+
}
|
13071
|
+
|
13052
13072
|
export interface GetTrustTokensResponse extends ProtocolResponseWithError {
|
13053
13073
|
tokens: TrustTokens[];
|
13054
13074
|
}
|
@@ -13109,6 +13129,10 @@ export namespace Storage {
|
|
13109
13129
|
* Origin to update.
|
13110
13130
|
*/
|
13111
13131
|
origin: string;
|
13132
|
+
/**
|
13133
|
+
* Storage key to update.
|
13134
|
+
*/
|
13135
|
+
storageKey: string;
|
13112
13136
|
/**
|
13113
13137
|
* Database to update.
|
13114
13138
|
*/
|
@@ -13127,6 +13151,10 @@ export namespace Storage {
|
|
13127
13151
|
* Origin to update.
|
13128
13152
|
*/
|
13129
13153
|
origin: string;
|
13154
|
+
/**
|
13155
|
+
* Storage key to update.
|
13156
|
+
*/
|
13157
|
+
storageKey: string;
|
13130
13158
|
}
|
13131
13159
|
|
13132
13160
|
/**
|
@@ -13398,6 +13426,30 @@ export namespace Target {
|
|
13398
13426
|
browserContextId?: Browser.BrowserContextID;
|
13399
13427
|
}
|
13400
13428
|
|
13429
|
+
/**
|
13430
|
+
* A filter used by target query/discovery/auto-attach operations.
|
13431
|
+
*/
|
13432
|
+
export interface FilterEntry {
|
13433
|
+
/**
|
13434
|
+
* If set, causes exclusion of mathcing targets from the list.
|
13435
|
+
*/
|
13436
|
+
exclude?: boolean;
|
13437
|
+
/**
|
13438
|
+
* If not present, matches any type.
|
13439
|
+
*/
|
13440
|
+
type?: string;
|
13441
|
+
}
|
13442
|
+
|
13443
|
+
/**
|
13444
|
+
* The entries in TargetFilter are matched sequentially against targets and
|
13445
|
+
* the first entry that matches determines if the target is included or not,
|
13446
|
+
* depending on the value of `exclude` field in the entry.
|
13447
|
+
* If filter is not specified, the one assumed is
|
13448
|
+
* [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}]
|
13449
|
+
* (i.e. include everything but `browser` and `tab`).
|
13450
|
+
*/
|
13451
|
+
export type TargetFilter = FilterEntry[];
|
13452
|
+
|
13401
13453
|
export interface RemoteLocation {
|
13402
13454
|
host: string;
|
13403
13455
|
port: integer;
|
@@ -13547,6 +13599,15 @@ export namespace Target {
|
|
13547
13599
|
targetInfo: TargetInfo;
|
13548
13600
|
}
|
13549
13601
|
|
13602
|
+
export interface GetTargetsRequest {
|
13603
|
+
/**
|
13604
|
+
* Only targets matching filter will be reported. If filter is not specified
|
13605
|
+
* and target discovery is currently enabled, a filter used for target discovery
|
13606
|
+
* is used for consistency.
|
13607
|
+
*/
|
13608
|
+
filter?: TargetFilter;
|
13609
|
+
}
|
13610
|
+
|
13550
13611
|
export interface GetTargetsResponse extends ProtocolResponseWithError {
|
13551
13612
|
/**
|
13552
13613
|
* The list of targets.
|
@@ -13582,6 +13643,10 @@ export namespace Target {
|
|
13582
13643
|
* and eventually retire it. See crbug.com/991325.
|
13583
13644
|
*/
|
13584
13645
|
flatten?: boolean;
|
13646
|
+
/**
|
13647
|
+
* Only targets matching filter will be attached.
|
13648
|
+
*/
|
13649
|
+
filter?: TargetFilter;
|
13585
13650
|
}
|
13586
13651
|
|
13587
13652
|
export interface AutoAttachRelatedRequest {
|
@@ -13591,6 +13656,10 @@ export namespace Target {
|
|
13591
13656
|
* to run paused targets.
|
13592
13657
|
*/
|
13593
13658
|
waitForDebuggerOnStart: boolean;
|
13659
|
+
/**
|
13660
|
+
* Only targets matching filter will be attached.
|
13661
|
+
*/
|
13662
|
+
filter?: TargetFilter;
|
13594
13663
|
}
|
13595
13664
|
|
13596
13665
|
export interface SetDiscoverTargetsRequest {
|
@@ -13598,6 +13667,11 @@ export namespace Target {
|
|
13598
13667
|
* Whether to discover available targets.
|
13599
13668
|
*/
|
13600
13669
|
discover: boolean;
|
13670
|
+
/**
|
13671
|
+
* Only targets matching filter will be attached. If `discover` is false,
|
13672
|
+
* `filter` must be omitted or empty.
|
13673
|
+
*/
|
13674
|
+
filter?: TargetFilter;
|
13601
13675
|
}
|
13602
13676
|
|
13603
13677
|
export interface SetRemoteLocationsRequest {
|
@@ -345,11 +345,14 @@ class Binding {
|
|
345
345
|
this.uiSourceCode = null;
|
346
346
|
}
|
347
347
|
|
348
|
-
private recreateUISourceCodeIfNeeded(frameId: Protocol.Page.FrameId): void {
|
348
|
+
private recreateUISourceCodeIfNeeded(frameId: Protocol.Page.FrameId, isKnownThirdParty: boolean): void {
|
349
349
|
const sourceMap = this.referringSourceMaps[this.referringSourceMaps.length - 1];
|
350
350
|
|
351
351
|
const newUISourceCode =
|
352
352
|
this.#project.createUISourceCode(this.#url, Common.ResourceType.resourceTypes.SourceMapScript);
|
353
|
+
if (isKnownThirdParty) {
|
354
|
+
newUISourceCode.markKnownThirdParty();
|
355
|
+
}
|
353
356
|
uiSourceCodeToBinding.set(newUISourceCode, this);
|
354
357
|
const contentProvider =
|
355
358
|
sourceMap.sourceContentProvider(this.#url, Common.ResourceType.resourceTypes.SourceMapScript);
|
@@ -374,7 +377,7 @@ class Binding {
|
|
374
377
|
NetworkProject.addFrameAttribution(this.uiSourceCode, frameId);
|
375
378
|
}
|
376
379
|
this.referringSourceMaps.push(sourceMap);
|
377
|
-
this.recreateUISourceCodeIfNeeded(frameId);
|
380
|
+
this.recreateUISourceCodeIfNeeded(frameId, sourceMap.hasIgnoreListHint(this.#url));
|
378
381
|
}
|
379
382
|
|
380
383
|
removeSourceMap(sourceMap: SDK.SourceMap.SourceMap, frameId: Protocol.Page.FrameId): void {
|
@@ -388,7 +391,7 @@ class Binding {
|
|
388
391
|
this.#project.removeFile(uiSourceCode.url());
|
389
392
|
this.uiSourceCode = null;
|
390
393
|
} else {
|
391
|
-
this.recreateUISourceCodeIfNeeded(frameId);
|
394
|
+
this.recreateUISourceCodeIfNeeded(frameId, sourceMap.hasIgnoreListHint(this.#url));
|
392
395
|
}
|
393
396
|
}
|
394
397
|
|
@@ -66,13 +66,12 @@ export class ContentProviderBasedProject extends Workspace.Workspace.ProjectStor
|
|
66
66
|
const contentProvider =
|
67
67
|
(this.#contentProviders.get(uiSourceCode.url()) as TextUtils.ContentProvider.ContentProvider);
|
68
68
|
try {
|
69
|
-
const
|
70
|
-
await Promise.all([contentProvider.requestContent(), contentProvider.contentEncoded()]);
|
69
|
+
const content = await contentProvider.requestContent();
|
71
70
|
const wasmDisassemblyInfo = 'wasmDisassemblyInfo' in content ? content.wasmDisassemblyInfo : undefined;
|
72
71
|
return {
|
73
72
|
content: content.content,
|
74
73
|
wasmDisassemblyInfo,
|
75
|
-
isEncoded,
|
74
|
+
isEncoded: content.isEncoded,
|
76
75
|
error: 'error' in content && content.error || '',
|
77
76
|
};
|
78
77
|
} catch (err) {
|
@@ -512,10 +512,7 @@ export class Location extends LiveLocationWithPool {
|
|
512
512
|
if (!uiLocation) {
|
513
513
|
return false;
|
514
514
|
}
|
515
|
-
|
516
|
-
const script = this.rawLocation.script();
|
517
|
-
const map = script ? await manager.sourceMapForClientPromise(script) : null;
|
518
|
-
return IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(uiLocation.uiSourceCode, map);
|
515
|
+
return IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(uiLocation.uiSourceCode);
|
519
516
|
}
|
520
517
|
}
|
521
518
|
|
@@ -100,23 +100,21 @@ export class IgnoreListManager implements SDK.TargetManager.SDKModelObserver<SDK
|
|
100
100
|
return debuggerModel.setBlackboxPatterns(patterns);
|
101
101
|
}
|
102
102
|
|
103
|
-
isUserOrSourceMapIgnoreListedUISourceCode(
|
104
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode, sourceMap: SDK.SourceMap.SourceMap|null): boolean {
|
103
|
+
isUserOrSourceMapIgnoreListedUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
105
104
|
const projectType = uiSourceCode.project().type();
|
106
105
|
const isContentScript = projectType === Workspace.Workspace.projectTypes.ContentScripts;
|
107
106
|
if (this.skipContentScripts && isContentScript) {
|
108
107
|
return true;
|
109
108
|
}
|
110
109
|
const url = this.uiSourceCodeURL(uiSourceCode);
|
111
|
-
return url ? this.isUserOrSourceMapIgnoreListedURL(url,
|
110
|
+
return url ? this.isUserOrSourceMapIgnoreListedURL(url, uiSourceCode.isKnownThirdParty()) : false;
|
112
111
|
}
|
113
112
|
|
114
|
-
isUserOrSourceMapIgnoreListedURL(url: Platform.DevToolsPath.UrlString,
|
115
|
-
boolean {
|
113
|
+
isUserOrSourceMapIgnoreListedURL(url: Platform.DevToolsPath.UrlString, isKnownThirdParty: boolean): boolean {
|
116
114
|
if (this.isUserIgnoreListedURL(url)) {
|
117
115
|
return true;
|
118
116
|
}
|
119
|
-
if (this.automaticallyIgnoreListKnownThirdPartyScripts &&
|
117
|
+
if (this.automaticallyIgnoreListKnownThirdPartyScripts && isKnownThirdParty) {
|
120
118
|
return true;
|
121
119
|
}
|
122
120
|
return false;
|
@@ -154,7 +152,9 @@ export class IgnoreListManager implements SDK.TargetManager.SDKModelObserver<SDK
|
|
154
152
|
let hasIgnoreListedMappings = false;
|
155
153
|
if (!IgnoreListManager.instance().isUserIgnoreListedURL(script.sourceURL, script.isContentScript())) {
|
156
154
|
hasIgnoreListedMappings =
|
157
|
-
sourceMap?.sourceURLs().some(
|
155
|
+
sourceMap?.sourceURLs().some(
|
156
|
+
url => this.isUserOrSourceMapIgnoreListedURL(url, sourceMap.hasIgnoreListHint(url))) ??
|
157
|
+
false;
|
158
158
|
}
|
159
159
|
if (!hasIgnoreListedMappings) {
|
160
160
|
if (scriptToRange.get(script) && await script.setBlackboxedRanges([])) {
|
@@ -170,7 +170,9 @@ export class IgnoreListManager implements SDK.TargetManager.SDKModelObserver<SDK
|
|
170
170
|
|
171
171
|
const newRanges =
|
172
172
|
sourceMap
|
173
|
-
.findRanges(
|
173
|
+
.findRanges(
|
174
|
+
srcURL => this.isUserOrSourceMapIgnoreListedURL(srcURL, sourceMap.hasIgnoreListHint(srcURL)),
|
175
|
+
{isStartMatching: true})
|
174
176
|
.flatMap(range => [range.start, range.end]);
|
175
177
|
|
176
178
|
const oldRanges = scriptToRange.get(script) || [];
|
@@ -462,10 +462,6 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
462
462
|
return this.firstResource().contentType();
|
463
463
|
}
|
464
464
|
|
465
|
-
contentEncoded(): Promise<boolean> {
|
466
|
-
return this.firstResource().contentEncoded();
|
467
|
-
}
|
468
|
-
|
469
465
|
requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
|
470
466
|
return this.firstResource().requestContent();
|
471
467
|
}
|
@@ -308,11 +308,6 @@ export class StyleFile implements TextUtils.ContentProvider.ContentProvider {
|
|
308
308
|
return this.headers.values().next().value.originalContentProvider().contentType();
|
309
309
|
}
|
310
310
|
|
311
|
-
contentEncoded(): Promise<boolean> {
|
312
|
-
console.assert(this.headers.size > 0);
|
313
|
-
return this.headers.values().next().value.originalContentProvider().contentEncoded();
|
314
|
-
}
|
315
|
-
|
316
311
|
requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
|
317
312
|
console.assert(this.headers.size > 0);
|
318
313
|
return this.headers.values().next().value.originalContentProvider().requestContent();
|
@@ -730,9 +730,8 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
730
730
|
private async getResourceContent(
|
731
731
|
contentProvider: TextUtils.ContentProvider.ContentProvider, message: PrivateAPI.ExtensionServerRequestMessage,
|
732
732
|
port: MessagePort): Promise<void> {
|
733
|
-
const {content} = await contentProvider.requestContent();
|
734
|
-
|
735
|
-
this.dispatchCallback(message.requestId, port, {encoding: encoded ? 'base64' : '', content: content});
|
733
|
+
const {content, isEncoded} = await contentProvider.requestContent();
|
734
|
+
this.dispatchCallback(message.requestId, port, {encoding: isEncoded ? 'base64' : '', content: content});
|
736
735
|
}
|
737
736
|
|
738
737
|
private onGetRequestContent(message: PrivateAPI.ExtensionServerRequestMessage, port: MessagePort): Record|undefined {
|
@@ -15,6 +15,7 @@ export const enum IssueCode {
|
|
15
15
|
InvalidRegisterSourceHeader = 'AttributionReportingIssue::InvalidRegisterSourceHeader',
|
16
16
|
InvalidRegisterTriggerHeader = 'AttributionReportingIssue::InvalidRegisterTriggerHeader',
|
17
17
|
InvalidEligibleHeader = 'AttributionReportingIssue::InvalidEligibleHeader',
|
18
|
+
TooManyConcurrentRequests = 'AttributionReportingIssue::TooManyConcurrentRequests',
|
18
19
|
// TODO(apaseltiner): Remove this once old issue types are removed from
|
19
20
|
// protocol.
|
20
21
|
Unknown = 'AttributionReportingIssue::Unknown',
|
@@ -34,6 +35,8 @@ function getIssueCode(details: Protocol.Audits.AttributionReportingIssueDetails)
|
|
34
35
|
return IssueCode.InvalidRegisterTriggerHeader;
|
35
36
|
case Protocol.Audits.AttributionReportingIssueType.InvalidEligibleHeader:
|
36
37
|
return IssueCode.InvalidEligibleHeader;
|
38
|
+
case Protocol.Audits.AttributionReportingIssueType.TooManyConcurrentRequests:
|
39
|
+
return IssueCode.TooManyConcurrentRequests;
|
37
40
|
default:
|
38
41
|
return IssueCode.Unknown;
|
39
42
|
}
|
@@ -87,6 +90,11 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
87
90
|
linkTitle: 'Structured Headers RFC',
|
88
91
|
}],
|
89
92
|
};
|
93
|
+
case IssueCode.TooManyConcurrentRequests:
|
94
|
+
return {
|
95
|
+
file: 'arTooManyConcurrentRequests.md',
|
96
|
+
links: [],
|
97
|
+
};
|
90
98
|
case IssueCode.Unknown:
|
91
99
|
return null;
|
92
100
|
}
|
@@ -291,7 +291,11 @@ const UIStrings = {
|
|
291
291
|
*/
|
292
292
|
xhrJSONEncodingDetection: 'UTF-16 is not supported by response json in `XMLHttpRequest`',
|
293
293
|
/**
|
294
|
-
* @description
|
294
|
+
* @description Warning displayed to developers. It is shown when
|
295
|
+
* the `XMLHttpRequest` API is used in a way that it slows down the page load
|
296
|
+
* of the next page. The `main thread` refers to an operating systems thread
|
297
|
+
* used to run most of the processing of HTML documents, so please use a
|
298
|
+
* consistent wording.
|
295
299
|
*/
|
296
300
|
xmlHttpRequestSynchronousInNonWorkerOutsideBeforeUnload:
|
297
301
|
'Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user\u2019s experience. For more help, check https://xhr.spec.whatwg.org/.',
|
@@ -846,7 +846,7 @@ export const NativeFunctions = [
|
|
846
846
|
{
|
847
847
|
name: 'addEventListener',
|
848
848
|
signatures: [['type','listener','?options']],
|
849
|
-
receivers: ['AbortSignal','SharedWorker','Worker','ServiceWorker','Animation','AudioBufferSourceNode','AudioContext','AudioScheduledSourceNode','AudioWorkletNode','BaseAudioContext','BroadcastChannel','CSSAnimation','CSSTransition','CanvasCaptureMediaStreamTrack','ConstantSourceNode','Document','HTMLElement','MathMLElement','SVGElement','Element','EventSource','FileReader','FontFaceSet','Window','HTMLAnchorElement','HTMLAreaElement','HTMLAudioElement','HTMLBRElement','HTMLBaseElement','HTMLBodyElement','HTMLButtonElement','HTMLCanvasElement','HTMLDListElement','HTMLDataElement','HTMLDataListElement','HTMLDetailsElement','HTMLDialogElement','HTMLDirectoryElement','HTMLDivElement','HTMLDocument','HTMLEmbedElement','HTMLFieldSetElement','HTMLFontElement','HTMLFormElement','HTMLFrameElement','HTMLFrameSetElement','HTMLHRElement','HTMLHeadElement','HTMLHeadingElement','HTMLHtmlElement','HTMLIFrameElement','HTMLImageElement','HTMLInputElement','HTMLLIElement','HTMLLabelElement','HTMLLegendElement','HTMLLinkElement','HTMLMapElement','HTMLMarqueeElement','HTMLMediaElement','HTMLMenuElement','HTMLMetaElement','HTMLMeterElement','HTMLModElement','HTMLOListElement','HTMLObjectElement','HTMLOptGroupElement','HTMLOptionElement','HTMLOutputElement','HTMLParagraphElement','HTMLParamElement','HTMLPictureElement','HTMLPreElement','HTMLProgressElement','HTMLQuoteElement','HTMLScriptElement','HTMLSelectElement','HTMLSlotElement','HTMLSourceElement','HTMLSpanElement','HTMLStyleElement','HTMLTableCaptionElement','HTMLTableCellElement','HTMLTableColElement','HTMLTableDataCellElement','HTMLTableElement','HTMLTableHeaderCellElement','HTMLTableRowElement','HTMLTableSectionElement','HTMLTemplateElement','HTMLTextAreaElement','HTMLTimeElement','HTMLTitleElement','HTMLTrackElement','HTMLUListElement','HTMLUnknownElement','HTMLVideoElement','IDBDatabase','IDBOpenDBRequest','IDBRequest','IDBTransaction','MIDIAccess','MIDIInput','MIDIOutput','MIDIPort','MediaDevices','MediaKeySession','MediaQueryList','MediaRecorder','MediaSource','MediaStream','MediaStreamTrack','MessagePort','Notification','OfflineAudioContext','OscillatorNode','PaymentRequest','Performance','PermissionStatus','PictureInPictureWindow','RTCDTMFSender','RTCDataChannel','RTCDtlsTransport','RTCIceTransport','RTCPeerConnection','RTCSctpTransport','RemotePlayback','SVGAElement','SVGAnimateElement','SVGAnimateMotionElement','SVGAnimateTransformElement','SVGAnimationElement','SVGCircleElement','SVGClipPathElement','SVGComponentTransferFunctionElement','SVGDefsElement','SVGDescElement','SVGEllipseElement','SVGFEBlendElement','SVGFEColorMatrixElement','SVGFEComponentTransferElement','SVGFECompositeElement','SVGFEConvolveMatrixElement','SVGFEDiffuseLightingElement','SVGFEDisplacementMapElement','SVGFEDistantLightElement','SVGFEDropShadowElement','SVGFEFloodElement','SVGFEFuncAElement','SVGFEFuncBElement','SVGFEFuncGElement','SVGFEFuncRElement','SVGFEGaussianBlurElement','SVGFEImageElement','SVGFEMergeElement','SVGFEMergeNodeElement','SVGFEMorphologyElement','SVGFEOffsetElement','SVGFEPointLightElement','SVGFESpecularLightingElement','SVGFESpotLightElement','SVGFETileElement','SVGFETurbulenceElement','SVGFilterElement','SVGForeignObjectElement','SVGGElement','SVGGeometryElement','SVGGradientElement','SVGGraphicsElement','SVGImageElement','SVGLineElement','SVGLinearGradientElement','SVGMPathElement','SVGMarkerElement','SVGMaskElement','SVGMetadataElement','SVGPathElement','SVGPatternElement','SVGPolygonElement','SVGPolylineElement','SVGRadialGradientElement','SVGRectElement','SVGSVGElement','SVGScriptElement','SVGSetElement','SVGStopElement','SVGStyleElement','SVGSwitchElement','SVGSymbolElement','SVGTSpanElement','SVGTextContentElement','SVGTextElement','SVGTextPathElement','SVGTextPositioningElement','SVGTitleElement','SVGUseElement','SVGViewElement','ScreenOrientation','ScriptProcessorNode','ServiceWorkerContainer','ServiceWorkerRegistration','ShadowRoot','SourceBuffer','SourceBufferList','SpeechSynthesis','SpeechSynthesisUtterance','TextTrack','TextTrackCue','TextTrackList','VTTCue','VisualViewport','WebSocket','XMLDocument','XMLHttpRequest','XMLHttpRequestEventTarget','XMLHttpRequestUpload','DedicatedWorkerGlobalScope','ServiceWorkerGlobalScope','SharedWorkerGlobalScope','WorkerGlobalScope']
|
849
|
+
receivers: ['AbortSignal','SharedWorker','Worker','ServiceWorker','Animation','AudioBufferSourceNode','AudioContext','AudioScheduledSourceNode','AudioWorkletNode','BaseAudioContext','BroadcastChannel','CSSAnimation','CSSTransition','CanvasCaptureMediaStreamTrack','ConstantSourceNode','Document','HTMLElement','MathMLElement','SVGElement','Element','EventSource','FileReader','FontFaceSet','Window','HTMLAnchorElement','HTMLAreaElement','HTMLAudioElement','HTMLBRElement','HTMLBaseElement','HTMLBodyElement','HTMLButtonElement','HTMLCanvasElement','HTMLDListElement','HTMLDataElement','HTMLDataListElement','HTMLDetailsElement','HTMLDialogElement','HTMLDirectoryElement','HTMLDivElement','HTMLDocument','HTMLEmbedElement','HTMLFieldSetElement','HTMLFontElement','HTMLFormElement','HTMLFrameElement','HTMLFrameSetElement','HTMLHRElement','HTMLHeadElement','HTMLHeadingElement','HTMLHtmlElement','HTMLIFrameElement','HTMLImageElement','HTMLInputElement','HTMLLIElement','HTMLLabelElement','HTMLLegendElement','HTMLLinkElement','HTMLMapElement','HTMLMarqueeElement','HTMLMediaElement','HTMLMenuElement','HTMLMetaElement','HTMLMeterElement','HTMLModElement','HTMLOListElement','HTMLObjectElement','HTMLOptGroupElement','HTMLOptionElement','HTMLOutputElement','HTMLParagraphElement','HTMLParamElement','HTMLPictureElement','HTMLPreElement','HTMLProgressElement','HTMLQuoteElement','HTMLScriptElement','HTMLSelectElement','HTMLSlotElement','HTMLSourceElement','HTMLSpanElement','HTMLStyleElement','HTMLTableCaptionElement','HTMLTableCellElement','HTMLTableColElement','HTMLTableDataCellElement','HTMLTableElement','HTMLTableHeaderCellElement','HTMLTableRowElement','HTMLTableSectionElement','HTMLTemplateElement','HTMLTextAreaElement','HTMLTimeElement','HTMLTitleElement','HTMLTrackElement','HTMLUListElement','HTMLUnknownElement','HTMLVideoElement','IDBDatabase','IDBOpenDBRequest','IDBRequest','IDBTransaction','MIDIAccess','MIDIInput','MIDIOutput','MIDIPort','MediaDevices','MediaKeySession','MediaQueryList','MediaRecorder','MediaSource','MediaStream','MediaStreamTrack','MessagePort','Notification','OfflineAudioContext','OscillatorNode','PaymentRequest','Performance','PermissionStatus','PictureInPictureWindow','RTCDTMFSender','RTCDataChannel','RTCDtlsTransport','RTCIceTransport','RTCPeerConnection','RTCSctpTransport','RemotePlayback','SVGAElement','SVGAnimateElement','SVGAnimateMotionElement','SVGAnimateTransformElement','SVGAnimationElement','SVGCircleElement','SVGClipPathElement','SVGComponentTransferFunctionElement','SVGDefsElement','SVGDescElement','SVGEllipseElement','SVGFEBlendElement','SVGFEColorMatrixElement','SVGFEComponentTransferElement','SVGFECompositeElement','SVGFEConvolveMatrixElement','SVGFEDiffuseLightingElement','SVGFEDisplacementMapElement','SVGFEDistantLightElement','SVGFEDropShadowElement','SVGFEFloodElement','SVGFEFuncAElement','SVGFEFuncBElement','SVGFEFuncGElement','SVGFEFuncRElement','SVGFEGaussianBlurElement','SVGFEImageElement','SVGFEMergeElement','SVGFEMergeNodeElement','SVGFEMorphologyElement','SVGFEOffsetElement','SVGFEPointLightElement','SVGFESpecularLightingElement','SVGFESpotLightElement','SVGFETileElement','SVGFETurbulenceElement','SVGFilterElement','SVGForeignObjectElement','SVGGElement','SVGGeometryElement','SVGGradientElement','SVGGraphicsElement','SVGImageElement','SVGLineElement','SVGLinearGradientElement','SVGMPathElement','SVGMarkerElement','SVGMaskElement','SVGMetadataElement','SVGPathElement','SVGPatternElement','SVGPolygonElement','SVGPolylineElement','SVGRadialGradientElement','SVGRectElement','SVGSVGElement','SVGScriptElement','SVGSetElement','SVGStopElement','SVGStyleElement','SVGSwitchElement','SVGSymbolElement','SVGTSpanElement','SVGTextContentElement','SVGTextElement','SVGTextPathElement','SVGTextPositioningElement','SVGTitleElement','SVGUseElement','SVGViewElement','ScreenOrientation','ScriptProcessorNode','ServiceWorkerContainer','ServiceWorkerRegistration','ShadowRoot','SourceBuffer','SourceBufferList','SpeechSynthesis','SpeechSynthesisUtterance','TextTrack','TextTrackCue','TextTrackList','VTTCue','VisualViewport','WebSocket','XMLDocument','XMLHttpRequest','XMLHttpRequestEventTarget','XMLHttpRequestUpload','DedicatedWorkerGlobalScope','ServiceWorkerGlobalScope','SharedWorkerGlobalScope','WorkerGlobalScope','Highlight']
|
850
850
|
},
|
851
851
|
{
|
852
852
|
name: 'addEventListener',
|
@@ -856,7 +856,7 @@ export const NativeFunctions = [
|
|
856
856
|
{
|
857
857
|
name: 'removeEventListener',
|
858
858
|
signatures: [['type','listener','?options']],
|
859
|
-
receivers: ['AbortSignal','SharedWorker','Worker','ServiceWorker','Animation','AudioBufferSourceNode','AudioContext','AudioScheduledSourceNode','AudioWorkletNode','BaseAudioContext','BroadcastChannel','CSSAnimation','CSSTransition','CanvasCaptureMediaStreamTrack','ConstantSourceNode','Document','HTMLElement','MathMLElement','SVGElement','Element','EventSource','FileReader','FontFaceSet','Window','HTMLAnchorElement','HTMLAreaElement','HTMLAudioElement','HTMLBRElement','HTMLBaseElement','HTMLBodyElement','HTMLButtonElement','HTMLCanvasElement','HTMLDListElement','HTMLDataElement','HTMLDataListElement','HTMLDetailsElement','HTMLDialogElement','HTMLDirectoryElement','HTMLDivElement','HTMLDocument','HTMLEmbedElement','HTMLFieldSetElement','HTMLFontElement','HTMLFormElement','HTMLFrameElement','HTMLFrameSetElement','HTMLHRElement','HTMLHeadElement','HTMLHeadingElement','HTMLHtmlElement','HTMLIFrameElement','HTMLImageElement','HTMLInputElement','HTMLLIElement','HTMLLabelElement','HTMLLegendElement','HTMLLinkElement','HTMLMapElement','HTMLMarqueeElement','HTMLMediaElement','HTMLMenuElement','HTMLMetaElement','HTMLMeterElement','HTMLModElement','HTMLOListElement','HTMLObjectElement','HTMLOptGroupElement','HTMLOptionElement','HTMLOutputElement','HTMLParagraphElement','HTMLParamElement','HTMLPictureElement','HTMLPreElement','HTMLProgressElement','HTMLQuoteElement','HTMLScriptElement','HTMLSelectElement','HTMLSlotElement','HTMLSourceElement','HTMLSpanElement','HTMLStyleElement','HTMLTableCaptionElement','HTMLTableCellElement','HTMLTableColElement','HTMLTableDataCellElement','HTMLTableElement','HTMLTableHeaderCellElement','HTMLTableRowElement','HTMLTableSectionElement','HTMLTemplateElement','HTMLTextAreaElement','HTMLTimeElement','HTMLTitleElement','HTMLTrackElement','HTMLUListElement','HTMLUnknownElement','HTMLVideoElement','IDBDatabase','IDBOpenDBRequest','IDBRequest','IDBTransaction','MIDIAccess','MIDIInput','MIDIOutput','MIDIPort','MediaDevices','MediaKeySession','MediaQueryList','MediaRecorder','MediaSource','MediaStream','MediaStreamTrack','MessagePort','Notification','OfflineAudioContext','OscillatorNode','PaymentRequest','Performance','PermissionStatus','PictureInPictureWindow','RTCDTMFSender','RTCDataChannel','RTCDtlsTransport','RTCIceTransport','RTCPeerConnection','RTCSctpTransport','RemotePlayback','SVGAElement','SVGAnimateElement','SVGAnimateMotionElement','SVGAnimateTransformElement','SVGAnimationElement','SVGCircleElement','SVGClipPathElement','SVGComponentTransferFunctionElement','SVGDefsElement','SVGDescElement','SVGEllipseElement','SVGFEBlendElement','SVGFEColorMatrixElement','SVGFEComponentTransferElement','SVGFECompositeElement','SVGFEConvolveMatrixElement','SVGFEDiffuseLightingElement','SVGFEDisplacementMapElement','SVGFEDistantLightElement','SVGFEDropShadowElement','SVGFEFloodElement','SVGFEFuncAElement','SVGFEFuncBElement','SVGFEFuncGElement','SVGFEFuncRElement','SVGFEGaussianBlurElement','SVGFEImageElement','SVGFEMergeElement','SVGFEMergeNodeElement','SVGFEMorphologyElement','SVGFEOffsetElement','SVGFEPointLightElement','SVGFESpecularLightingElement','SVGFESpotLightElement','SVGFETileElement','SVGFETurbulenceElement','SVGFilterElement','SVGForeignObjectElement','SVGGElement','SVGGeometryElement','SVGGradientElement','SVGGraphicsElement','SVGImageElement','SVGLineElement','SVGLinearGradientElement','SVGMPathElement','SVGMarkerElement','SVGMaskElement','SVGMetadataElement','SVGPathElement','SVGPatternElement','SVGPolygonElement','SVGPolylineElement','SVGRadialGradientElement','SVGRectElement','SVGSVGElement','SVGScriptElement','SVGSetElement','SVGStopElement','SVGStyleElement','SVGSwitchElement','SVGSymbolElement','SVGTSpanElement','SVGTextContentElement','SVGTextElement','SVGTextPathElement','SVGTextPositioningElement','SVGTitleElement','SVGUseElement','SVGViewElement','ScreenOrientation','ScriptProcessorNode','ServiceWorkerContainer','ServiceWorkerRegistration','ShadowRoot','SourceBuffer','SourceBufferList','SpeechSynthesis','SpeechSynthesisUtterance','TextTrack','TextTrackCue','TextTrackList','VTTCue','VisualViewport','WebSocket','XMLDocument','XMLHttpRequest','XMLHttpRequestEventTarget','XMLHttpRequestUpload','DedicatedWorkerGlobalScope','ServiceWorkerGlobalScope','SharedWorkerGlobalScope','WorkerGlobalScope']
|
859
|
+
receivers: ['AbortSignal','SharedWorker','Worker','ServiceWorker','Animation','AudioBufferSourceNode','AudioContext','AudioScheduledSourceNode','AudioWorkletNode','BaseAudioContext','BroadcastChannel','CSSAnimation','CSSTransition','CanvasCaptureMediaStreamTrack','ConstantSourceNode','Document','HTMLElement','MathMLElement','SVGElement','Element','EventSource','FileReader','FontFaceSet','Window','HTMLAnchorElement','HTMLAreaElement','HTMLAudioElement','HTMLBRElement','HTMLBaseElement','HTMLBodyElement','HTMLButtonElement','HTMLCanvasElement','HTMLDListElement','HTMLDataElement','HTMLDataListElement','HTMLDetailsElement','HTMLDialogElement','HTMLDirectoryElement','HTMLDivElement','HTMLDocument','HTMLEmbedElement','HTMLFieldSetElement','HTMLFontElement','HTMLFormElement','HTMLFrameElement','HTMLFrameSetElement','HTMLHRElement','HTMLHeadElement','HTMLHeadingElement','HTMLHtmlElement','HTMLIFrameElement','HTMLImageElement','HTMLInputElement','HTMLLIElement','HTMLLabelElement','HTMLLegendElement','HTMLLinkElement','HTMLMapElement','HTMLMarqueeElement','HTMLMediaElement','HTMLMenuElement','HTMLMetaElement','HTMLMeterElement','HTMLModElement','HTMLOListElement','HTMLObjectElement','HTMLOptGroupElement','HTMLOptionElement','HTMLOutputElement','HTMLParagraphElement','HTMLParamElement','HTMLPictureElement','HTMLPreElement','HTMLProgressElement','HTMLQuoteElement','HTMLScriptElement','HTMLSelectElement','HTMLSlotElement','HTMLSourceElement','HTMLSpanElement','HTMLStyleElement','HTMLTableCaptionElement','HTMLTableCellElement','HTMLTableColElement','HTMLTableDataCellElement','HTMLTableElement','HTMLTableHeaderCellElement','HTMLTableRowElement','HTMLTableSectionElement','HTMLTemplateElement','HTMLTextAreaElement','HTMLTimeElement','HTMLTitleElement','HTMLTrackElement','HTMLUListElement','HTMLUnknownElement','HTMLVideoElement','IDBDatabase','IDBOpenDBRequest','IDBRequest','IDBTransaction','MIDIAccess','MIDIInput','MIDIOutput','MIDIPort','MediaDevices','MediaKeySession','MediaQueryList','MediaRecorder','MediaSource','MediaStream','MediaStreamTrack','MessagePort','Notification','OfflineAudioContext','OscillatorNode','PaymentRequest','Performance','PermissionStatus','PictureInPictureWindow','RTCDTMFSender','RTCDataChannel','RTCDtlsTransport','RTCIceTransport','RTCPeerConnection','RTCSctpTransport','RemotePlayback','SVGAElement','SVGAnimateElement','SVGAnimateMotionElement','SVGAnimateTransformElement','SVGAnimationElement','SVGCircleElement','SVGClipPathElement','SVGComponentTransferFunctionElement','SVGDefsElement','SVGDescElement','SVGEllipseElement','SVGFEBlendElement','SVGFEColorMatrixElement','SVGFEComponentTransferElement','SVGFECompositeElement','SVGFEConvolveMatrixElement','SVGFEDiffuseLightingElement','SVGFEDisplacementMapElement','SVGFEDistantLightElement','SVGFEDropShadowElement','SVGFEFloodElement','SVGFEFuncAElement','SVGFEFuncBElement','SVGFEFuncGElement','SVGFEFuncRElement','SVGFEGaussianBlurElement','SVGFEImageElement','SVGFEMergeElement','SVGFEMergeNodeElement','SVGFEMorphologyElement','SVGFEOffsetElement','SVGFEPointLightElement','SVGFESpecularLightingElement','SVGFESpotLightElement','SVGFETileElement','SVGFETurbulenceElement','SVGFilterElement','SVGForeignObjectElement','SVGGElement','SVGGeometryElement','SVGGradientElement','SVGGraphicsElement','SVGImageElement','SVGLineElement','SVGLinearGradientElement','SVGMPathElement','SVGMarkerElement','SVGMaskElement','SVGMetadataElement','SVGPathElement','SVGPatternElement','SVGPolygonElement','SVGPolylineElement','SVGRadialGradientElement','SVGRectElement','SVGSVGElement','SVGScriptElement','SVGSetElement','SVGStopElement','SVGStyleElement','SVGSwitchElement','SVGSymbolElement','SVGTSpanElement','SVGTextContentElement','SVGTextElement','SVGTextPathElement','SVGTextPositioningElement','SVGTitleElement','SVGUseElement','SVGViewElement','ScreenOrientation','ScriptProcessorNode','ServiceWorkerContainer','ServiceWorkerRegistration','ShadowRoot','SourceBuffer','SourceBufferList','SpeechSynthesis','SpeechSynthesisUtterance','TextTrack','TextTrackCue','TextTrackList','VTTCue','VisualViewport','WebSocket','XMLDocument','XMLHttpRequest','XMLHttpRequestEventTarget','XMLHttpRequestUpload','DedicatedWorkerGlobalScope','ServiceWorkerGlobalScope','SharedWorkerGlobalScope','WorkerGlobalScope','Highlight']
|
860
860
|
},
|
861
861
|
{
|
862
862
|
name: 'removeEventListener',
|
@@ -5920,6 +5920,10 @@ export const NativeFunctions = [
|
|
5920
5920
|
name: 'ContentVisibilityAutoStateChangedEvent',
|
5921
5921
|
signatures: [['type','?eventInitDict']]
|
5922
5922
|
},
|
5923
|
+
{
|
5924
|
+
name: 'prepare',
|
5925
|
+
signatures: [['?callback']]
|
5926
|
+
},
|
5923
5927
|
{
|
5924
5928
|
name: 'timeout',
|
5925
5929
|
signatures: [['milliseconds']]
|
@@ -370,9 +370,8 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
370
370
|
await PersistenceImpl.instance().addBinding(binding);
|
371
371
|
const uiSourceCodeOfTruth =
|
372
372
|
this.savingForOverrides.has(networkUISourceCode) ? networkUISourceCode : fileSystemUISourceCode;
|
373
|
-
const
|
374
|
-
|
375
|
-
PersistenceImpl.instance().syncContent(uiSourceCodeOfTruth, content || '', encoded);
|
373
|
+
const {content, isEncoded} = await uiSourceCodeOfTruth.requestContent();
|
374
|
+
PersistenceImpl.instance().syncContent(uiSourceCodeOfTruth, content || '', isEncoded);
|
376
375
|
}
|
377
376
|
|
378
377
|
private onUISourceCodeWorkingCopyCommitted(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
@@ -390,14 +389,13 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
390
389
|
}
|
391
390
|
this.savingForOverrides.add(uiSourceCode);
|
392
391
|
let encodedPath = this.encodedPathFromUrl(uiSourceCode.url());
|
393
|
-
const content =
|
394
|
-
const encoded = await uiSourceCode.contentEncoded();
|
392
|
+
const {content, isEncoded} = await uiSourceCode.requestContent();
|
395
393
|
const lastIndexOfSlash = encodedPath.lastIndexOf('/');
|
396
394
|
const encodedFileName = Common.ParsedURL.ParsedURL.substring(encodedPath, lastIndexOfSlash + 1);
|
397
395
|
const rawFileName = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(encodedFileName);
|
398
396
|
encodedPath = Common.ParsedURL.ParsedURL.substr(encodedPath, 0, lastIndexOfSlash);
|
399
397
|
if (this.projectInternal) {
|
400
|
-
await this.projectInternal.createFile(encodedPath, rawFileName, content,
|
398
|
+
await this.projectInternal.createFile(encodedPath, rawFileName, content ?? '', isEncoded);
|
401
399
|
}
|
402
400
|
this.fileCreatedForTest(encodedPath, rawFileName);
|
403
401
|
this.savingForOverrides.delete(uiSourceCode);
|
@@ -54,12 +54,13 @@ export class ContextMenuProvider implements UI.ContextMenu.Provider {
|
|
54
54
|
if (contentProvider instanceof Workspace.UISourceCode.UISourceCode) {
|
55
55
|
(contentProvider as Workspace.UISourceCode.UISourceCode).commitWorkingCopy();
|
56
56
|
}
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
const content = await contentProvider.requestContent();
|
58
|
+
let decodedContent = content.content || '';
|
59
|
+
if (content.isEncoded) {
|
60
|
+
decodedContent = window.atob(decodedContent);
|
60
61
|
}
|
61
62
|
const url = contentProvider.contentURL();
|
62
|
-
void Workspace.FileManager.FileManager.instance().save(url,
|
63
|
+
void Workspace.FileManager.FileManager.instance().save(url, decodedContent, true);
|
63
64
|
Workspace.FileManager.FileManager.instance().close(url);
|
64
65
|
}
|
65
66
|
|
@@ -37,12 +37,25 @@ export function createCssTokenizer(): Tokenizer {
|
|
37
37
|
const stream = new CodeMirror.StringStream();
|
38
38
|
stream.string = line;
|
39
39
|
|
40
|
-
const
|
40
|
+
const state = streamParser.startState();
|
41
41
|
let lastPos = stream.pos;
|
42
42
|
while (!stream.eol()) {
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
stream.start = lastPos;
|
44
|
+
let tokenType = streamParser.token(stream, state);
|
45
|
+
/**
|
46
|
+
* We expect unknown properties (like `unknownProp: unknownPropVal`) to still be
|
47
|
+
* formatted correctly. However, `tokenType` for such properties are marked
|
48
|
+
* as `error` from CodeMirror side and the internal state of the parser becomes `maybeprop`.
|
49
|
+
*
|
50
|
+
* So, we handle that specific keyword to be marked as `property` even though it is
|
51
|
+
* not a known property. We do this because for our formatting purposes it doesn't matter
|
52
|
+
* whether a property is a known CSS property or not.
|
53
|
+
*/
|
54
|
+
if (tokenType === 'error' && state.state === 'maybeprop') {
|
55
|
+
tokenType = 'property';
|
56
|
+
}
|
57
|
+
const segment = stream.current();
|
58
|
+
callback(segment, tokenType);
|
46
59
|
lastPos = stream.pos;
|
47
60
|
}
|
48
61
|
}
|
@@ -34,7 +34,6 @@ import type * as Platform from '../../core/platform/platform.js';
|
|
34
34
|
export abstract class ContentProvider {
|
35
35
|
abstract contentURL(): Platform.DevToolsPath.UrlString;
|
36
36
|
abstract contentType(): Common.ResourceType.ResourceType;
|
37
|
-
abstract contentEncoded(): Promise<boolean>;
|
38
37
|
abstract requestContent(): Promise<DeferredContent>;
|
39
38
|
abstract searchInContent(query: string, caseSensitive: boolean, isRegex: boolean): Promise<SearchMatch[]>;
|
40
39
|
}
|
@@ -39,10 +39,6 @@ export class StaticContentProvider implements ContentProvider {
|
|
39
39
|
return this.contentTypeInternal;
|
40
40
|
}
|
41
41
|
|
42
|
-
contentEncoded(): Promise<boolean> {
|
43
|
-
return Promise.resolve(false);
|
44
|
-
}
|
45
|
-
|
46
42
|
requestContent(): Promise<DeferredContent> {
|
47
43
|
return this.lazyContent();
|
48
44
|
}
|