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
@@ -59,6 +59,7 @@ grd_files_release_sources = [
|
|
59
59
|
"front_end/Images/flex-nowrap-icon.svg",
|
60
60
|
"front_end/Images/flex-wrap-icon.svg",
|
61
61
|
"front_end/Images/help_outline.svg",
|
62
|
+
"front_end/Images/ic_changes.svg",
|
62
63
|
"front_end/Images/ic_checkmark_16x16.svg",
|
63
64
|
"front_end/Images/ic_command_go_to_line.svg",
|
64
65
|
"front_end/Images/ic_command_go_to_symbol.svg",
|
@@ -309,9 +310,9 @@ grd_files_release_sources = [
|
|
309
310
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md",
|
310
311
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md",
|
311
312
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestCanceled.md",
|
312
|
-
"front_end/models/issues_manager/descriptions/
|
313
|
-
"front_end/models/issues_manager/descriptions/
|
314
|
-
"front_end/models/issues_manager/descriptions/
|
313
|
+
"front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataHttpNotFound.md",
|
314
|
+
"front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataInvalidResponse.md",
|
315
|
+
"front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataNoResponse.md",
|
315
316
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md",
|
316
317
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md",
|
317
318
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md",
|
@@ -319,10 +320,10 @@ grd_files_release_sources = [
|
|
319
320
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md",
|
320
321
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md",
|
321
322
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md",
|
323
|
+
"front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md",
|
324
|
+
"front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md",
|
325
|
+
"front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md",
|
322
326
|
"front_end/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md",
|
323
|
-
"front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownHttpNotFound.md",
|
324
|
-
"front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownInvalidResponse.md",
|
325
|
-
"front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownNoResponse.md",
|
326
327
|
"front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md",
|
327
328
|
"front_end/models/issues_manager/descriptions/heavyAd.md",
|
328
329
|
"front_end/models/issues_manager/descriptions/mixedContent.md",
|
@@ -334,6 +335,7 @@ grd_files_release_sources = [
|
|
334
335
|
"front_end/models/persistence/persistence-legacy.js",
|
335
336
|
"front_end/models/persistence/persistence-meta.js",
|
336
337
|
"front_end/models/persistence/persistence.js",
|
338
|
+
"front_end/models/source_map_scopes/source_map_scopes.js",
|
337
339
|
"front_end/models/text_utils/text_utils-legacy.js",
|
338
340
|
"front_end/models/text_utils/text_utils.js",
|
339
341
|
"front_end/models/timeline_model/timeline_model-legacy.js",
|
@@ -569,6 +571,7 @@ grd_files_debug_sources = [
|
|
569
571
|
"front_end/core/i18n/time-utilities.js",
|
570
572
|
"front_end/core/platform/DevToolsPath.js",
|
571
573
|
"front_end/core/platform/UIString.js",
|
574
|
+
"front_end/core/platform/UserVisibleError.js",
|
572
575
|
"front_end/core/platform/array-utilities.js",
|
573
576
|
"front_end/core/platform/date-utilities.js",
|
574
577
|
"front_end/core/platform/dcheck.js",
|
@@ -759,6 +762,7 @@ grd_files_debug_sources = [
|
|
759
762
|
"front_end/models/persistence/WorkspaceSettingsTab.js",
|
760
763
|
"front_end/models/persistence/editFileSystemView.css.js",
|
761
764
|
"front_end/models/persistence/workspaceSettingsTab.css.js",
|
765
|
+
"front_end/models/source_map_scopes/NamesResolver.js",
|
762
766
|
"front_end/models/text_utils/ContentProvider.js",
|
763
767
|
"front_end/models/text_utils/StaticContentProvider.js",
|
764
768
|
"front_end/models/text_utils/Text.js",
|
@@ -1044,7 +1048,9 @@ grd_files_debug_sources = [
|
|
1044
1048
|
"front_end/panels/lighthouse/LighthouseReportSelector.js",
|
1045
1049
|
"front_end/panels/lighthouse/LighthouseReporterTypes.js",
|
1046
1050
|
"front_end/panels/lighthouse/LighthouseStartView.js",
|
1051
|
+
"front_end/panels/lighthouse/LighthouseStartViewFR.js",
|
1047
1052
|
"front_end/panels/lighthouse/LighthouseStatusView.js",
|
1053
|
+
"front_end/panels/lighthouse/LighthouseTimespanView.js",
|
1048
1054
|
"front_end/panels/lighthouse/RadioSetting.js",
|
1049
1055
|
"front_end/panels/lighthouse/lighthouseDialog.css.js",
|
1050
1056
|
"front_end/panels/lighthouse/lighthousePanel.css.js",
|
@@ -1212,7 +1218,6 @@ grd_files_debug_sources = [
|
|
1212
1218
|
"front_end/panels/sources/ScriptOriginPlugin.js",
|
1213
1219
|
"front_end/panels/sources/SearchSourcesView.js",
|
1214
1220
|
"front_end/panels/sources/SnippetsPlugin.js",
|
1215
|
-
"front_end/panels/sources/SourceMapNamesResolver.js",
|
1216
1221
|
"front_end/panels/sources/SourcesNavigator.js",
|
1217
1222
|
"front_end/panels/sources/SourcesPanel.js",
|
1218
1223
|
"front_end/panels/sources/SourcesSearchScope.js",
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.75 16.75V6.74572L12.4599 3.25H5.25V16.75H15.75ZM13 2L17 6.25V17C17 17.5523 16.5523 18 16 18H5C4.44772 18 4 17.5523 4 17V3C4 2.44772 4.44772 2 5 2H13Z" fill="black"/>
|
3
|
+
<path d="M11 6H10V8H8V9H10V11H11V9H13V8H11V6Z" fill="black"/>
|
4
|
+
<path d="M13 13L13 14L8 14L8 13L13 13Z" fill="black"/>
|
5
|
+
</svg>
|
@@ -167,7 +167,7 @@ export class ParsedURL {
|
|
167
167
|
*/
|
168
168
|
static encodedFromParentPathAndName(parentPath: Platform.DevToolsPath.EncodedPathString, name: string):
|
169
169
|
Platform.DevToolsPath.EncodedPathString {
|
170
|
-
return parentPath
|
170
|
+
return ParsedURL.concatenate(parentPath, '/', encodeURIComponent(name));
|
171
171
|
}
|
172
172
|
|
173
173
|
/**
|
@@ -175,7 +175,7 @@ export class ParsedURL {
|
|
175
175
|
*/
|
176
176
|
static urlFromParentUrlAndName(parentUrl: Platform.DevToolsPath.UrlString, name: string):
|
177
177
|
Platform.DevToolsPath.UrlString {
|
178
|
-
return parentUrl
|
178
|
+
return ParsedURL.concatenate(parentUrl, '/', encodeURIComponent(name));
|
179
179
|
}
|
180
180
|
|
181
181
|
static encodedPathToRawPathString(encPath: Platform.DevToolsPath.EncodedPathString):
|
@@ -218,7 +218,13 @@ export class ParsedURL {
|
|
218
218
|
static substr<DevToolsPathType extends Platform.DevToolsPath.UrlString|Platform.DevToolsPath.RawPathString|
|
219
219
|
Platform.DevToolsPath.EncodedPathString>(
|
220
220
|
devToolsPath: DevToolsPathType, from: number, length?: number): DevToolsPathType {
|
221
|
-
return devToolsPath.substr(from, length) as
|
221
|
+
return devToolsPath.substr(from, length) as DevToolsPathType;
|
222
|
+
}
|
223
|
+
|
224
|
+
static concatenate<DevToolsPathType extends Platform.DevToolsPath.UrlString|Platform.DevToolsPath
|
225
|
+
.RawPathString|Platform.DevToolsPath.EncodedPathString>(
|
226
|
+
devToolsPath: DevToolsPathType, ...appendage: string[]): DevToolsPathType {
|
227
|
+
return devToolsPath.concat(...appendage) as DevToolsPathType;
|
222
228
|
}
|
223
229
|
|
224
230
|
static urlWithoutHash(url: string): string {
|
@@ -256,9 +262,9 @@ export class ParsedURL {
|
|
256
262
|
return ParsedURL.urlRegexInstance;
|
257
263
|
}
|
258
264
|
|
259
|
-
static extractPath(url: string):
|
265
|
+
static extractPath(url: string): Platform.DevToolsPath.EncodedPathString {
|
260
266
|
const parsedURL = this.fromString(url);
|
261
|
-
return parsedURL ? parsedURL.path : '';
|
267
|
+
return (parsedURL ? parsedURL.path : '') as Platform.DevToolsPath.EncodedPathString;
|
262
268
|
}
|
263
269
|
|
264
270
|
static extractOrigin(url: string): string {
|
@@ -586,7 +586,10 @@ export enum DevtoolsExperiments {
|
|
586
586
|
'bfcacheDisplayTree' = 54,
|
587
587
|
'stylesPaneCSSChanges' = 55,
|
588
588
|
'headerOverrides' = 56,
|
589
|
-
'
|
589
|
+
'lighthousePanelFR' = 57,
|
590
|
+
'evaluateExpressionsWithSourceMaps' = 58,
|
591
|
+
// Increment this when new experiments are added.
|
592
|
+
'MaxValue' = 59,
|
590
593
|
}
|
591
594
|
/* eslint-enable @typescript-eslint/naming-convention */
|
592
595
|
|
@@ -4835,6 +4835,12 @@
|
|
4835
4835
|
"panels/elements/StylesSidebarPane.ts | constructedStylesheet": {
|
4836
4836
|
"message": "constructed stylesheet"
|
4837
4837
|
},
|
4838
|
+
"panels/elements/StylesSidebarPane.ts | copiedToClipboard": {
|
4839
|
+
"message": "Copied to clipboard"
|
4840
|
+
},
|
4841
|
+
"panels/elements/StylesSidebarPane.ts | copyAllCSSChanges": {
|
4842
|
+
"message": "Copy all the CSS changes"
|
4843
|
+
},
|
4838
4844
|
"panels/elements/StylesSidebarPane.ts | copyAllDeclarations": {
|
4839
4845
|
"message": "Copy all declarations"
|
4840
4846
|
},
|
@@ -5765,6 +5771,9 @@
|
|
5765
5771
|
"panels/lighthouse/LighthouseController.ts | legacyNavigation": {
|
5766
5772
|
"message": "Legacy navigation"
|
5767
5773
|
},
|
5774
|
+
"panels/lighthouse/LighthouseController.ts | lighthouseMode": {
|
5775
|
+
"message": "Lighthouse mode"
|
5776
|
+
},
|
5768
5777
|
"panels/lighthouse/LighthouseController.ts | localStorage": {
|
5769
5778
|
"message": "Local Storage"
|
5770
5779
|
},
|
@@ -5774,6 +5783,9 @@
|
|
5774
5783
|
"panels/lighthouse/LighthouseController.ts | multipleTabsAreBeingControlledBy": {
|
5775
5784
|
"message": "Multiple tabs are being controlled by the same service worker. Close your other tabs on the same origin to audit this page."
|
5776
5785
|
},
|
5786
|
+
"panels/lighthouse/LighthouseController.ts | navigation": {
|
5787
|
+
"message": "Navigation"
|
5788
|
+
},
|
5777
5789
|
"panels/lighthouse/LighthouseController.ts | performance": {
|
5778
5790
|
"message": "Performance"
|
5779
5791
|
},
|
@@ -5786,6 +5798,9 @@
|
|
5786
5798
|
"panels/lighthouse/LighthouseController.ts | resetStorageLocalstorage": {
|
5787
5799
|
"message": "Reset storage (cache, service workers, etc) before auditing. (Good for performance & PWA testing)"
|
5788
5800
|
},
|
5801
|
+
"panels/lighthouse/LighthouseController.ts | runLighthouseInMode": {
|
5802
|
+
"message": "Run Lighthouse in navigation, timespan, or snapshot mode"
|
5803
|
+
},
|
5789
5804
|
"panels/lighthouse/LighthouseController.ts | seo": {
|
5790
5805
|
"message": "SEO"
|
5791
5806
|
},
|
@@ -5795,12 +5810,18 @@
|
|
5795
5810
|
"panels/lighthouse/LighthouseController.ts | simulatedThrottling": {
|
5796
5811
|
"message": "Simulated throttling"
|
5797
5812
|
},
|
5813
|
+
"panels/lighthouse/LighthouseController.ts | snapshot": {
|
5814
|
+
"message": "Snapshot"
|
5815
|
+
},
|
5798
5816
|
"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingLoadingPlural": {
|
5799
5817
|
"message": "There may be stored data affecting loading performance in these locations: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."
|
5800
5818
|
},
|
5801
5819
|
"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular": {
|
5802
5820
|
"message": "There may be stored data affecting loading performance in this location: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."
|
5803
5821
|
},
|
5822
|
+
"panels/lighthouse/LighthouseController.ts | timespan": {
|
5823
|
+
"message": "Timespan"
|
5824
|
+
},
|
5804
5825
|
"panels/lighthouse/LighthouseController.ts | useLegacyNavigation": {
|
5805
5826
|
"message": "Audit the page using classic Lighthouse when in navigation mode."
|
5806
5827
|
},
|
@@ -5861,6 +5882,18 @@
|
|
5861
5882
|
"panels/lighthouse/LighthouseStartView.ts | learnMore": {
|
5862
5883
|
"message": "Learn more"
|
5863
5884
|
},
|
5885
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | analyzeNavigation": {
|
5886
|
+
"message": "Analyze navigation"
|
5887
|
+
},
|
5888
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | analyzeSnapshot": {
|
5889
|
+
"message": "Analyze snapshot"
|
5890
|
+
},
|
5891
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | mode": {
|
5892
|
+
"message": "Mode"
|
5893
|
+
},
|
5894
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | startTimespan": {
|
5895
|
+
"message": "Start timespan"
|
5896
|
+
},
|
5864
5897
|
"panels/lighthouse/LighthouseStatusView.ts | ahSorryWeRanIntoAnError": {
|
5865
5898
|
"message": "Ah, sorry! We ran into an error."
|
5866
5899
|
},
|
@@ -5948,6 +5981,18 @@
|
|
5948
5981
|
"panels/lighthouse/LighthouseStatusView.ts | walmartSawAIncreaseInRevenueFor": {
|
5949
5982
|
"message": "Walmart saw a 1% increase in revenue for every 100ms improvement in page load [Source: WPO Stats]"
|
5950
5983
|
},
|
5984
|
+
"panels/lighthouse/LighthouseTimespanView.ts | cancel": {
|
5985
|
+
"message": "Cancel"
|
5986
|
+
},
|
5987
|
+
"panels/lighthouse/LighthouseTimespanView.ts | endTimespan": {
|
5988
|
+
"message": "End timespan"
|
5989
|
+
},
|
5990
|
+
"panels/lighthouse/LighthouseTimespanView.ts | timespanStarted": {
|
5991
|
+
"message": "Timespan started, interact with the page"
|
5992
|
+
},
|
5993
|
+
"panels/lighthouse/LighthouseTimespanView.ts | timespanStarting": {
|
5994
|
+
"message": "Timespan starting…"
|
5995
|
+
},
|
5951
5996
|
"panels/media/EventDisplayTable.ts | eventDisplay": {
|
5952
5997
|
"message": "Event display"
|
5953
5998
|
},
|
@@ -4835,6 +4835,12 @@
|
|
4835
4835
|
"panels/elements/StylesSidebarPane.ts | constructedStylesheet": {
|
4836
4836
|
"message": "ĉón̂śt̂ŕûćt̂éd̂ śt̂ýl̂éŝh́êét̂"
|
4837
4837
|
},
|
4838
|
+
"panels/elements/StylesSidebarPane.ts | copiedToClipboard": {
|
4839
|
+
"message": "Ĉóp̂íêd́ t̂ó ĉĺîṕb̂óâŕd̂"
|
4840
|
+
},
|
4841
|
+
"panels/elements/StylesSidebarPane.ts | copyAllCSSChanges": {
|
4842
|
+
"message": "Ĉóp̂ý âĺl̂ t́ĥé ĈŚŜ ćĥán̂ǵêś"
|
4843
|
+
},
|
4838
4844
|
"panels/elements/StylesSidebarPane.ts | copyAllDeclarations": {
|
4839
4845
|
"message": "Ĉóp̂ý âĺl̂ d́êćl̂ár̂át̂íôńŝ"
|
4840
4846
|
},
|
@@ -5765,6 +5771,9 @@
|
|
5765
5771
|
"panels/lighthouse/LighthouseController.ts | legacyNavigation": {
|
5766
5772
|
"message": "L̂éĝáĉý n̂áv̂íĝát̂íôń"
|
5767
5773
|
},
|
5774
|
+
"panels/lighthouse/LighthouseController.ts | lighthouseMode": {
|
5775
|
+
"message": "L̂íĝh́t̂h́ôúŝé m̂ód̂é"
|
5776
|
+
},
|
5768
5777
|
"panels/lighthouse/LighthouseController.ts | localStorage": {
|
5769
5778
|
"message": "L̂óĉál̂ Śt̂ór̂áĝé"
|
5770
5779
|
},
|
@@ -5774,6 +5783,9 @@
|
|
5774
5783
|
"panels/lighthouse/LighthouseController.ts | multipleTabsAreBeingControlledBy": {
|
5775
5784
|
"message": "M̂úl̂t́îṕl̂é t̂áb̂ś âŕê b́êín̂ǵ ĉón̂t́r̂ól̂ĺêd́ b̂ý t̂h́ê śâḿê service worker. Ćl̂óŝé ŷóûŕ ôt́ĥér̂ t́âb́ŝ ón̂ t́ĥé ŝám̂é ôŕîǵîń t̂ó âúd̂ít̂ t́ĥíŝ ṕâǵê."
|
5776
5785
|
},
|
5786
|
+
"panels/lighthouse/LighthouseController.ts | navigation": {
|
5787
|
+
"message": "N̂áv̂íĝát̂íôń"
|
5788
|
+
},
|
5777
5789
|
"panels/lighthouse/LighthouseController.ts | performance": {
|
5778
5790
|
"message": "P̂ér̂f́ôŕm̂án̂ćê"
|
5779
5791
|
},
|
@@ -5786,6 +5798,9 @@
|
|
5786
5798
|
"panels/lighthouse/LighthouseController.ts | resetStorageLocalstorage": {
|
5787
5799
|
"message": "R̂éŝét̂ śt̂ór̂áĝé (cache, service workers, êt́ĉ) b́êf́ôŕê áûd́ît́îńĝ. (Ǵôód̂ f́ôŕ p̂ér̂f́ôŕm̂án̂ćê & PWA t́êśt̂ín̂ǵ)"
|
5788
5800
|
},
|
5801
|
+
"panels/lighthouse/LighthouseController.ts | runLighthouseInMode": {
|
5802
|
+
"message": "R̂ún̂ Ĺîǵĥt́ĥóûśê ín̂ ńâv́îǵât́îón̂, t́îḿêśp̂án̂, ór̂ śn̂áp̂śĥót̂ ḿôd́ê"
|
5803
|
+
},
|
5789
5804
|
"panels/lighthouse/LighthouseController.ts | seo": {
|
5790
5805
|
"message": "ŜÉÔ"
|
5791
5806
|
},
|
@@ -5795,12 +5810,18 @@
|
|
5795
5810
|
"panels/lighthouse/LighthouseController.ts | simulatedThrottling": {
|
5796
5811
|
"message": "Ŝím̂úl̂át̂éd̂ t́ĥŕôt́t̂ĺîńĝ"
|
5797
5812
|
},
|
5813
|
+
"panels/lighthouse/LighthouseController.ts | snapshot": {
|
5814
|
+
"message": "Ŝńâṕŝh́ôt́"
|
5815
|
+
},
|
5798
5816
|
"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingLoadingPlural": {
|
5799
5817
|
"message": "T̂h́êŕê ḿâý b̂é ŝt́ôŕêd́ d̂át̂á âf́f̂éĉt́îńĝ ĺôád̂ín̂ǵ p̂ér̂f́ôŕm̂án̂ćê ín̂ t́ĥéŝé l̂óĉát̂íôńŝ: {PH1}. Áûd́ît́ t̂h́îś p̂áĝé îń âń îńĉóĝńît́ô ẃîńd̂óŵ t́ô ṕr̂év̂én̂t́ t̂h́ôśê ŕêśôúr̂ćêś f̂ŕôḿ âf́f̂éĉt́îńĝ ýôúr̂ śĉór̂éŝ."
|
5800
5818
|
},
|
5801
5819
|
"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular": {
|
5802
5820
|
"message": "T̂h́êŕê ḿâý b̂é ŝt́ôŕêd́ d̂át̂á âf́f̂éĉt́îńĝ ĺôád̂ín̂ǵ p̂ér̂f́ôŕm̂án̂ćê ín̂ t́ĥíŝ ĺôćât́îón̂: {PH1}. Áûd́ît́ t̂h́îś p̂áĝé îń âń îńĉóĝńît́ô ẃîńd̂óŵ t́ô ṕr̂év̂én̂t́ t̂h́ôśê ŕêśôúr̂ćêś f̂ŕôḿ âf́f̂éĉt́îńĝ ýôúr̂ śĉór̂éŝ."
|
5803
5821
|
},
|
5822
|
+
"panels/lighthouse/LighthouseController.ts | timespan": {
|
5823
|
+
"message": "T̂ím̂éŝṕâń"
|
5824
|
+
},
|
5804
5825
|
"panels/lighthouse/LighthouseController.ts | useLegacyNavigation": {
|
5805
5826
|
"message": "Âúd̂ít̂ t́ĥé p̂áĝé ûśîńĝ ćl̂áŝśîć L̂íĝh́t̂h́ôúŝé ŵh́êń îń n̂áv̂íĝát̂íôń m̂ód̂é."
|
5806
5827
|
},
|
@@ -5861,6 +5882,18 @@
|
|
5861
5882
|
"panels/lighthouse/LighthouseStartView.ts | learnMore": {
|
5862
5883
|
"message": "L̂éâŕn̂ ḿôŕê"
|
5863
5884
|
},
|
5885
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | analyzeNavigation": {
|
5886
|
+
"message": "Âńâĺŷźê ńâv́îǵât́îón̂"
|
5887
|
+
},
|
5888
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | analyzeSnapshot": {
|
5889
|
+
"message": "Âńâĺŷźê śn̂áp̂śĥót̂"
|
5890
|
+
},
|
5891
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | mode": {
|
5892
|
+
"message": "M̂ód̂é"
|
5893
|
+
},
|
5894
|
+
"panels/lighthouse/LighthouseStartViewFR.ts | startTimespan": {
|
5895
|
+
"message": "Ŝt́âŕt̂ t́îḿêśp̂án̂"
|
5896
|
+
},
|
5864
5897
|
"panels/lighthouse/LighthouseStatusView.ts | ahSorryWeRanIntoAnError": {
|
5865
5898
|
"message": "Âh́, ŝór̂ŕŷ! Ẃê ŕâń îńt̂ó âń êŕr̂ór̂."
|
5866
5899
|
},
|
@@ -5948,6 +5981,18 @@
|
|
5948
5981
|
"panels/lighthouse/LighthouseStatusView.ts | walmartSawAIncreaseInRevenueFor": {
|
5949
5982
|
"message": "Ŵál̂ḿâŕt̂ śâẃ â 1% ín̂ćr̂éâśê ín̂ ŕêv́êńûé f̂ór̂ év̂ér̂ý 100m̂ś îḿp̂ŕôv́êḿêńt̂ ín̂ ṕâǵê ĺôád̂ [Śôúr̂ćê: WPO Stats]"
|
5950
5983
|
},
|
5984
|
+
"panels/lighthouse/LighthouseTimespanView.ts | cancel": {
|
5985
|
+
"message": "Ĉán̂ćêĺ"
|
5986
|
+
},
|
5987
|
+
"panels/lighthouse/LighthouseTimespanView.ts | endTimespan": {
|
5988
|
+
"message": "Êńd̂ t́îḿêśp̂án̂"
|
5989
|
+
},
|
5990
|
+
"panels/lighthouse/LighthouseTimespanView.ts | timespanStarted": {
|
5991
|
+
"message": "T̂ím̂éŝṕâń ŝt́âŕt̂éd̂, ín̂t́êŕâćt̂ ẃît́ĥ t́ĥé p̂áĝé"
|
5992
|
+
},
|
5993
|
+
"panels/lighthouse/LighthouseTimespanView.ts | timespanStarting": {
|
5994
|
+
"message": "T̂ím̂éŝṕâń ŝt́âŕt̂ín̂ǵ…"
|
5995
|
+
},
|
5951
5996
|
"panels/media/EventDisplayTable.ts | eventDisplay": {
|
5952
5997
|
"message": "Êv́êńt̂ d́îśp̂ĺâý"
|
5953
5998
|
},
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// Copyright 2021 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import type {LocalizedString} from './UIString.js';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Represents an error that might become visible to the user. Where errors
|
9
|
+
* might be surfaced to the user (such as by displaying the message to the
|
10
|
+
* console), this class should be used to enforce that the message is
|
11
|
+
* localized on the way in.
|
12
|
+
*/
|
13
|
+
export class UserVisibleError extends Error {
|
14
|
+
readonly message: LocalizedString;
|
15
|
+
|
16
|
+
constructor(message: LocalizedString) {
|
17
|
+
super(message);
|
18
|
+
this.message = message;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
export function isUserVisibleError(error: unknown): error is UserVisibleError {
|
23
|
+
if (typeof error === 'object' && error !== null) {
|
24
|
+
return error instanceof UserVisibleError;
|
25
|
+
}
|
26
|
+
|
27
|
+
return false;
|
28
|
+
}
|
@@ -38,6 +38,7 @@ import * as SetUtilities from './set-utilities.js';
|
|
38
38
|
import * as StringUtilities from './string-utilities.js';
|
39
39
|
import * as TypeScriptUtilities from './typescript-utilities.js';
|
40
40
|
import * as UIString from './UIString.js';
|
41
|
+
import * as UserVisibleError from './UserVisibleError.js';
|
41
42
|
|
42
43
|
export {DCHECK} from './dcheck.js';
|
43
44
|
/* `assertNotNull` also need to be exposed, as TypeScript does not
|
@@ -57,4 +58,5 @@ export {
|
|
57
58
|
StringUtilities,
|
58
59
|
TypeScriptUtilities,
|
59
60
|
UIString,
|
61
|
+
UserVisibleError,
|
60
62
|
};
|
@@ -429,6 +429,27 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
429
429
|
}
|
430
430
|
}
|
431
431
|
|
432
|
+
async setSupportsText(
|
433
|
+
styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
434
|
+
newSupportsText: string): Promise<boolean> {
|
435
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
|
436
|
+
|
437
|
+
try {
|
438
|
+
await this.ensureOriginalStyleSheetText(styleSheetId);
|
439
|
+
const {supports} = await this.agent.invoke_setSupportsText({styleSheetId, range, text: newSupportsText});
|
440
|
+
|
441
|
+
if (!supports) {
|
442
|
+
return false;
|
443
|
+
}
|
444
|
+
this.#domModel.markUndoableState();
|
445
|
+
const edit = new Edit(styleSheetId, range, newSupportsText, supports);
|
446
|
+
this.fireStyleSheetChanged(styleSheetId, edit);
|
447
|
+
return true;
|
448
|
+
} catch (e) {
|
449
|
+
return false;
|
450
|
+
}
|
451
|
+
}
|
452
|
+
|
432
453
|
async addRule(styleSheetId: Protocol.CSS.StyleSheetId, ruleText: string, ruleLocation: TextUtils.TextRange.TextRange):
|
433
454
|
Promise<CSSStyleRule|null> {
|
434
455
|
try {
|
@@ -5,6 +5,7 @@
|
|
5
5
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
6
6
|
import * as Common from '../common/common.js';
|
7
7
|
import * as i18n from '../i18n/i18n.js';
|
8
|
+
import type * as Platform from '../platform/platform.js';
|
8
9
|
import type * as Protocol from '../../generated/protocol.js';
|
9
10
|
|
10
11
|
import type {CSSModel} from './CSSModel.js';
|
@@ -30,7 +31,7 @@ export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentPro
|
|
30
31
|
#cssModelInternal: CSSModel;
|
31
32
|
id: Protocol.CSS.StyleSheetId;
|
32
33
|
frameId: Protocol.Page.FrameId;
|
33
|
-
sourceURL:
|
34
|
+
sourceURL: Platform.DevToolsPath.UrlString;
|
34
35
|
hasSourceURL: boolean;
|
35
36
|
origin: Protocol.CSS.StyleSheetOrigin;
|
36
37
|
title: string;
|
@@ -51,7 +52,7 @@ export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentPro
|
|
51
52
|
this.#cssModelInternal = cssModel;
|
52
53
|
this.id = payload.styleSheetId;
|
53
54
|
this.frameId = payload.frameId;
|
54
|
-
this.sourceURL = payload.sourceURL;
|
55
|
+
this.sourceURL = payload.sourceURL as Platform.DevToolsPath.UrlString;
|
55
56
|
this.hasSourceURL = Boolean(payload.hasSourceURL);
|
56
57
|
this.origin = payload.origin;
|
57
58
|
this.title = payload.title;
|
@@ -102,19 +103,19 @@ export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentPro
|
|
102
103
|
return this.isConstructed && this.sourceURL.length === 0;
|
103
104
|
}
|
104
105
|
|
105
|
-
resourceURL():
|
106
|
-
return this.isViaInspector() ? this.viaInspectorResourceURL() : this.sourceURL;
|
106
|
+
resourceURL(): Platform.DevToolsPath.UrlString {
|
107
|
+
return (this.isViaInspector() ? this.viaInspectorResourceURL() : this.sourceURL);
|
107
108
|
}
|
108
109
|
|
109
|
-
private viaInspectorResourceURL():
|
110
|
+
private viaInspectorResourceURL(): Platform.DevToolsPath.UrlString {
|
110
111
|
const model = this.#cssModelInternal.target().model(ResourceTreeModel);
|
111
112
|
console.assert(Boolean(model));
|
112
113
|
if (!model) {
|
113
|
-
return '';
|
114
|
+
return '' as Platform.DevToolsPath.UrlString;
|
114
115
|
}
|
115
116
|
const frame = model.frameForId(this.frameId);
|
116
117
|
if (!frame) {
|
117
|
-
return '';
|
118
|
+
return '' as Platform.DevToolsPath.UrlString;
|
118
119
|
}
|
119
120
|
console.assert(Boolean(frame));
|
120
121
|
const parsedURL = new Common.ParsedURL.ParsedURL(frame.url);
|
@@ -123,7 +124,7 @@ export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentPro
|
|
123
124
|
fakeURL += '/';
|
124
125
|
}
|
125
126
|
fakeURL += 'inspector-stylesheet';
|
126
|
-
return fakeURL;
|
127
|
+
return fakeURL as Platform.DevToolsPath.UrlString;
|
127
128
|
}
|
128
129
|
|
129
130
|
lineNumberInSource(lineNumberInStyleSheet: number): number {
|
@@ -145,8 +146,7 @@ export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentPro
|
|
145
146
|
return afterStart && beforeEnd;
|
146
147
|
}
|
147
148
|
|
148
|
-
|
149
|
-
contentURL(): string {
|
149
|
+
contentURL(): Platform.DevToolsPath.UrlString {
|
150
150
|
return this.resourceURL();
|
151
151
|
}
|
152
152
|
|
@@ -140,7 +140,6 @@ export class ChildTargetManager extends SDKModel<EventTypes> implements Protocol
|
|
140
140
|
} else if (targetInfo.type === 'auction_worklet') {
|
141
141
|
type = Type.AuctionWorklet;
|
142
142
|
}
|
143
|
-
|
144
143
|
const target = this.#targetManager.createTarget(
|
145
144
|
targetInfo.targetId, targetName, type, this.#parentTarget, sessionId, undefined, undefined, targetInfo);
|
146
145
|
target.setInspectedURL(this.#parentTarget.inspectedURL());
|
@@ -31,6 +31,7 @@
|
|
31
31
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
32
32
|
import type * as Common from '../common/common.js';
|
33
33
|
import * as i18n from '../i18n/i18n.js';
|
34
|
+
import type * as Platform from '../platform/platform.js';
|
34
35
|
|
35
36
|
import type {PageResourceLoadInitiator} from './PageResourceLoader.js';
|
36
37
|
import {PageResourceLoader} from './PageResourceLoader.js';
|
@@ -48,18 +49,19 @@ const str_ = i18n.i18n.registerUIStrings('core/sdk/CompilerSourceMappingContentP
|
|
48
49
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
49
50
|
|
50
51
|
export class CompilerSourceMappingContentProvider implements TextUtils.ContentProvider.ContentProvider {
|
51
|
-
readonly #sourceURL:
|
52
|
+
readonly #sourceURL: Platform.DevToolsPath.UrlString;
|
52
53
|
readonly #contentTypeInternal: Common.ResourceType.ResourceType;
|
53
54
|
readonly #initiator: PageResourceLoadInitiator;
|
54
55
|
|
55
|
-
constructor(
|
56
|
+
constructor(
|
57
|
+
sourceURL: Platform.DevToolsPath.UrlString, contentType: Common.ResourceType.ResourceType,
|
58
|
+
initiator: PageResourceLoadInitiator) {
|
56
59
|
this.#sourceURL = sourceURL;
|
57
60
|
this.#contentTypeInternal = contentType;
|
58
61
|
this.#initiator = initiator;
|
59
62
|
}
|
60
63
|
|
61
|
-
|
62
|
-
contentURL(): string {
|
64
|
+
contentURL(): Platform.DevToolsPath.UrlString {
|
63
65
|
return this.#sourceURL;
|
64
66
|
}
|
65
67
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../common/common.js';
|
6
6
|
import * as i18n from '../i18n/i18n.js';
|
7
|
+
import type * as Platform from '../platform/platform.js';
|
7
8
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
9
10
|
|
@@ -515,7 +516,7 @@ export class EventListener {
|
|
515
516
|
readonly #handlerInternal: RemoteObject|null;
|
516
517
|
readonly #originalHandlerInternal: RemoteObject|null;
|
517
518
|
readonly #locationInternal: Location;
|
518
|
-
readonly #sourceURLInternal:
|
519
|
+
readonly #sourceURLInternal: Platform.DevToolsPath.UrlString;
|
519
520
|
readonly #customRemoveFunction: RemoteObject|null;
|
520
521
|
#originInternal: string;
|
521
522
|
|
@@ -533,7 +534,7 @@ export class EventListener {
|
|
533
534
|
this.#originalHandlerInternal = originalHandler || handler;
|
534
535
|
this.#locationInternal = location;
|
535
536
|
const script = location.script();
|
536
|
-
this.#sourceURLInternal = script ? script.contentURL() : '';
|
537
|
+
this.#sourceURLInternal = script ? script.contentURL() : '' as Platform.DevToolsPath.UrlString;
|
537
538
|
this.#customRemoveFunction = customRemoveFunction;
|
538
539
|
this.#originInternal = origin || EventListener.Origin.Raw;
|
539
540
|
}
|
@@ -566,7 +567,7 @@ export class EventListener {
|
|
566
567
|
return this.#locationInternal;
|
567
568
|
}
|
568
569
|
|
569
|
-
sourceURL():
|
570
|
+
sourceURL(): Platform.DevToolsPath.UrlString {
|
570
571
|
return this.#sourceURLInternal;
|
571
572
|
}
|
572
573
|
|
@@ -418,14 +418,13 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
418
418
|
return this.agent.invoke_pauseOnAsyncCall({parentStackTraceId: parentStackTraceId});
|
419
419
|
}
|
420
420
|
|
421
|
-
async setBreakpointByURL(
|
422
|
-
|
421
|
+
async setBreakpointByURL(
|
422
|
+
url: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber?: number,
|
423
|
+
condition?: string): Promise<SetBreakpointResult> {
|
423
424
|
// Convert file url to node-js path.
|
424
425
|
let urlRegex;
|
425
426
|
if (this.target().type() === Type.Node && url.startsWith('file://')) {
|
426
|
-
|
427
|
-
const platformPath =
|
428
|
-
Common.ParsedURL.ParsedURL.urlToRawPathString(url as Platform.DevToolsPath.UrlString, Host.Platform.isWin());
|
427
|
+
const platformPath = Common.ParsedURL.ParsedURL.urlToRawPathString(url, Host.Platform.isWin());
|
429
428
|
urlRegex =
|
430
429
|
`${Platform.StringUtilities.escapeForRegExp(platformPath)}|${Platform.StringUtilities.escapeForRegExp(url)}`;
|
431
430
|
if (Host.Platform.isWin() && platformPath.match(/^.:\\/)) {
|
@@ -696,14 +695,14 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
696
695
|
}
|
697
696
|
|
698
697
|
parsedScriptSource(
|
699
|
-
scriptId: Protocol.Runtime.ScriptId, sourceURL:
|
700
|
-
endColumn: number,
|
698
|
+
scriptId: Protocol.Runtime.ScriptId, sourceURL: Platform.DevToolsPath.UrlString, startLine: number,
|
699
|
+
startColumn: number, endLine: number, endColumn: number,
|
701
700
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
702
701
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
703
702
|
executionContextId: number, hash: string, executionContextAuxData: any, isLiveEdit: boolean,
|
704
|
-
sourceMapURL:
|
705
|
-
isModule: boolean|null, originStackTrace: Protocol.Runtime.StackTrace|null,
|
706
|
-
scriptLanguage: string|null, debugSymbols: Protocol.Debugger.DebugSymbols|null,
|
703
|
+
sourceMapURL: Platform.DevToolsPath.UrlString|undefined, hasSourceURLComment: boolean, hasSyntaxError: boolean,
|
704
|
+
length: number, isModule: boolean|null, originStackTrace: Protocol.Runtime.StackTrace|null,
|
705
|
+
codeOffset: number|null, scriptLanguage: string|null, debugSymbols: Protocol.Debugger.DebugSymbols|null,
|
707
706
|
embedderName: string|null): Script {
|
708
707
|
const knownScript = this.#scriptsInternal.get(scriptId);
|
709
708
|
if (knownScript) {
|
@@ -740,7 +739,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
740
739
|
return script;
|
741
740
|
}
|
742
741
|
|
743
|
-
setSourceMapURL(script: Script, newSourceMapURL:
|
742
|
+
setSourceMapURL(script: Script, newSourceMapURL: Platform.DevToolsPath.UrlString): void {
|
744
743
|
let sourceMapId = DebuggerModel.sourceMapId(script.executionContextId, script.sourceURL, script.sourceMapURL);
|
745
744
|
if (sourceMapId && this.#sourceMapIdToScript.get(sourceMapId) === script) {
|
746
745
|
this.#sourceMapIdToScript.delete(sourceMapId);
|
@@ -1058,8 +1057,9 @@ class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
|
|
1058
1057
|
return;
|
1059
1058
|
}
|
1060
1059
|
this.#debuggerModel.parsedScriptSource(
|
1061
|
-
scriptId, url, startLine, startColumn, endLine, endColumn,
|
1062
|
-
|
1060
|
+
scriptId, url as Platform.DevToolsPath.UrlString, startLine, startColumn, endLine, endColumn,
|
1061
|
+
executionContextId, hash, executionContextAuxData, Boolean(isLiveEdit),
|
1062
|
+
sourceMapURL as Platform.DevToolsPath.UrlString, Boolean(hasSourceURL), false, length || 0, isModule || null,
|
1063
1063
|
stackTrace || null, codeOffset || null, scriptLanguage || null, debugSymbols || null, embedderName || null);
|
1064
1064
|
}
|
1065
1065
|
|
@@ -1086,9 +1086,10 @@ class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
|
|
1086
1086
|
return;
|
1087
1087
|
}
|
1088
1088
|
this.#debuggerModel.parsedScriptSource(
|
1089
|
-
scriptId, url, startLine, startColumn, endLine, endColumn,
|
1090
|
-
|
1091
|
-
|
1089
|
+
scriptId, url as Platform.DevToolsPath.UrlString, startLine, startColumn, endLine, endColumn,
|
1090
|
+
executionContextId, hash, executionContextAuxData, false, sourceMapURL as Platform.DevToolsPath.UrlString,
|
1091
|
+
Boolean(hasSourceURL), true, length || 0, isModule || null, stackTrace || null, codeOffset || null,
|
1092
|
+
scriptLanguage || null, null, embedderName || null);
|
1092
1093
|
}
|
1093
1094
|
|
1094
1095
|
breakpointResolved({breakpointId, location}: Protocol.Debugger.BreakpointResolvedEvent): void {
|