chrome-devtools-frontend 1.0.973342 → 1.0.974080
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 +2 -0
- package/config/gni/devtools_image_files.gni +2 -0
- package/front_end/Images/src/triangle-collapsed.svg +1 -0
- package/front_end/Images/src/triangle-expanded.svg +1 -0
- package/front_end/core/common/ParsedURL.ts +9 -9
- package/front_end/core/sdk/DOMModel.ts +4 -4
- package/front_end/core/sdk/RemoteObject.ts +10 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +45 -38
- package/front_end/core/sdk/SourceMapManager.ts +2 -2
- package/front_end/core/sdk/Target.ts +5 -4
- package/front_end/entrypoints/node_app/NodeMain.ts +2 -1
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
- package/front_end/models/bindings/SASSSourceMapping.ts +1 -1
- package/front_end/models/formatter/SourceFormatter.ts +1 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +4 -4
- package/front_end/models/workspace/UISourceCode.ts +8 -1
- package/front_end/panels/application/AppManifestView.ts +10 -4
- package/front_end/panels/application/DOMStorageItemsView.ts +2 -1
- package/front_end/panels/application/InterestGroupTreeElement.ts +3 -0
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +11 -0
- package/front_end/panels/console/ConsolePrompt.ts +8 -0
- package/front_end/panels/console/ErrorStackParser.ts +5 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/network/BinaryResourceView.ts +4 -1
- package/front_end/panels/network/RequestTimingView.ts +12 -2
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +3 -2
- package/front_end/panels/sources/SourcesView.ts +51 -0
- package/front_end/third_party/puppeteer/package/README.md +15 -22
- package/front_end/third_party/puppeteer/package/cjs-entry-core.js +1 -1
- package/front_end/third_party/puppeteer/package/cjs-entry.js +1 -1
- package/front_end/third_party/puppeteer/package/install.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +46 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectionTransport.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js +336 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +11 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.js +16 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +25 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +5 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +35 -21
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +46 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +336 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +11 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +16 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +25 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +5 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +35 -21
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +32 -18
- package/front_end/third_party/puppeteer/package/package.json +36 -35
- package/front_end/ui/components/text_editor/config.ts +17 -1
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -6
- package/front_end/ui/components/text_editor/javascript.ts +10 -5
- package/front_end/ui/components/text_prompt/TextPrompt.ts +9 -8
- package/front_end/ui/components/text_prompt/textPrompt.css +1 -6
- package/front_end/ui/legacy/TabbedPane.ts +3 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +17 -3
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +8 -8
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -1
- package/package.json +1 -1
- package/scripts/build/assert_third_party_readmes.py +1 -1
- package/scripts/build/ninja/README.md +11 -40
@@ -144,6 +144,8 @@ grd_files_release_sources = [
|
|
144
144
|
"front_end/Images/touchCursor_2x.png",
|
145
145
|
"front_end/Images/trash_bin_icon.svg",
|
146
146
|
"front_end/Images/treeoutlineTriangles.svg",
|
147
|
+
"front_end/Images/triangle-collapsed.svg",
|
148
|
+
"front_end/Images/triangle-expanded.svg",
|
147
149
|
"front_end/Images/warning_icon.svg",
|
148
150
|
"front_end/Images/whatsnew.avif",
|
149
151
|
"front_end/Tests.js",
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M 15 10 v 28 l 20 -14 L 15 10" /></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M 10 10 h 28 l -14 20 L 10 10" /></svg>
|
@@ -301,12 +301,12 @@ export class ParsedURL {
|
|
301
301
|
return index < 0 ? pathAndQuery : pathAndQuery.substr(0, index);
|
302
302
|
}
|
303
303
|
|
304
|
-
static completeURL(baseURL:
|
304
|
+
static completeURL(baseURL: Platform.DevToolsPath.UrlString, href: string): Platform.DevToolsPath.UrlString|null {
|
305
305
|
// Return special URLs as-is.
|
306
306
|
const trimmedHref = href.trim();
|
307
307
|
if (trimmedHref.startsWith('data:') || trimmedHref.startsWith('blob:') || trimmedHref.startsWith('javascript:') ||
|
308
308
|
trimmedHref.startsWith('mailto:')) {
|
309
|
-
return href;
|
309
|
+
return href as Platform.DevToolsPath.UrlString;
|
310
310
|
}
|
311
311
|
|
312
312
|
// Return absolute URLs with normalized path and other components as-is.
|
@@ -315,7 +315,7 @@ export class ParsedURL {
|
|
315
315
|
const securityOrigin = parsedHref.securityOrigin();
|
316
316
|
const pathText = parsedHref.path;
|
317
317
|
const hrefSuffix = trimmedHref.substring(securityOrigin.length + pathText.length);
|
318
|
-
return securityOrigin + normalizePath(pathText) + hrefSuffix;
|
318
|
+
return securityOrigin + normalizePath(pathText) + hrefSuffix as Platform.DevToolsPath.UrlString;
|
319
319
|
}
|
320
320
|
|
321
321
|
const parsedURL = this.fromString(baseURL);
|
@@ -324,12 +324,12 @@ export class ParsedURL {
|
|
324
324
|
}
|
325
325
|
|
326
326
|
if (parsedURL.isDataURL()) {
|
327
|
-
return href;
|
327
|
+
return href as Platform.DevToolsPath.UrlString;
|
328
328
|
}
|
329
329
|
|
330
330
|
if (href.length > 1 && href.charAt(0) === '/' && href.charAt(1) === '/') {
|
331
331
|
// href starts with "//" which is a full URL with the protocol dropped (use the baseURL protocol).
|
332
|
-
return parsedURL.scheme + ':' + href;
|
332
|
+
return parsedURL.scheme + ':' + href as Platform.DevToolsPath.UrlString;
|
333
333
|
}
|
334
334
|
|
335
335
|
const securityOrigin = parsedURL.securityOrigin();
|
@@ -338,15 +338,15 @@ export class ParsedURL {
|
|
338
338
|
|
339
339
|
// Empty href resolves to a URL without fragment.
|
340
340
|
if (!href.length) {
|
341
|
-
return securityOrigin + pathText + queryText;
|
341
|
+
return securityOrigin + pathText + queryText as Platform.DevToolsPath.UrlString;
|
342
342
|
}
|
343
343
|
|
344
344
|
if (href.charAt(0) === '#') {
|
345
|
-
return securityOrigin + pathText + queryText + href;
|
345
|
+
return securityOrigin + pathText + queryText + href as Platform.DevToolsPath.UrlString;
|
346
346
|
}
|
347
347
|
|
348
348
|
if (href.charAt(0) === '?') {
|
349
|
-
return securityOrigin + pathText + href;
|
349
|
+
return securityOrigin + pathText + href as Platform.DevToolsPath.UrlString;
|
350
350
|
}
|
351
351
|
|
352
352
|
const hrefMatches = href.match(/^[^#?]*/);
|
@@ -358,7 +358,7 @@ export class ParsedURL {
|
|
358
358
|
if (hrefPath.charAt(0) !== '/') {
|
359
359
|
hrefPath = parsedURL.folderPathComponents + '/' + hrefPath;
|
360
360
|
}
|
361
|
-
return securityOrigin + normalizePath(hrefPath) + hrefSuffix;
|
361
|
+
return securityOrigin + normalizePath(hrefPath) + hrefSuffix as Platform.DevToolsPath.UrlString;
|
362
362
|
}
|
363
363
|
|
364
364
|
static splitLineAndColumn(string: string): {
|
@@ -1002,15 +1002,15 @@ export class DOMNodeShortcut {
|
|
1002
1002
|
export class DOMDocument extends DOMNode {
|
1003
1003
|
body: DOMNode|null;
|
1004
1004
|
documentElement: DOMNode|null;
|
1005
|
-
documentURL:
|
1006
|
-
baseURL:
|
1005
|
+
documentURL: Platform.DevToolsPath.UrlString;
|
1006
|
+
baseURL: Platform.DevToolsPath.UrlString;
|
1007
1007
|
constructor(domModel: DOMModel, payload: Protocol.DOM.Node) {
|
1008
1008
|
super(domModel);
|
1009
1009
|
this.body = null;
|
1010
1010
|
this.documentElement = null;
|
1011
1011
|
this.init(this, false, payload);
|
1012
|
-
this.documentURL = payload.documentURL || '';
|
1013
|
-
this.baseURL = payload.baseURL || '';
|
1012
|
+
this.documentURL = (payload.documentURL || '') as Platform.DevToolsPath.UrlString;
|
1013
|
+
this.baseURL = (payload.baseURL || '') as Platform.DevToolsPath.UrlString;
|
1014
1014
|
}
|
1015
1015
|
}
|
1016
1016
|
|
@@ -485,10 +485,18 @@ export class RemoteObjectImpl extends RemoteObject {
|
|
485
485
|
result.push(remoteProperty);
|
486
486
|
}
|
487
487
|
for (const property of privateProperties) {
|
488
|
-
const propertyValue =
|
489
|
-
this.runtimeModelInternal.createRemoteObject((property.value as Protocol.Runtime.RemoteObject));
|
488
|
+
const propertyValue = property.value ? this.runtimeModelInternal.createRemoteObject(property.value) : null;
|
490
489
|
const remoteProperty = new RemoteObjectProperty(
|
491
490
|
property.name, propertyValue, true, true, true, false, undefined, false, undefined, true);
|
491
|
+
|
492
|
+
if (typeof property.value === 'undefined') {
|
493
|
+
if (property.get && property.get.type !== 'undefined') {
|
494
|
+
remoteProperty.getter = this.runtimeModelInternal.createRemoteObject(property.get);
|
495
|
+
}
|
496
|
+
if (property.set && property.set.type !== 'undefined') {
|
497
|
+
remoteProperty.setter = this.runtimeModelInternal.createRemoteObject(property.set);
|
498
|
+
}
|
499
|
+
}
|
492
500
|
result.push(remoteProperty);
|
493
501
|
}
|
494
502
|
|
@@ -140,7 +140,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
140
140
|
if (mainFramePayload && mainFramePayload.frame.url !== ':') {
|
141
141
|
this.dispatchEventToListeners(Events.WillLoadCachedResources);
|
142
142
|
this.addFramesRecursively(null, mainFramePayload);
|
143
|
-
this.target().setInspectedURL(mainFramePayload.frame.url);
|
143
|
+
this.target().setInspectedURL(mainFramePayload.frame.url as Platform.DevToolsPath.UrlString);
|
144
144
|
}
|
145
145
|
this.#cachedResourcesProcessed = true;
|
146
146
|
const runtimeModel = this.target().model(RuntimeModel);
|
@@ -32,8 +32,6 @@
|
|
32
32
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
33
|
*/
|
34
34
|
|
35
|
-
// TODO(crbug.com/1253323): Casts to UrlString will be removed from this file when migration to branded types is complete.
|
36
|
-
|
37
35
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
38
36
|
import * as Common from '../common/common.js';
|
39
37
|
import * as i18n from '../i18n/i18n.js';
|
@@ -61,15 +59,17 @@ const str_ = i18n.i18n.registerUIStrings('core/sdk/SourceMap.ts', UIStrings);
|
|
61
59
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
62
60
|
|
63
61
|
export interface SourceMap {
|
64
|
-
compiledURL():
|
65
|
-
url():
|
66
|
-
sourceURLs():
|
67
|
-
sourceContentProvider(sourceURL:
|
62
|
+
compiledURL(): Platform.DevToolsPath.UrlString;
|
63
|
+
url(): Platform.DevToolsPath.UrlString;
|
64
|
+
sourceURLs(): Platform.DevToolsPath.UrlString[];
|
65
|
+
sourceContentProvider(sourceURL: Platform.DevToolsPath.UrlString, contentType: Common.ResourceType.ResourceType):
|
68
66
|
TextUtils.ContentProvider.ContentProvider;
|
69
|
-
embeddedContentByURL(sourceURL:
|
67
|
+
embeddedContentByURL(sourceURL: Platform.DevToolsPath.UrlString): string|null;
|
70
68
|
findEntry(lineNumber: number, columnNumber: number): SourceMapEntry|null;
|
71
|
-
findReverseRanges(sourceURL:
|
72
|
-
|
69
|
+
findReverseRanges(sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number):
|
70
|
+
TextUtils.TextRange.TextRange[];
|
71
|
+
sourceLineMapping(sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number):
|
72
|
+
SourceMapEntry|null;
|
73
73
|
mappings(): SourceMapEntry[];
|
74
74
|
mapsOrigin(): boolean;
|
75
75
|
}
|
@@ -77,10 +77,10 @@ export interface SourceMap {
|
|
77
77
|
export class SourceMapV3 {
|
78
78
|
version!: number;
|
79
79
|
file!: string|undefined;
|
80
|
-
sources!:
|
80
|
+
sources!: Platform.DevToolsPath.UrlString[];
|
81
81
|
sections!: Section[]|undefined;
|
82
82
|
mappings!: string;
|
83
|
-
sourceRoot!:
|
83
|
+
sourceRoot!: Platform.DevToolsPath.UrlString|undefined;
|
84
84
|
names!: string[]|undefined;
|
85
85
|
sourcesContent!: string|undefined;
|
86
86
|
constructor() {
|
@@ -105,13 +105,13 @@ export class Offset {
|
|
105
105
|
export class SourceMapEntry {
|
106
106
|
lineNumber: number;
|
107
107
|
columnNumber: number;
|
108
|
-
sourceURL:
|
108
|
+
sourceURL: Platform.DevToolsPath.UrlString|undefined;
|
109
109
|
sourceLineNumber: number;
|
110
110
|
sourceColumnNumber: number;
|
111
111
|
name: string|undefined;
|
112
112
|
|
113
113
|
constructor(
|
114
|
-
lineNumber: number, columnNumber: number, sourceURL?:
|
114
|
+
lineNumber: number, columnNumber: number, sourceURL?: Platform.DevToolsPath.UrlString, sourceLineNumber?: number,
|
115
115
|
sourceColumnNumber?: number, name?: string) {
|
116
116
|
this.lineNumber = lineNumber;
|
117
117
|
this.columnNumber = columnNumber;
|
@@ -136,14 +136,14 @@ for (let i = 0; i < base64Digits.length; ++i) {
|
|
136
136
|
base64Map.set(base64Digits.charAt(i), i);
|
137
137
|
}
|
138
138
|
|
139
|
-
const sourceMapToSourceList = new WeakMap<SourceMapV3,
|
139
|
+
const sourceMapToSourceList = new WeakMap<SourceMapV3, Platform.DevToolsPath.UrlString[]>();
|
140
140
|
|
141
141
|
export class TextSourceMap implements SourceMap {
|
142
142
|
readonly #initiator: PageResourceLoadInitiator;
|
143
143
|
#json: SourceMapV3|null;
|
144
|
-
readonly #compiledURLInternal:
|
145
|
-
readonly #sourceMappingURL:
|
146
|
-
readonly #baseURL:
|
144
|
+
readonly #compiledURLInternal: Platform.DevToolsPath.UrlString;
|
145
|
+
readonly #sourceMappingURL: Platform.DevToolsPath.UrlString;
|
146
|
+
readonly #baseURL: Platform.DevToolsPath.UrlString;
|
147
147
|
#mappingsInternal: SourceMapEntry[]|null;
|
148
148
|
readonly #sourceInfos: Map<Platform.DevToolsPath.UrlString, TextSourceMap.SourceInfo>;
|
149
149
|
|
@@ -152,12 +152,13 @@ export class TextSourceMap implements SourceMap {
|
|
152
152
|
* for format description.
|
153
153
|
*/
|
154
154
|
constructor(
|
155
|
-
compiledURL:
|
155
|
+
compiledURL: Platform.DevToolsPath.UrlString, sourceMappingURL: Platform.DevToolsPath.UrlString,
|
156
|
+
payload: SourceMapV3, initiator: PageResourceLoadInitiator) {
|
156
157
|
this.#initiator = initiator;
|
157
158
|
this.#json = payload;
|
158
159
|
this.#compiledURLInternal = compiledURL;
|
159
160
|
this.#sourceMappingURL = sourceMappingURL;
|
160
|
-
this.#baseURL = sourceMappingURL.startsWith('data:') ? compiledURL : sourceMappingURL;
|
161
|
+
this.#baseURL = (sourceMappingURL.startsWith('data:') ? compiledURL : sourceMappingURL);
|
161
162
|
|
162
163
|
this.#mappingsInternal = null;
|
163
164
|
this.#sourceInfos = new Map();
|
@@ -174,8 +175,9 @@ export class TextSourceMap implements SourceMap {
|
|
174
175
|
/**
|
175
176
|
* @throws {!Error}
|
176
177
|
*/
|
177
|
-
static async load(
|
178
|
-
|
178
|
+
static async load(
|
179
|
+
sourceMapURL: Platform.DevToolsPath.UrlString, compiledURL: Platform.DevToolsPath.UrlString,
|
180
|
+
initiator: PageResourceLoadInitiator): Promise<TextSourceMap> {
|
179
181
|
let updatedContent;
|
180
182
|
try {
|
181
183
|
const {content} = await PageResourceLoader.instance().loadResource(sourceMapURL, initiator);
|
@@ -195,11 +197,11 @@ export class TextSourceMap implements SourceMap {
|
|
195
197
|
}
|
196
198
|
}
|
197
199
|
|
198
|
-
compiledURL():
|
200
|
+
compiledURL(): Platform.DevToolsPath.UrlString {
|
199
201
|
return this.#compiledURLInternal;
|
200
202
|
}
|
201
203
|
|
202
|
-
url():
|
204
|
+
url(): Platform.DevToolsPath.UrlString {
|
203
205
|
return this.#sourceMappingURL;
|
204
206
|
}
|
205
207
|
|
@@ -216,8 +218,8 @@ export class TextSourceMap implements SourceMap {
|
|
216
218
|
return new CompilerSourceMappingContentProvider(sourceURL, contentType, this.#initiator);
|
217
219
|
}
|
218
220
|
|
219
|
-
embeddedContentByURL(sourceURL:
|
220
|
-
const entry = this.#sourceInfos.get(sourceURL
|
221
|
+
embeddedContentByURL(sourceURL: Platform.DevToolsPath.UrlString): string|null {
|
222
|
+
const entry = this.#sourceInfos.get(sourceURL);
|
221
223
|
if (!entry) {
|
222
224
|
return null;
|
223
225
|
}
|
@@ -231,7 +233,8 @@ export class TextSourceMap implements SourceMap {
|
|
231
233
|
return index ? mappings[index - 1] : null;
|
232
234
|
}
|
233
235
|
|
234
|
-
sourceLineMapping(sourceURL:
|
236
|
+
sourceLineMapping(sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number):
|
237
|
+
SourceMapEntry|null {
|
235
238
|
const mappings = this.mappings();
|
236
239
|
const reverseMappings = this.reversedMappings(sourceURL);
|
237
240
|
const first = Platform.ArrayUtilities.lowerBound(reverseMappings, lineNumber, lineComparator);
|
@@ -253,7 +256,8 @@ export class TextSourceMap implements SourceMap {
|
|
253
256
|
}
|
254
257
|
}
|
255
258
|
|
256
|
-
private findReverseIndices(sourceURL:
|
259
|
+
private findReverseIndices(sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number):
|
260
|
+
number[] {
|
257
261
|
const mappings = this.mappings();
|
258
262
|
const reverseMappings = this.reversedMappings(sourceURL);
|
259
263
|
const endIndex = Platform.ArrayUtilities.upperBound(
|
@@ -271,12 +275,14 @@ export class TextSourceMap implements SourceMap {
|
|
271
275
|
return reverseMappings.slice(startIndex, endIndex);
|
272
276
|
}
|
273
277
|
|
274
|
-
findReverseEntries(sourceURL:
|
278
|
+
findReverseEntries(sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number):
|
279
|
+
SourceMapEntry[] {
|
275
280
|
const mappings = this.mappings();
|
276
281
|
return this.findReverseIndices(sourceURL, lineNumber, columnNumber).map(i => mappings[i]);
|
277
282
|
}
|
278
283
|
|
279
|
-
findReverseRanges(sourceURL:
|
284
|
+
findReverseRanges(sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number):
|
285
|
+
TextUtils.TextRange.TextRange[] {
|
280
286
|
const mappings = this.mappings();
|
281
287
|
const indices = this.findReverseIndices(sourceURL, lineNumber, columnNumber);
|
282
288
|
const ranges: TextUtils.TextRange.TextRange[] = [];
|
@@ -308,8 +314,8 @@ export class TextSourceMap implements SourceMap {
|
|
308
314
|
return this.#mappingsInternal;
|
309
315
|
}
|
310
316
|
|
311
|
-
private reversedMappings(sourceURL:
|
312
|
-
const info = this.#sourceInfos.get(sourceURL
|
317
|
+
private reversedMappings(sourceURL: Platform.DevToolsPath.UrlString): number[] {
|
318
|
+
const info = this.#sourceInfos.get(sourceURL);
|
313
319
|
if (!info) {
|
314
320
|
return [];
|
315
321
|
}
|
@@ -354,9 +360,9 @@ export class TextSourceMap implements SourceMap {
|
|
354
360
|
|
355
361
|
private parseSources(sourceMap: SourceMapV3): void {
|
356
362
|
const sourcesList = [];
|
357
|
-
let sourceRoot = sourceMap.sourceRoot || '';
|
363
|
+
let sourceRoot = sourceMap.sourceRoot || '' as Platform.DevToolsPath.UrlString;
|
358
364
|
if (sourceRoot && !sourceRoot.endsWith('/')) {
|
359
|
-
sourceRoot
|
365
|
+
sourceRoot = Common.ParsedURL.ParsedURL.concatenate(sourceRoot, '/');
|
360
366
|
}
|
361
367
|
for (let i = 0; i < sourceMap.sources.length; ++i) {
|
362
368
|
let href = sourceMap.sources[i];
|
@@ -366,14 +372,14 @@ export class TextSourceMap implements SourceMap {
|
|
366
372
|
// be meaningful or useful if the source URL is already absolute though. In this
|
367
373
|
// case, use the source URL as is without prepending the sourceRoot.
|
368
374
|
if (Common.ParsedURL.ParsedURL.isRelativeURL(href)) {
|
369
|
-
href = sourceRoot
|
375
|
+
href = Common.ParsedURL.ParsedURL.concatenate(sourceRoot, href);
|
370
376
|
}
|
371
377
|
let url = Common.ParsedURL.ParsedURL.completeURL(this.#baseURL, href) || href;
|
372
378
|
const source = sourceMap.sourcesContent && sourceMap.sourcesContent[i];
|
373
379
|
if (url === this.#compiledURLInternal && source) {
|
374
|
-
url
|
380
|
+
url = Common.ParsedURL.ParsedURL.concatenate(url, '? [sm]');
|
375
381
|
}
|
376
|
-
this.#sourceInfos.set(url
|
382
|
+
this.#sourceInfos.set(url, new TextSourceMap.SourceInfo(source || null, null));
|
377
383
|
sourcesList.push(url);
|
378
384
|
}
|
379
385
|
sourceMapToSourceList.set(sourceMap, sourcesList);
|
@@ -393,7 +399,7 @@ export class TextSourceMap implements SourceMap {
|
|
393
399
|
const sources = sourceMapToSourceList.get(map);
|
394
400
|
const names = map.names || [];
|
395
401
|
const stringCharIterator = new TextSourceMap.StringCharIterator(map.mappings);
|
396
|
-
let sourceURL:
|
402
|
+
let sourceURL: Platform.DevToolsPath.UrlString|undefined = sources && sources[sourceIndex];
|
397
403
|
|
398
404
|
while (true) {
|
399
405
|
if (stringCharIterator.peek() === ',') {
|
@@ -461,7 +467,8 @@ export class TextSourceMap implements SourceMap {
|
|
461
467
|
return negative ? -result : result;
|
462
468
|
}
|
463
469
|
|
464
|
-
reverseMapTextRange(url:
|
470
|
+
reverseMapTextRange(url: Platform.DevToolsPath.UrlString, textRange: TextUtils.TextRange.TextRange):
|
471
|
+
TextUtils.TextRange.TextRange|null {
|
465
472
|
function comparator(
|
466
473
|
position: {
|
467
474
|
lineNumber: number,
|
@@ -110,8 +110,8 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
|
|
110
110
|
}
|
111
111
|
|
112
112
|
private resolveRelativeURLs(sourceURL: string, sourceMapURL: string): {
|
113
|
-
sourceURL:
|
114
|
-
sourceMapURL:
|
113
|
+
sourceURL: Platform.DevToolsPath.UrlString,
|
114
|
+
sourceMapURL: Platform.DevToolsPath.UrlString,
|
115
115
|
sourceMapId: string,
|
116
116
|
}|null {
|
117
117
|
// |#sourceURL| can be a random string, but is generally an absolute path.
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../common/common.js';
|
6
6
|
import * as Host from '../host/host.js';
|
7
|
+
import type * as Platform from '../platform/platform.js';
|
7
8
|
import * as ProtocolClient from '../protocol_client/protocol_client.js';
|
8
9
|
import type * as Protocol from '../../generated/protocol.js';
|
9
10
|
import type {TargetManager} from './TargetManager.js';
|
@@ -12,7 +13,7 @@ import {SDKModel} from './SDKModel.js';
|
|
12
13
|
export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
13
14
|
readonly #targetManagerInternal: TargetManager;
|
14
15
|
#nameInternal: string;
|
15
|
-
#inspectedURLInternal:
|
16
|
+
#inspectedURLInternal: Platform.DevToolsPath.UrlString;
|
16
17
|
#inspectedURLName: string;
|
17
18
|
readonly #capabilitiesMask: number;
|
18
19
|
#typeInternal: Type;
|
@@ -31,7 +32,7 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
31
32
|
super(needsNodeJSPatching, parentTarget, sessionId, connection);
|
32
33
|
this.#targetManagerInternal = targetManager;
|
33
34
|
this.#nameInternal = name;
|
34
|
-
this.#inspectedURLInternal = '';
|
35
|
+
this.#inspectedURLInternal = '' as Platform.DevToolsPath.UrlString;
|
35
36
|
this.#inspectedURLName = '';
|
36
37
|
this.#capabilitiesMask = 0;
|
37
38
|
switch (type) {
|
@@ -165,11 +166,11 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
165
166
|
return this.#modelByConstructor;
|
166
167
|
}
|
167
168
|
|
168
|
-
inspectedURL():
|
169
|
+
inspectedURL(): Platform.DevToolsPath.UrlString {
|
169
170
|
return this.#inspectedURLInternal;
|
170
171
|
}
|
171
172
|
|
172
|
-
setInspectedURL(inspectedURL:
|
173
|
+
setInspectedURL(inspectedURL: Platform.DevToolsPath.UrlString): void {
|
173
174
|
this.#inspectedURLInternal = inspectedURL;
|
174
175
|
const parsedURL = Common.ParsedURL.ParsedURL.fromString(inspectedURL);
|
175
176
|
this.#inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : '#' + this.#idInternal;
|
@@ -6,6 +6,7 @@ import type * 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
8
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
9
|
+
import type * as Platform from '../../core/platform/platform.js';
|
9
10
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
10
11
|
import type * as Protocol from '../../generated/protocol.js';
|
11
12
|
|
@@ -40,7 +41,7 @@ export class NodeMainImpl implements Common.Runnable.Runnable {
|
|
40
41
|
void SDK.Connections.initMainConnection(async () => {
|
41
42
|
const target = SDK.TargetManager.TargetManager.instance().createTarget(
|
42
43
|
'main', i18nString(UIStrings.main), SDK.Target.Type.Browser, null);
|
43
|
-
target.setInspectedURL('Node.js');
|
44
|
+
target.setInspectedURL('Node.js' as Platform.DevToolsPath.UrlString);
|
44
45
|
}, Components.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost);
|
45
46
|
}
|
46
47
|
}
|
@@ -30,6 +30,7 @@
|
|
30
30
|
|
31
31
|
import * as Common from '../../core/common/common.js';
|
32
32
|
import * as SDK from '../../core/sdk/sdk.js';
|
33
|
+
import type * as Platform from '../../core/platform/platform.js';
|
33
34
|
import type * as Protocol from '../../generated/protocol.js';
|
34
35
|
import * as TextUtils from '../text_utils/text_utils.js';
|
35
36
|
import * as Workspace from '../workspace/workspace.js';
|
@@ -327,11 +328,11 @@ const uiSourceCodeToBinding = new WeakMap<Workspace.UISourceCode.UISourceCode, B
|
|
327
328
|
|
328
329
|
class Binding {
|
329
330
|
readonly #project: ContentProviderBasedProject;
|
330
|
-
readonly #url:
|
331
|
+
readonly #url: Platform.DevToolsPath.UrlString;
|
331
332
|
referringSourceMaps: SDK.SourceMap.SourceMap[];
|
332
333
|
uiSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
333
334
|
|
334
|
-
constructor(project: ContentProviderBasedProject, url:
|
335
|
+
constructor(project: ContentProviderBasedProject, url: Platform.DevToolsPath.UrlString) {
|
335
336
|
this.#project = project;
|
336
337
|
this.#url = url;
|
337
338
|
|
@@ -79,7 +79,7 @@ export class SASSSourceMapping implements SourceMapping {
|
|
79
79
|
for (const sourceURL of sourceMap.sourceURLs()) {
|
80
80
|
let binding = bindings.get(sourceURL);
|
81
81
|
if (!binding) {
|
82
|
-
binding = new Binding(project, sourceURL
|
82
|
+
binding = new Binding(project, sourceURL);
|
83
83
|
bindings.set(sourceURL, binding);
|
84
84
|
}
|
85
85
|
binding.addSourceMap(sourceMap, header.frameId);
|
@@ -129,7 +129,7 @@ export class SourceFormatter {
|
|
129
129
|
let count = 0;
|
130
130
|
let suffix = '';
|
131
131
|
do {
|
132
|
-
formattedURL =
|
132
|
+
formattedURL = Common.ParsedURL.ParsedURL.concatenate(uiSourceCode.url(), ':formatted', suffix);
|
133
133
|
suffix = `:${count++}`;
|
134
134
|
} while (this.project.uiSourceCodeForURL(formattedURL));
|
135
135
|
const contentProvider = TextUtils.StaticContentProvider.StaticContentProvider.fromString(
|
@@ -21,14 +21,14 @@ export class StaticContentProvider implements ContentProvider {
|
|
21
21
|
this.lazyContent = lazyContent;
|
22
22
|
}
|
23
23
|
|
24
|
-
static fromString(
|
25
|
-
|
24
|
+
static fromString(
|
25
|
+
contentURL: Platform.DevToolsPath.UrlString, contentType: Common.ResourceType.ResourceType,
|
26
|
+
content: string): StaticContentProvider {
|
26
27
|
const lazyContent = (): Promise<{
|
27
28
|
content: string,
|
28
29
|
isEncoded: boolean,
|
29
30
|
}> => Promise.resolve({content, isEncoded: false});
|
30
|
-
|
31
|
-
return new StaticContentProvider(contentURL as Platform.DevToolsPath.UrlString, contentType, lazyContent);
|
31
|
+
return new StaticContentProvider(contentURL, contentType, lazyContent);
|
32
32
|
}
|
33
33
|
|
34
34
|
contentURL(): Platform.DevToolsPath.UrlString {
|
@@ -235,6 +235,13 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
235
235
|
return this.contentInternal as TextUtils.ContentProvider.DeferredContent;
|
236
236
|
}
|
237
237
|
|
238
|
+
#decodeContent(content: TextUtils.ContentProvider.DeferredContent|null): string|null {
|
239
|
+
if (!content) {
|
240
|
+
return null;
|
241
|
+
}
|
242
|
+
return content.isEncoded && content.content ? window.atob(content.content) : content.content;
|
243
|
+
}
|
244
|
+
|
238
245
|
async checkContentUpdated(): Promise<void> {
|
239
246
|
if (!this.contentLoadedInternal && !this.forceLoadOnCheckContentInternal) {
|
240
247
|
return;
|
@@ -260,7 +267,7 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
260
267
|
return;
|
261
268
|
}
|
262
269
|
|
263
|
-
if (this.contentInternal
|
270
|
+
if (this.#decodeContent(this.contentInternal) === this.#decodeContent(updatedContent)) {
|
264
271
|
this.lastAcceptedContent = null;
|
265
272
|
return;
|
266
273
|
}
|
@@ -16,6 +16,8 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
16
16
|
import type * as Protocol from '../../generated/protocol.js';
|
17
17
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
18
18
|
|
19
|
+
// TODO(crbug.com/1253323): Casts to UrlString will be removed from this file when migration to branded types is complete.
|
20
|
+
|
19
21
|
const UIStrings = {
|
20
22
|
/**
|
21
23
|
*@description Text in App Manifest View of the Application panel
|
@@ -640,7 +642,8 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
|
|
640
642
|
|
641
643
|
this.startURLField.removeChildren();
|
642
644
|
if (startURL) {
|
643
|
-
const completeURL =
|
645
|
+
const completeURL =
|
646
|
+
(Common.ParsedURL.ParsedURL.completeURL(url as Platform.DevToolsPath.UrlString, startURL) as string);
|
644
647
|
const link = Components.Linkifier.Linkifier.linkifyURL(
|
645
648
|
completeURL, ({text: startURL} as Components.Linkifier.LinkifyURLOptions));
|
646
649
|
link.tabIndex = 0;
|
@@ -691,7 +694,8 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
|
|
691
694
|
this.newNoteUrlField.parentElement?.classList.toggle('hidden', !hasNewNoteUrl);
|
692
695
|
this.newNoteUrlField.removeChildren();
|
693
696
|
if (hasNewNoteUrl) {
|
694
|
-
const completeURL =
|
697
|
+
const completeURL =
|
698
|
+
(Common.ParsedURL.ParsedURL.completeURL(url as Platform.DevToolsPath.UrlString, newNoteUrl) as string);
|
695
699
|
const link = Components.Linkifier.Linkifier.linkifyURL(
|
696
700
|
completeURL, ({text: newNoteUrl} as Components.Linkifier.LinkifyURLOptions));
|
697
701
|
link.tabIndex = 0;
|
@@ -761,7 +765,8 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
|
|
761
765
|
shortcutSection.appendFlexedField('Description', shortcut.description);
|
762
766
|
}
|
763
767
|
const urlField = shortcutSection.appendFlexedField('URL');
|
764
|
-
const shortcutUrl =
|
768
|
+
const shortcutUrl =
|
769
|
+
(Common.ParsedURL.ParsedURL.completeURL(url as Platform.DevToolsPath.UrlString, shortcut.url) as string);
|
765
770
|
const link = Components.Linkifier.Linkifier.linkifyURL(
|
766
771
|
shortcutUrl, ({text: shortcut.url} as Components.Linkifier.LinkifyURLOptions));
|
767
772
|
link.tabIndex = 0;
|
@@ -1021,7 +1026,8 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
|
|
1021
1026
|
imageResourceErrors.push(i18nString(UIStrings.sSrcIsNotSet, {PH1: resourceName}));
|
1022
1027
|
return {imageResourceErrors};
|
1023
1028
|
}
|
1024
|
-
const imageUrl =
|
1029
|
+
const imageUrl =
|
1030
|
+
Common.ParsedURL.ParsedURL.completeURL(baseUrl as Platform.DevToolsPath.UrlString, imageResource['src']);
|
1025
1031
|
if (!imageUrl) {
|
1026
1032
|
imageResourceErrors.push(
|
1027
1033
|
i18nString(UIStrings.sUrlSFailedToParse, {PH1: resourceName, PH2: imageResource['src']}));
|
@@ -32,6 +32,7 @@ import * as Common from '../../core/common/common.js';
|
|
32
32
|
import * as i18n from '../../core/i18n/i18n.js';
|
33
33
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
34
34
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
35
|
+
import type * as Platform from '../../core/platform/platform.js';
|
35
36
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
36
37
|
import * as UI from '../../ui/legacy/legacy.js';
|
37
38
|
|
@@ -319,7 +320,7 @@ export class DOMStorageItemsView extends StorageItemsView {
|
|
319
320
|
const value = entry && entry.data && entry.data.value;
|
320
321
|
if (entry && entry.data && entry.data.value) {
|
321
322
|
const protocol = this.domStorage.isLocalStorage ? 'localstorage' : 'sessionstorage';
|
322
|
-
const url = `${protocol}://${entry.key}
|
323
|
+
const url = `${protocol}://${entry.key}` as Platform.DevToolsPath.UrlString;
|
323
324
|
const provider = TextUtils.StaticContentProvider.StaticContentProvider.fromString(
|
324
325
|
url, Common.ResourceType.resourceTypes.XHR, (value as string));
|
325
326
|
const preview = await SourceFrame.PreviewFactory.PreviewFactory.createPreview(provider, 'text/plain');
|
@@ -15,6 +15,9 @@ import {InterestGroupStorageView} from './InterestGroupStorageView.js';
|
|
15
15
|
const UIStrings = {
|
16
16
|
/**
|
17
17
|
*@description Label for an item in the Application Panel Sidebar of the Application panel
|
18
|
+
* An interest group is an ad targeting group stored on the browser that can
|
19
|
+
* be used to show a certain set of advertisements in the future as the
|
20
|
+
* outcome of a FLEDGE auction. (https://developer.chrome.com/blog/fledge-api/)
|
18
21
|
*/
|
19
22
|
interestGroups: 'Interest Groups',
|
20
23
|
};
|
@@ -14,22 +14,33 @@ import interestGroupAccessGridStyles from './interestGroupAccessGrid.css.js';
|
|
14
14
|
const UIStrings = {
|
15
15
|
/**
|
16
16
|
*@description Hover text for an info icon in the Interest Group Event panel
|
17
|
+
* An interest group is an ad targeting group stored on the browser that can
|
18
|
+
* be used to show a certain set of advertisements in the future as the
|
19
|
+
* outcome of a FLEDGE auction.
|
17
20
|
*/
|
18
21
|
allInterestGroupStorageEvents: 'All interest group storage events.',
|
19
22
|
/**
|
20
23
|
*@description Text in InterestGroupStorage Items View of the Application panel
|
24
|
+
* Date and time of an Interest Group storage event in a locale-
|
25
|
+
* dependent format.
|
21
26
|
*/
|
22
27
|
eventTime: 'Event Time',
|
23
28
|
/**
|
24
29
|
*@description Text in InterestGroupStorage Items View of the Application panel
|
30
|
+
* Type of interest group event such as 'join', 'bid', 'win', or 'leave'.
|
25
31
|
*/
|
26
32
|
eventType: 'Access Type',
|
27
33
|
/**
|
28
34
|
*@description Text in InterestGroupStorage Items View of the Application panel
|
35
|
+
* Owner of the interest group. The origin that controls the
|
36
|
+
* content of information associated with the interest group such as which
|
37
|
+
* ads get displayed.
|
29
38
|
*/
|
30
39
|
groupOwner: 'Owner',
|
31
40
|
/**
|
32
41
|
*@description Text in InterestGroupStorage Items View of the Application panel
|
42
|
+
* Name of the interest group. The name is unique per-owner and identifies the
|
43
|
+
* interest group.
|
33
44
|
*/
|
34
45
|
groupName: 'Name',
|
35
46
|
/**
|