chrome-devtools-frontend 1.0.1038113 → 1.0.1038685

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.
@@ -177,7 +177,7 @@ export class ParsedURL {
177
177
  */
178
178
  static encodedFromParentPathAndName(parentPath: Platform.DevToolsPath.EncodedPathString, name: string):
179
179
  Platform.DevToolsPath.EncodedPathString {
180
- return ParsedURL.concatenate(parentPath, '/', encodeURIComponent(name));
180
+ return ParsedURL.concatenate(parentPath, '/', ParsedURL.preEncodeSpecialCharactersInPath(name));
181
181
  }
182
182
 
183
183
  /**
@@ -134,6 +134,9 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
134
134
  }
135
135
 
136
136
  async storageKeyForFrame(frameId: Protocol.Page.FrameId): Promise<string|null> {
137
+ if (!this.framesInternal.has(frameId)) {
138
+ return null;
139
+ }
137
140
  const response = await this.storageAgent.invoke_getStorageKeyForFrame({frameId: frameId});
138
141
  if (response.getError() === 'Frame tree node for given frame not found') {
139
142
  return null;
@@ -540,11 +543,11 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
540
543
  const storageKeys = new Set<string>();
541
544
  let mainStorageKey: string|null = null;
542
545
 
543
- for (const {isMainFrame, storageKey} of await Promise.all(
544
- [...this.framesInternal.values()].map(async f => f.storageKey.then(k => ({
545
- isMainFrame: f.isMainFrame(),
546
- storageKey: k,
547
- }))))) {
546
+ for (const {isMainFrame, storageKey} of await Promise.all([...this.framesInternal.values()].map(
547
+ f => f.getStorageKey(/* forceFetch */ false).then(k => ({
548
+ isMainFrame: f.isMainFrame(),
549
+ storageKey: k,
550
+ }))))) {
548
551
  if (isMainFrame) {
549
552
  mainStorageKey = storageKey;
550
553
  }
@@ -570,7 +573,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
570
573
  }
571
574
 
572
575
  async getMainStorageKey(): Promise<string|null> {
573
- return this.mainFrame ? this.mainFrame.storageKey : null;
576
+ return this.mainFrame ? this.mainFrame.getStorageKey(/* forceFetch */ false) : null;
574
577
  }
575
578
 
576
579
  getMainSecurityOrigin(): string|null {
@@ -767,6 +770,7 @@ export class ResourceTreeFrame {
767
770
  this.#urlInternal = framePayload.url as Platform.DevToolsPath.UrlString;
768
771
  this.#domainAndRegistryInternal = framePayload.domainAndRegistry;
769
772
  this.#securityOriginInternal = framePayload.securityOrigin;
773
+ void this.getStorageKey(/* forceFetch */ true);
770
774
  this.#unreachableUrlInternal =
771
775
  framePayload.unreachableUrl as Platform.DevToolsPath.UrlString || Platform.DevToolsPath.EmptyUrlString;
772
776
  this.#adFrameStatusInternal = framePayload?.adFrameStatus;
@@ -827,8 +831,8 @@ export class ResourceTreeFrame {
827
831
  return this.#securityOriginInternal;
828
832
  }
829
833
 
830
- get storageKey(): Promise<string|null> {
831
- if (!this.#storageKeyInternal) {
834
+ getStorageKey(forceFetch: boolean): Promise<string|null> {
835
+ if (!this.#storageKeyInternal || forceFetch) {
832
836
  this.#storageKeyInternal = this.#model.storageKeyForFrame(this.#idInternal);
833
837
  }
834
838
  return this.#storageKeyInternal;
@@ -1266,6 +1266,10 @@ export class NavigatorSourceTreeElement extends UI.TreeOutline.TreeElement {
1266
1266
  }
1267
1267
  }
1268
1268
 
1269
+ updateAccessibleName(): void {
1270
+ UI.ARIAUtils.setAccessibleName(this.listItemElement, `${this.uiSourceCodeInternal.name()}, ${this.nodeType}`);
1271
+ }
1272
+
1269
1273
  get uiSourceCode(): Workspace.UISourceCode.UISourceCode {
1270
1274
  return this.uiSourceCodeInternal;
1271
1275
  }
@@ -1523,6 +1527,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
1523
1527
  tooltip = i18nString(UIStrings.sFromSourceMap, {PH1: this.uiSourceCodeInternal.displayName()});
1524
1528
  }
1525
1529
  this.treeElement.tooltip = tooltip;
1530
+ this.treeElement.updateAccessibleName();
1526
1531
 
1527
1532
  this.parent?.childrenInternal.delete(this.id);
1528
1533
  this.id = 'UISourceCode:' + this.uiSourceCodeInternal.canononicalScriptId();
@@ -100,7 +100,7 @@ export async function getPuppeteerConnection(
100
100
  );
101
101
 
102
102
  const [, browser] = await Promise.all([
103
- connection.createSession({ targetId: mainTargetId }),
103
+ connection._createSession({targetId: mainTargetId}, /* emulateAutoAttach=*/ true),
104
104
  browserPromise,
105
105
  ]);
106
106
 
package/package.json CHANGED
@@ -56,5 +56,5 @@
56
56
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
57
57
  "watch": "vpython third_party/node/node.py --output scripts/watch_build.js"
58
58
  },
59
- "version": "1.0.1038113"
59
+ "version": "1.0.1038685"
60
60
  }