chrome-devtools-frontend 1.0.970539 → 1.0.972865
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 +12 -7
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/ic_changes.svg +5 -0
- package/front_end/core/common/ParsedURL.ts +11 -5
- package/front_end/core/host/UserMetrics.ts +4 -1
- package/front_end/core/i18n/locales/en-US.json +45 -0
- package/front_end/core/i18n/locales/en-XL.json +45 -0
- package/front_end/core/platform/UserVisibleError.ts +28 -0
- package/front_end/core/platform/platform.ts +2 -0
- package/front_end/core/sdk/CSSModel.ts +21 -0
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +10 -10
- package/front_end/core/sdk/ChildTargetManager.ts +0 -1
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +6 -4
- package/front_end/core/sdk/DOMDebuggerModel.ts +4 -3
- package/front_end/core/sdk/DebuggerModel.ts +17 -16
- package/front_end/core/sdk/NetworkManager.ts +32 -10
- package/front_end/core/sdk/NetworkRequest.ts +29 -16
- package/front_end/core/sdk/Resource.ts +10 -10
- package/front_end/core/sdk/ResourceTreeModel.ts +16 -13
- package/front_end/core/sdk/Script.ts +10 -10
- package/front_end/core/sdk/SourceMap.ts +8 -6
- package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +35 -12
- package/front_end/entrypoints/main/MainImpl.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.js +14 -8
- package/front_end/generated/SupportedCSSProperties.js +2 -0
- package/front_end/generated/protocol-mapping.d.ts +5 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -12
- package/front_end/models/bindings/BreakpointManager.ts +7 -5
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +10 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -1
- package/front_end/models/bindings/ResourceMapping.ts +2 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
- package/front_end/models/bindings/StylesSourceMapping.ts +2 -1
- package/front_end/models/har/HARFormat.ts +4 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +12 -12
- package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataHttpNotFound.md → federatedAuthRequestClientMetadataHttpNotFound.md} +0 -0
- package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataInvalidResponse.md → federatedAuthRequestClientMetadataInvalidResponse.md} +0 -0
- package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataNoResponse.md → federatedAuthRequestClientMetadataNoResponse.md} +0 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
- package/front_end/models/persistence/Automapping.ts +1 -1
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +7 -7
- package/front_end/models/persistence/IsolatedFileSystem.ts +10 -13
- package/front_end/models/persistence/PersistenceActions.ts +1 -4
- package/front_end/models/persistence/PlatformFileSystem.ts +3 -3
- package/front_end/{panels/sources/SourceMapNamesResolver.ts → models/source_map_scopes/NamesResolver.ts} +5 -5
- package/front_end/models/source_map_scopes/source_map_scopes.ts +7 -0
- package/front_end/models/text_utils/ContentProvider.ts +2 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +7 -5
- package/front_end/models/workspace/UISourceCode.ts +7 -7
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -3
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -8
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +3 -2
- package/front_end/panels/browser_debugger/categorizedBreakpointsSidebarPane.css +0 -1
- package/front_end/panels/changes/ChangesView.ts +4 -4
- package/front_end/panels/console/ConsolePrompt.ts +25 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +41 -8
- package/front_end/panels/coverage/CoverageModel.ts +1 -1
- package/front_end/panels/elements/ElementsPanel.ts +25 -11
- package/front_end/panels/elements/ElementsTreeElement.ts +0 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +236 -51
- package/front_end/panels/elements/elementsTreeOutline.css +0 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/issues/AffectedSourcesView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +41 -0
- package/front_end/panels/lighthouse/LighthousePanel.ts +64 -9
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +32 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +0 -5
- package/front_end/panels/lighthouse/LighthouseStartView.ts +8 -4
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +100 -0
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +99 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -1
- package/front_end/panels/profiler/CPUProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapProfileView.ts +0 -2
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -3
- package/front_end/panels/sensors/sensors.css +0 -1
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +5 -4
- package/front_end/panels/sources/NavigatorView.ts +14 -10
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +6 -3
- package/front_end/panels/sources/SourcesNavigator.ts +7 -1
- package/front_end/panels/sources/sources-legacy.ts +5 -16
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/sources/sourcesView.css +0 -4
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -47
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/json.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +3 -1
- package/front_end/third_party/codemirror.next/package.json +9 -9
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1047 -1158
- package/front_end/third_party/lighthouse/locales/en-US.json +7 -1
- package/front_end/third_party/lighthouse/locales/en-XL.json +7 -1
- package/front_end/third_party/lighthouse/report/bundle.d.ts +0 -3
- package/front_end/third_party/lighthouse/report/bundle.js +38 -24
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/ui/legacy/ViewManager.ts +2 -1
- package/front_end/ui/legacy/closeButton.css +0 -1
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +7 -4
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +2 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +20 -59
- package/front_end/ui/legacy/tabbedPane.css +0 -2
- package/front_end/ui/legacy/toolbar.css +28 -3
- package/package.json +1 -1
- package/scripts/hosted_mode/server.js +13 -0
- package/scripts/npm_test.js +1 -1
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownHttpNotFound.md +0 -1
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownInvalidResponse.md +0 -1
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownNoResponse.md +0 -1
@@ -285,12 +285,12 @@ export function registerCommands(inspectorBackend) {
|
|
285
285
|
inspectorBackend.registerEnum('Audits.FederatedAuthRequestIssueReason', {
|
286
286
|
ApprovalDeclined: 'ApprovalDeclined',
|
287
287
|
TooManyRequests: 'TooManyRequests',
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
288
|
+
ManifestHttpNotFound: 'ManifestHttpNotFound',
|
289
|
+
ManifestNoResponse: 'ManifestNoResponse',
|
290
|
+
ManifestInvalidResponse: 'ManifestInvalidResponse',
|
291
|
+
ClientMetadataHttpNotFound: 'ClientMetadataHttpNotFound',
|
292
|
+
ClientMetadataNoResponse: 'ClientMetadataNoResponse',
|
293
|
+
ClientMetadataInvalidResponse: 'ClientMetadataInvalidResponse',
|
294
294
|
ErrorFetchingSignin: 'ErrorFetchingSignin',
|
295
295
|
InvalidSigninResponse: 'InvalidSigninResponse',
|
296
296
|
AccountsHttpNotFound: 'AccountsHttpNotFound',
|
@@ -552,6 +552,13 @@ export function registerCommands(inspectorBackend) {
|
|
552
552
|
{'name': 'range', 'type': 'object', 'optional': false}, {'name': 'text', 'type': 'string', 'optional': false}
|
553
553
|
],
|
554
554
|
['containerQuery']);
|
555
|
+
inspectorBackend.registerCommand(
|
556
|
+
'CSS.setSupportsText',
|
557
|
+
[
|
558
|
+
{'name': 'styleSheetId', 'type': 'string', 'optional': false},
|
559
|
+
{'name': 'range', 'type': 'object', 'optional': false}, {'name': 'text', 'type': 'string', 'optional': false}
|
560
|
+
],
|
561
|
+
['supports']);
|
555
562
|
inspectorBackend.registerCommand(
|
556
563
|
'CSS.setRuleSelector',
|
557
564
|
[
|
@@ -1124,7 +1131,6 @@ export function registerCommands(inspectorBackend) {
|
|
1124
1131
|
[
|
1125
1132
|
{'name': 'policy', 'type': 'string', 'optional': false}, {'name': 'budget', 'type': 'number', 'optional': true},
|
1126
1133
|
{'name': 'maxVirtualTimeTaskStarvationCount', 'type': 'number', 'optional': true},
|
1127
|
-
{'name': 'waitForNavigation', 'type': 'boolean', 'optional': true},
|
1128
1134
|
{'name': 'initialVirtualTime', 'type': 'number', 'optional': true}
|
1129
1135
|
],
|
1130
1136
|
['virtualTimeTicksBase']);
|
@@ -2033,6 +2039,7 @@ export function registerCommands(inspectorBackend) {
|
|
2033
2039
|
ChViewportHeight: 'ch-viewport-height',
|
2034
2040
|
ChViewportWidth: 'ch-viewport-width',
|
2035
2041
|
ChWidth: 'ch-width',
|
2042
|
+
ChPartitionedCookies: 'ch-partitioned-cookies',
|
2036
2043
|
ClipboardRead: 'clipboard-read',
|
2037
2044
|
ClipboardWrite: 'clipboard-write',
|
2038
2045
|
CrossOriginIsolated: 'cross-origin-isolated',
|
@@ -2050,7 +2057,6 @@ export function registerCommands(inspectorBackend) {
|
|
2050
2057
|
Gyroscope: 'gyroscope',
|
2051
2058
|
Hid: 'hid',
|
2052
2059
|
IdleDetection: 'idle-detection',
|
2053
|
-
InterestCohort: 'interest-cohort',
|
2054
2060
|
JoinAdInterestGroup: 'join-ad-interest-group',
|
2055
2061
|
KeyboardMap: 'keyboard-map',
|
2056
2062
|
Magnetometer: 'magnetometer',
|
@@ -152,6 +152,7 @@ export const generatedProperties = [
|
|
152
152
|
{'name': 'background-repeat-x'},
|
153
153
|
{'name': 'background-repeat-y'},
|
154
154
|
{'name': 'background-size', 'keywords': ['auto', 'cover', 'contain']},
|
155
|
+
{'name': 'base-palette'},
|
155
156
|
{'name': 'baseline-shift', 'keywords': ['baseline', 'sub', 'super']},
|
156
157
|
{'name': 'block-size', 'keywords': ['auto']},
|
157
158
|
{
|
@@ -619,6 +620,7 @@ export const generatedProperties = [
|
|
619
620
|
{'name': 'overflow-wrap', 'inherited': true, 'keywords': ['normal', 'break-word', 'anywhere']},
|
620
621
|
{'name': 'overflow-x', 'keywords': ['visible', 'hidden', 'scroll', 'auto', 'overlay', 'clip']},
|
621
622
|
{'name': 'overflow-y', 'keywords': ['visible', 'hidden', 'scroll', 'auto', 'overlay', 'clip']},
|
623
|
+
{'name': 'override-colors'},
|
622
624
|
{'longhands': ['overscroll-behavior-x', 'overscroll-behavior-y'], 'name': 'overscroll-behavior'},
|
623
625
|
{'name': 'overscroll-behavior-block'},
|
624
626
|
{'name': 'overscroll-behavior-inline'},
|
@@ -1011,6 +1011,11 @@ export namespace ProtocolMapping {
|
|
1011
1011
|
'CSS.setContainerQueryText': {
|
1012
1012
|
paramsType: [Protocol.CSS.SetContainerQueryTextRequest]; returnType: Protocol.CSS.SetContainerQueryTextResponse;
|
1013
1013
|
};
|
1014
|
+
/**
|
1015
|
+
* Modifies the expression of a supports at-rule.
|
1016
|
+
*/
|
1017
|
+
'CSS.setSupportsText':
|
1018
|
+
{paramsType: [Protocol.CSS.SetSupportsTextRequest]; returnType: Protocol.CSS.SetSupportsTextResponse;};
|
1014
1019
|
/**
|
1015
1020
|
* Modifies the rule selector.
|
1016
1021
|
*/
|
@@ -631,6 +631,11 @@ declare namespace ProtocolProxyApi {
|
|
631
631
|
invoke_setContainerQueryText(params: Protocol.CSS.SetContainerQueryTextRequest):
|
632
632
|
Promise<Protocol.CSS.SetContainerQueryTextResponse>;
|
633
633
|
|
634
|
+
/**
|
635
|
+
* Modifies the expression of a supports at-rule.
|
636
|
+
*/
|
637
|
+
invoke_setSupportsText(params: Protocol.CSS.SetSupportsTextRequest): Promise<Protocol.CSS.SetSupportsTextResponse>;
|
638
|
+
|
634
639
|
/**
|
635
640
|
* Modifies the rule selector.
|
636
641
|
*/
|
@@ -1065,12 +1065,12 @@ export namespace Audits {
|
|
1065
1065
|
export const enum FederatedAuthRequestIssueReason {
|
1066
1066
|
ApprovalDeclined = 'ApprovalDeclined',
|
1067
1067
|
TooManyRequests = 'TooManyRequests',
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1068
|
+
ManifestHttpNotFound = 'ManifestHttpNotFound',
|
1069
|
+
ManifestNoResponse = 'ManifestNoResponse',
|
1070
|
+
ManifestInvalidResponse = 'ManifestInvalidResponse',
|
1071
|
+
ClientMetadataHttpNotFound = 'ClientMetadataHttpNotFound',
|
1072
|
+
ClientMetadataNoResponse = 'ClientMetadataNoResponse',
|
1073
|
+
ClientMetadataInvalidResponse = 'ClientMetadataInvalidResponse',
|
1074
1074
|
ErrorFetchingSignin = 'ErrorFetchingSignin',
|
1075
1075
|
InvalidSigninResponse = 'InvalidSigninResponse',
|
1076
1076
|
AccountsHttpNotFound = 'AccountsHttpNotFound',
|
@@ -2554,6 +2554,19 @@ export namespace CSS {
|
|
2554
2554
|
containerQuery: CSSContainerQuery;
|
2555
2555
|
}
|
2556
2556
|
|
2557
|
+
export interface SetSupportsTextRequest {
|
2558
|
+
styleSheetId: StyleSheetId;
|
2559
|
+
range: SourceRange;
|
2560
|
+
text: string;
|
2561
|
+
}
|
2562
|
+
|
2563
|
+
export interface SetSupportsTextResponse extends ProtocolResponseWithError {
|
2564
|
+
/**
|
2565
|
+
* The resulting CSS Supports rule after modification.
|
2566
|
+
*/
|
2567
|
+
supports: CSSSupports;
|
2568
|
+
}
|
2569
|
+
|
2557
2570
|
export interface SetRuleSelectorRequest {
|
2558
2571
|
styleSheetId: StyleSheetId;
|
2559
2572
|
range: SourceRange;
|
@@ -5273,11 +5286,6 @@ export namespace Emulation {
|
|
5273
5286
|
* forwards to prevent deadlock.
|
5274
5287
|
*/
|
5275
5288
|
maxVirtualTimeTaskStarvationCount?: integer;
|
5276
|
-
/**
|
5277
|
-
* If set the virtual time policy change should be deferred until any frame starts navigating.
|
5278
|
-
* Note any previous deferred policy change is superseded.
|
5279
|
-
*/
|
5280
|
-
waitForNavigation?: boolean;
|
5281
5289
|
/**
|
5282
5290
|
* If set, base::Time::Now will be overridden to initially return this value.
|
5283
5291
|
*/
|
@@ -10052,6 +10060,7 @@ export namespace Page {
|
|
10052
10060
|
ChViewportHeight = 'ch-viewport-height',
|
10053
10061
|
ChViewportWidth = 'ch-viewport-width',
|
10054
10062
|
ChWidth = 'ch-width',
|
10063
|
+
ChPartitionedCookies = 'ch-partitioned-cookies',
|
10055
10064
|
ClipboardRead = 'clipboard-read',
|
10056
10065
|
ClipboardWrite = 'clipboard-write',
|
10057
10066
|
CrossOriginIsolated = 'cross-origin-isolated',
|
@@ -10069,7 +10078,6 @@ export namespace Page {
|
|
10069
10078
|
Gyroscope = 'gyroscope',
|
10070
10079
|
Hid = 'hid',
|
10071
10080
|
IdleDetection = 'idle-detection',
|
10072
|
-
InterestCohort = 'interest-cohort',
|
10073
10081
|
JoinAdInterestGroup = 'join-ad-interest-group',
|
10074
10082
|
KeyboardMap = 'keyboard-map',
|
10075
10083
|
Magnetometer = 'magnetometer',
|
@@ -32,6 +32,7 @@
|
|
32
32
|
|
33
33
|
import * as Common from '../../core/common/common.js';
|
34
34
|
import * as SDK from '../../core/sdk/sdk.js';
|
35
|
+
import type * as Platform from '../../core/platform/platform.js';
|
35
36
|
import type * as Protocol from '../../generated/protocol.js';
|
36
37
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
37
38
|
import * as Workspace from '../workspace/workspace.js';
|
@@ -305,7 +306,7 @@ export type EventTypes = {
|
|
305
306
|
|
306
307
|
export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
|
307
308
|
readonly breakpointManager: BreakpointManager;
|
308
|
-
urlInternal:
|
309
|
+
urlInternal: Platform.DevToolsPath.UrlString;
|
309
310
|
readonly #lineNumberInternal: number;
|
310
311
|
readonly #columnNumberInternal: number|undefined;
|
311
312
|
readonly #uiLocations: Set<Workspace.UISourceCode.UILocation>;
|
@@ -317,8 +318,9 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
|
|
317
318
|
readonly #modelBreakpoints: Map<SDK.DebuggerModel.DebuggerModel, ModelBreakpoint>;
|
318
319
|
|
319
320
|
constructor(
|
320
|
-
breakpointManager: BreakpointManager, primaryUISourceCode: Workspace.UISourceCode.UISourceCode,
|
321
|
-
lineNumber: number, columnNumber: number|undefined, condition: string,
|
321
|
+
breakpointManager: BreakpointManager, primaryUISourceCode: Workspace.UISourceCode.UISourceCode,
|
322
|
+
url: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number|undefined, condition: string,
|
323
|
+
enabled: boolean) {
|
322
324
|
this.breakpointManager = breakpointManager;
|
323
325
|
this.urlInternal = url;
|
324
326
|
this.#lineNumberInternal = lineNumber;
|
@@ -398,7 +400,7 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
|
|
398
400
|
}
|
399
401
|
}
|
400
402
|
|
401
|
-
url():
|
403
|
+
url(): Platform.DevToolsPath.UrlString {
|
402
404
|
return this.urlInternal;
|
403
405
|
}
|
404
406
|
|
@@ -791,7 +793,7 @@ export class ModelBreakpoint {
|
|
791
793
|
}
|
792
794
|
|
793
795
|
interface Position {
|
794
|
-
url:
|
796
|
+
url: Platform.DevToolsPath.UrlString;
|
795
797
|
scriptId: Protocol.Runtime.ScriptId;
|
796
798
|
scriptHash: string;
|
797
799
|
lineNumber: number;
|
@@ -100,8 +100,7 @@ export class CSSWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<S
|
|
100
100
|
return locationPromise;
|
101
101
|
}
|
102
102
|
|
103
|
-
|
104
|
-
|null {
|
103
|
+
propertyRawLocation(cssProperty: SDK.CSSProperty.CSSProperty, forName: boolean): SDK.CSSModel.CSSLocation|null {
|
105
104
|
const style = cssProperty.ownerStyle;
|
106
105
|
if (!style || style.type !== SDK.CSSStyleDeclaration.Type.Regular || !style.styleSheetId) {
|
107
106
|
return null;
|
@@ -118,8 +117,16 @@ export class CSSWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<S
|
|
118
117
|
|
119
118
|
const lineNumber = range.startLine;
|
120
119
|
const columnNumber = range.startColumn;
|
121
|
-
|
120
|
+
return new SDK.CSSModel.CSSLocation(
|
122
121
|
header, header.lineNumberInSource(lineNumber), header.columnNumberInSource(lineNumber, columnNumber));
|
122
|
+
}
|
123
|
+
|
124
|
+
propertyUILocation(cssProperty: SDK.CSSProperty.CSSProperty, forName: boolean): Workspace.UISourceCode.UILocation
|
125
|
+
|null {
|
126
|
+
const rawLocation = this.propertyRawLocation(cssProperty, forName);
|
127
|
+
if (!rawLocation) {
|
128
|
+
return null;
|
129
|
+
}
|
123
130
|
return this.rawLocationToUILocation(rawLocation);
|
124
131
|
}
|
125
132
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
7
|
+
import type * as Platform from '../../core/platform/platform.js';
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
9
10
|
import * as Workspace from '../workspace/workspace.js';
|
@@ -1315,7 +1316,7 @@ class ModelData {
|
|
1315
1316
|
this.uiSourceCodeToScripts.set(uiSourceCode, [script]);
|
1316
1317
|
|
1317
1318
|
const contentProvider = new SDK.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(
|
1318
|
-
url, Common.ResourceType.resourceTypes.SourceMapScript, initiator);
|
1319
|
+
url as Platform.DevToolsPath.UrlString, Common.ResourceType.resourceTypes.SourceMapScript, initiator);
|
1319
1320
|
const mimeType = Common.ResourceType.ResourceType.mimeFromURL(url) || 'text/javascript';
|
1320
1321
|
this.project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, null, mimeType);
|
1321
1322
|
} else {
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
7
8
|
import * as TextUtils from '../text_utils/text_utils.js';
|
8
9
|
import * as Workspace from '../workspace/workspace.js';
|
@@ -420,7 +421,7 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
420
421
|
return this.resources.values().next().value;
|
421
422
|
}
|
422
423
|
|
423
|
-
contentURL():
|
424
|
+
contentURL(): Platform.DevToolsPath.UrlString {
|
424
425
|
return this.firstResource().contentURL();
|
425
426
|
}
|
426
427
|
|
@@ -30,6 +30,7 @@
|
|
30
30
|
|
31
31
|
import * as Common from '../../core/common/common.js';
|
32
32
|
import * as i18n from '../../core/i18n/i18n.js';
|
33
|
+
import type * as Platform from '../../core/platform/platform.js';
|
33
34
|
import * as SDK from '../../core/sdk/sdk.js';
|
34
35
|
import * as Workspace from '../workspace/workspace.js';
|
35
36
|
import type * as Protocol from '../../generated/protocol.js';
|
@@ -411,7 +412,7 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper<Resou
|
|
411
412
|
Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);
|
412
413
|
}
|
413
414
|
|
414
|
-
addSourceMapURL(sourceMapURL:
|
415
|
+
addSourceMapURL(sourceMapURL: Platform.DevToolsPath.UrlString): void {
|
415
416
|
if (!this.scriptInternal) {
|
416
417
|
return;
|
417
418
|
}
|
@@ -31,6 +31,7 @@
|
|
31
31
|
import * as Common from '../../core/common/common.js';
|
32
32
|
import * as SDK from '../../core/sdk/sdk.js';
|
33
33
|
import type * as Protocol from '../../generated/protocol.js';
|
34
|
+
import type * as Platform from '../../core/platform/platform.js';
|
34
35
|
import * as Workspace from '../workspace/workspace.js';
|
35
36
|
|
36
37
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
@@ -78,7 +79,7 @@ export class SASSSourceMapping implements SourceMapping {
|
|
78
79
|
for (const sourceURL of sourceMap.sourceURLs()) {
|
79
80
|
let binding = bindings.get(sourceURL);
|
80
81
|
if (!binding) {
|
81
|
-
binding = new Binding(project, sourceURL);
|
82
|
+
binding = new Binding(project, sourceURL as Platform.DevToolsPath.UrlString);
|
82
83
|
bindings.set(sourceURL, binding);
|
83
84
|
}
|
84
85
|
binding.addSourceMap(sourceMap, header.frameId);
|
@@ -163,11 +164,11 @@ const uiSourceCodeToBinding = new WeakMap<Workspace.UISourceCode.UISourceCode, B
|
|
163
164
|
|
164
165
|
class Binding {
|
165
166
|
readonly #project: ContentProviderBasedProject;
|
166
|
-
readonly #url:
|
167
|
+
readonly #url: Platform.DevToolsPath.UrlString;
|
167
168
|
referringSourceMaps: SDK.SourceMap.TextSourceMap[];
|
168
169
|
uiSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
169
170
|
|
170
|
-
constructor(project: ContentProviderBasedProject, url:
|
171
|
+
constructor(project: ContentProviderBasedProject, url: Platform.DevToolsPath.UrlString) {
|
171
172
|
this.#project = project;
|
172
173
|
this.#url = url;
|
173
174
|
|
@@ -29,6 +29,7 @@
|
|
29
29
|
*/
|
30
30
|
|
31
31
|
import * as Common from '../../core/common/common.js';
|
32
|
+
import type * as Platform from '../../core/platform/platform.js';
|
32
33
|
import * as SDK from '../../core/sdk/sdk.js';
|
33
34
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
34
35
|
import * as Workspace from '../workspace/workspace.js';
|
@@ -297,7 +298,7 @@ export class StyleFile implements TextUtils.ContentProvider.ContentProvider {
|
|
297
298
|
Common.EventTarget.removeEventListeners(this.#eventListeners);
|
298
299
|
}
|
299
300
|
|
300
|
-
contentURL():
|
301
|
+
contentURL(): Platform.DevToolsPath.UrlString {
|
301
302
|
console.assert(this.headers.size > 0);
|
302
303
|
return this.headers.values().next().value.originalContentProvider().contentURL();
|
303
304
|
}
|
@@ -2,6 +2,8 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
|
+
|
5
7
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
6
8
|
|
7
9
|
class HARBase {
|
@@ -197,7 +199,7 @@ export class HAREntry extends HARBase {
|
|
197
199
|
|
198
200
|
class HARRequest extends HARBase {
|
199
201
|
method: string;
|
200
|
-
url:
|
202
|
+
url: Platform.DevToolsPath.UrlString;
|
201
203
|
httpVersion: string;
|
202
204
|
cookies: HARCookie[];
|
203
205
|
headers: HARHeader[];
|
@@ -209,7 +211,7 @@ class HARRequest extends HARBase {
|
|
209
211
|
constructor(data: any) {
|
210
212
|
super(data);
|
211
213
|
this.method = String(data['method']);
|
212
|
-
this.url = String(data['url']);
|
214
|
+
this.url = String(data['url']) as Platform.DevToolsPath.UrlString;
|
213
215
|
this.httpVersion = String(data['httpVersion']);
|
214
216
|
this.cookies = Array.isArray(data['cookies']) ? data['cookies'].map(cookie => new HARCookie(cookie)) : [];
|
215
217
|
this.headers = Array.isArray(data['headers']) ? data['headers'].map(header => new HARHeader(header)) : [];
|
@@ -38,7 +38,6 @@ export class Importer {
|
|
38
38
|
lineNumber: initiatorEntry.lineNumber,
|
39
39
|
};
|
40
40
|
}
|
41
|
-
|
42
41
|
const request = SDK.NetworkRequest.NetworkRequest.createWithoutBackendRequest(
|
43
42
|
'har-' + requests.length, entry.request.url, documentURL, initiator);
|
44
43
|
const page = pageref ? pages.get(pageref) : undefined;
|
@@ -93,9 +93,9 @@ const issueDescriptions: Map<Protocol.Audits.FederatedAuthRequestIssueReason, La
|
|
93
93
|
},
|
94
94
|
],
|
95
95
|
[
|
96
|
-
Protocol.Audits.FederatedAuthRequestIssueReason.
|
96
|
+
Protocol.Audits.FederatedAuthRequestIssueReason.ManifestHttpNotFound,
|
97
97
|
{
|
98
|
-
file: '
|
98
|
+
file: 'federatedAuthRequestManifestHttpNotFound.md',
|
99
99
|
links: [{
|
100
100
|
link: 'https://fedidcg.github.io/FedCM/',
|
101
101
|
linkTitle: i18nLazyString(UIStrings.fedCm),
|
@@ -103,9 +103,9 @@ const issueDescriptions: Map<Protocol.Audits.FederatedAuthRequestIssueReason, La
|
|
103
103
|
},
|
104
104
|
],
|
105
105
|
[
|
106
|
-
Protocol.Audits.FederatedAuthRequestIssueReason.
|
106
|
+
Protocol.Audits.FederatedAuthRequestIssueReason.ManifestNoResponse,
|
107
107
|
{
|
108
|
-
file: '
|
108
|
+
file: 'federatedAuthRequestManifestNoResponse.md',
|
109
109
|
links: [{
|
110
110
|
link: 'https://fedidcg.github.io/FedCM/',
|
111
111
|
linkTitle: i18nLazyString(UIStrings.fedCm),
|
@@ -113,9 +113,9 @@ const issueDescriptions: Map<Protocol.Audits.FederatedAuthRequestIssueReason, La
|
|
113
113
|
},
|
114
114
|
],
|
115
115
|
[
|
116
|
-
Protocol.Audits.FederatedAuthRequestIssueReason.
|
116
|
+
Protocol.Audits.FederatedAuthRequestIssueReason.ManifestInvalidResponse,
|
117
117
|
{
|
118
|
-
file: '
|
118
|
+
file: 'federatedAuthRequestManifestInvalidResponse.md',
|
119
119
|
links: [{
|
120
120
|
link: 'https://fedidcg.github.io/FedCM/',
|
121
121
|
linkTitle: i18nLazyString(UIStrings.fedCm),
|
@@ -123,9 +123,9 @@ const issueDescriptions: Map<Protocol.Audits.FederatedAuthRequestIssueReason, La
|
|
123
123
|
},
|
124
124
|
],
|
125
125
|
[
|
126
|
-
Protocol.Audits.FederatedAuthRequestIssueReason.
|
126
|
+
Protocol.Audits.FederatedAuthRequestIssueReason.ClientMetadataHttpNotFound,
|
127
127
|
{
|
128
|
-
file: '
|
128
|
+
file: 'federatedAuthRequestClientMetadataHttpNotFound.md',
|
129
129
|
links: [{
|
130
130
|
link: 'https://fedidcg.github.io/FedCM/',
|
131
131
|
linkTitle: i18nLazyString(UIStrings.fedCm),
|
@@ -133,9 +133,9 @@ const issueDescriptions: Map<Protocol.Audits.FederatedAuthRequestIssueReason, La
|
|
133
133
|
},
|
134
134
|
],
|
135
135
|
[
|
136
|
-
Protocol.Audits.FederatedAuthRequestIssueReason.
|
136
|
+
Protocol.Audits.FederatedAuthRequestIssueReason.ClientMetadataNoResponse,
|
137
137
|
{
|
138
|
-
file: '
|
138
|
+
file: 'federatedAuthRequestClientMetadataNoResponse.md',
|
139
139
|
links: [{
|
140
140
|
link: 'https://fedidcg.github.io/FedCM/',
|
141
141
|
linkTitle: i18nLazyString(UIStrings.fedCm),
|
@@ -143,9 +143,9 @@ const issueDescriptions: Map<Protocol.Audits.FederatedAuthRequestIssueReason, La
|
|
143
143
|
},
|
144
144
|
],
|
145
145
|
[
|
146
|
-
Protocol.Audits.FederatedAuthRequestIssueReason.
|
146
|
+
Protocol.Audits.FederatedAuthRequestIssueReason.ClientMetadataInvalidResponse,
|
147
147
|
{
|
148
|
-
file: '
|
148
|
+
file: 'federatedAuthRequestClientMetadataInvalidResponse.md',
|
149
149
|
links: [{
|
150
150
|
link: 'https://fedidcg.github.io/FedCM/',
|
151
151
|
linkTitle: i18nLazyString(UIStrings.fedCm),
|
File without changes
|
File without changes
|
File without changes
|
package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# The provider's FedCM manifest configuration cannot be found.
|
package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Provider's FedCM manifest configuration is invalid.
|
package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# The response body is empty when fetching the provider's FedCM manifest configuration.
|
@@ -59,9 +59,9 @@ export class FileSystemWorkspaceBinding {
|
|
59
59
|
return fileSystemPath;
|
60
60
|
}
|
61
61
|
|
62
|
-
static relativePath(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
62
|
+
static relativePath(uiSourceCode: Workspace.UISourceCode.UISourceCode): Platform.DevToolsPath.EncodedPathString[] {
|
63
63
|
const baseURL = (uiSourceCode.project() as FileSystem).fileSystemBaseURL;
|
64
|
-
return uiSourceCode.url().substring(baseURL.length).split('/');
|
64
|
+
return uiSourceCode.url().substring(baseURL.length).split('/') as Platform.DevToolsPath.EncodedPathString[];
|
65
65
|
}
|
66
66
|
|
67
67
|
static tooltipForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {
|
@@ -79,9 +79,9 @@ export class FileSystemWorkspaceBinding {
|
|
79
79
|
return fileSystem.supportsAutomapping();
|
80
80
|
}
|
81
81
|
|
82
|
-
static completeURL(project: Workspace.Workspace.Project, relativePath: string):
|
82
|
+
static completeURL(project: Workspace.Workspace.Project, relativePath: string): Platform.DevToolsPath.UrlString {
|
83
83
|
const fsProject = project as FileSystem;
|
84
|
-
return fsProject.fileSystemBaseURL
|
84
|
+
return Common.ParsedURL.ParsedURL.concatenate(fsProject.fileSystemBaseURL, relativePath);
|
85
85
|
}
|
86
86
|
|
87
87
|
static fileSystemPath(projectId: string): string {
|
@@ -155,7 +155,7 @@ export class FileSystemWorkspaceBinding {
|
|
155
155
|
|
156
156
|
export class FileSystem extends Workspace.Workspace.ProjectStore {
|
157
157
|
readonly fileSystemInternal: PlatformFileSystem;
|
158
|
-
readonly fileSystemBaseURL:
|
158
|
+
readonly fileSystemBaseURL: Platform.DevToolsPath.UrlString;
|
159
159
|
private readonly fileSystemParentURL: string;
|
160
160
|
private readonly fileSystemWorkspaceBinding: FileSystemWorkspaceBinding;
|
161
161
|
private readonly fileSystemPathInternal: string;
|
@@ -171,7 +171,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
171
171
|
super(workspace, id, Workspace.Workspace.projectTypes.FileSystem, displayName);
|
172
172
|
|
173
173
|
this.fileSystemInternal = isolatedFileSystem;
|
174
|
-
this.fileSystemBaseURL = this.fileSystemInternal.path()
|
174
|
+
this.fileSystemBaseURL = Common.ParsedURL.ParsedURL.concatenate(this.fileSystemInternal.path(), '/');
|
175
175
|
this.fileSystemParentURL = this.fileSystemBaseURL.substr(0, fileSystemPath.lastIndexOf('/') + 1);
|
176
176
|
this.fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
|
177
177
|
this.fileSystemPathInternal = fileSystemPath;
|
@@ -414,7 +414,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
414
414
|
void uiSourceCode.checkContentUpdated();
|
415
415
|
}
|
416
416
|
|
417
|
-
tooltipForURL(url:
|
417
|
+
tooltipForURL(url: Platform.DevToolsPath.UrlString): string {
|
418
418
|
return this.fileSystemInternal.tooltipForURL(url);
|
419
419
|
}
|
420
420
|
|
@@ -28,8 +28,6 @@
|
|
28
28
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
29
|
*/
|
30
30
|
|
31
|
-
// TODO(crbug.com/1253323): All casts to UrlString will be removed from this file when migration to branded types is complete.
|
32
|
-
|
33
31
|
import * as Common from '../../core/common/common.js';
|
34
32
|
import * as Host from '../../core/host/host.js';
|
35
33
|
import * as i18n from '../../core/i18n/i18n.js';
|
@@ -83,7 +81,6 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
83
81
|
|
84
82
|
constructor(
|
85
83
|
manager: IsolatedFileSystemManager, path: string, embedderPath: string, domFileSystem: FileSystem, type: string) {
|
86
|
-
// TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
|
87
84
|
super(path, type);
|
88
85
|
this.manager = manager;
|
89
86
|
this.embedderPathInternal = embedderPath;
|
@@ -169,17 +166,18 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
169
166
|
continue;
|
170
167
|
}
|
171
168
|
this.initialFilePathsInternal.add(Common.ParsedURL.ParsedURL.rawPathToEncodedPathString(
|
172
|
-
|
169
|
+
Common.ParsedURL.ParsedURL.substr(entry.fullPath as Platform.DevToolsPath.RawPathString, 1)));
|
173
170
|
} else {
|
174
171
|
if (entry.fullPath.endsWith('/.git')) {
|
175
172
|
const lastSlash = entry.fullPath.lastIndexOf('/');
|
176
|
-
const parentFolder =
|
177
|
-
|
178
|
-
|
173
|
+
const parentFolder = Common.ParsedURL.ParsedURL.substr(
|
174
|
+
entry.fullPath as Platform.DevToolsPath.RawPathString, 1, lastSlash);
|
175
|
+
this.initialGitFoldersInternal.add(Common.ParsedURL.ParsedURL.rawPathToEncodedPathString(parentFolder));
|
179
176
|
}
|
180
177
|
if (this.isFileExcluded(entry.fullPath + '/')) {
|
181
|
-
|
182
|
-
|
178
|
+
const url = Common.ParsedURL.ParsedURL.concatenate(this.path(), entry.fullPath);
|
179
|
+
this.excludedEmbedderFolders.push(
|
180
|
+
Common.ParsedURL.ParsedURL.urlToRawPathString(url, Host.Platform.isWin()));
|
183
181
|
continue;
|
184
182
|
}
|
185
183
|
++pendingRequests;
|
@@ -233,7 +231,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
233
231
|
return null;
|
234
232
|
}
|
235
233
|
return Common.ParsedURL.ParsedURL.rawPathToEncodedPathString(
|
236
|
-
|
234
|
+
Common.ParsedURL.ParsedURL.substr(fileEntry.fullPath as Platform.DevToolsPath.RawPathString, 1));
|
237
235
|
|
238
236
|
function createFileCandidate(
|
239
237
|
this: IsolatedFileSystem, name: string, newFileIndex?: number): Promise<FileEntry|null> {
|
@@ -559,10 +557,9 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
559
557
|
Common.ResourceType.resourceTypes.Document;
|
560
558
|
}
|
561
559
|
|
562
|
-
tooltipForURL(url:
|
560
|
+
tooltipForURL(url: Platform.DevToolsPath.UrlString): string {
|
563
561
|
const path = Platform.StringUtilities.trimMiddle(
|
564
|
-
Common.ParsedURL.ParsedURL.urlToRawPathString(url
|
565
|
-
150);
|
562
|
+
Common.ParsedURL.ParsedURL.urlToRawPathString(url, Host.Platform.isWin()), 150);
|
566
563
|
return i18nString(UIStrings.linkedToS, {PH1: path});
|
567
564
|
}
|
568
565
|
|
@@ -5,7 +5,6 @@
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as Host from '../../core/host/host.js';
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
|
-
import type * as Platform from '../../core/platform/platform.js';
|
9
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
10
9
|
|
11
10
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
@@ -93,9 +92,7 @@ export class ContextMenuProvider implements UI.ContextMenu.Provider {
|
|
93
92
|
const binding = uiSourceCode && PersistenceImpl.instance().binding(uiSourceCode);
|
94
93
|
const fileURL = binding ? binding.fileSystem.contentURL() : contentProvider.contentURL();
|
95
94
|
if (fileURL.startsWith('file://')) {
|
96
|
-
|
97
|
-
const path = Common.ParsedURL.ParsedURL.urlToRawPathString(
|
98
|
-
fileURL as Platform.DevToolsPath.UrlString, Host.Platform.isWin());
|
95
|
+
const path = Common.ParsedURL.ParsedURL.urlToRawPathString(fileURL, Host.Platform.isWin());
|
99
96
|
contextMenu.revealSection().appendItem(
|
100
97
|
i18nString(UIStrings.openInContainingFolder),
|
101
98
|
() => Host.InspectorFrontendHost.InspectorFrontendHostInstance.showItemInFolder(path));
|
@@ -35,8 +35,8 @@ export class PlatformFileSystem {
|
|
35
35
|
return [];
|
36
36
|
}
|
37
37
|
|
38
|
-
path():
|
39
|
-
return this.pathInternal;
|
38
|
+
path(): Platform.DevToolsPath.UrlString {
|
39
|
+
return this.pathInternal as Platform.DevToolsPath.UrlString;
|
40
40
|
}
|
41
41
|
|
42
42
|
embedderPath(): string {
|
@@ -111,7 +111,7 @@ export class PlatformFileSystem {
|
|
111
111
|
throw new Error('Not implemented');
|
112
112
|
}
|
113
113
|
|
114
|
-
tooltipForURL(_url:
|
114
|
+
tooltipForURL(_url: Platform.DevToolsPath.UrlString): string {
|
115
115
|
throw new Error('Not implemented');
|
116
116
|
}
|
117
117
|
|