chrome-devtools-frontend 1.0.1625079 → 1.0.1626437

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.
Files changed (190) hide show
  1. package/front_end/core/common/VersionController.ts +9 -7
  2. package/front_end/core/common/common.ts +0 -4
  3. package/front_end/core/host/AidaClient.ts +1 -1
  4. package/front_end/core/host/AidaClientTypes.ts +2 -0
  5. package/front_end/core/host/AidaGcaTranslation.ts +2 -2
  6. package/front_end/core/host/Platform.ts +0 -9
  7. package/front_end/core/host/UserMetrics.ts +0 -55
  8. package/front_end/core/root/ExperimentNames.ts +0 -1
  9. package/front_end/core/sdk/CPUThrottlingManager.ts +1 -1
  10. package/front_end/core/sdk/CSSMetadata.ts +60 -63
  11. package/front_end/core/sdk/CSSProperty.ts +1 -5
  12. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -32
  13. package/front_end/{panels/application → core/sdk}/DOMStorageModel.ts +12 -10
  14. package/front_end/core/sdk/sdk.ts +2 -0
  15. package/front_end/entrypoints/main/MainImpl.ts +12 -8
  16. package/front_end/entrypoints/main/SimpleApp.ts +3 -4
  17. package/front_end/entrypoints/main/main-meta.ts +1 -1
  18. package/front_end/generated/InspectorBackendCommands.ts +3 -3
  19. package/front_end/generated/SupportedCSSProperties.js +21 -21
  20. package/front_end/generated/protocol.ts +4 -1
  21. package/front_end/models/ai_assistance/StorageItem.ts +16 -0
  22. package/front_end/models/ai_assistance/agents/StorageAgent.ts +82 -0
  23. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  24. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +9 -37
  25. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +26 -3
  26. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +10 -2
  27. package/front_end/models/ai_code_generation/AiCodeGeneration.ts +5 -1
  28. package/front_end/models/issues_manager/CookieIssue.ts +0 -4
  29. package/front_end/models/issues_manager/RelatedIssue.ts +0 -14
  30. package/front_end/models/javascript_metadata/NativeFunctions.js +0 -4
  31. package/front_end/models/web_mcp/WebMCPModel.ts +11 -2
  32. package/front_end/models/workspace/IgnoreListManager.ts +1 -1
  33. package/front_end/models/workspace/UISourceCode.ts +10 -5
  34. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +6 -1
  35. package/front_end/panels/ai_assistance/components/ChatMessage.ts +26 -9
  36. package/front_end/panels/application/ApplicationPanelSidebar.ts +32 -42
  37. package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
  38. package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
  39. package/front_end/panels/application/DOMStorageItemsView.ts +18 -13
  40. package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
  41. package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
  42. package/front_end/panels/application/ResourcesPanel.ts +1 -2
  43. package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -2
  44. package/front_end/panels/application/StorageView.ts +1 -2
  45. package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
  46. package/front_end/panels/application/WebMCPTreeElement.ts +2 -2
  47. package/front_end/panels/application/WebMCPView.ts +74 -16
  48. package/front_end/panels/application/application.ts +0 -2
  49. package/front_end/panels/application/webMCPView.css +13 -2
  50. package/front_end/panels/console/ConsolePrompt.ts +1 -1
  51. package/front_end/panels/console/ConsoleView.ts +3 -4
  52. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -152
  53. package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
  54. package/front_end/panels/elements/StandaloneStylesContainer.ts +3 -0
  55. package/front_end/panels/elements/StylePropertiesSection.ts +0 -61
  56. package/front_end/panels/elements/StylePropertyTreeElement.ts +36 -23
  57. package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -4
  58. package/front_end/panels/elements/StylesContainer.ts +1 -0
  59. package/front_end/panels/elements/StylesSidebarPane.ts +12 -7
  60. package/front_end/panels/elements/stylesSidebarPane.css +0 -8
  61. package/front_end/panels/emulation/AdvancedApp.ts +3 -3
  62. package/front_end/panels/emulation/DeviceModeToolbar.ts +207 -377
  63. package/front_end/panels/emulation/emulation-meta.ts +1 -1
  64. package/front_end/panels/network/NetworkPanel.ts +1 -1
  65. package/front_end/panels/profiler/HeapProfilerPanel.ts +1 -2
  66. package/front_end/panels/screencast/ScreencastApp.ts +3 -3
  67. package/front_end/panels/screencast/screencast-meta.ts +1 -2
  68. package/front_end/panels/settings/SettingsScreen.ts +2 -2
  69. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -4
  70. package/front_end/panels/sources/ScopeChainSidebarPane.ts +5 -1
  71. package/front_end/panels/sources/SourcesNavigator.ts +1 -1
  72. package/front_end/panels/sources/UISourceCodeFrame.ts +1 -3
  73. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +179 -145
  74. package/front_end/panels/timeline/TimelinePanel.ts +2 -2
  75. package/front_end/panels/timeline/timelineTreeView.css +2 -2
  76. package/front_end/third_party/chromium/README.chromium +1 -1
  77. package/front_end/third_party/puppeteer/README.chromium +2 -2
  78. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
  79. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +3 -2
  80. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
  81. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +53 -23
  82. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -2
  84. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +18 -8
  86. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +4 -0
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +54 -19
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts +5 -0
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js +2 -9
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +3 -0
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +37 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -2
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +1 -0
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +47 -65
  119. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +143 -55
  120. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
  121. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +3 -2
  122. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +53 -23
  124. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -2
  126. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +18 -8
  128. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
  131. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +4 -0
  134. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +54 -19
  138. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts +5 -0
  140. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js +2 -9
  142. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -0
  145. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +37 -1
  147. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -2
  150. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +1 -0
  153. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  155. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  156. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/types.d.ts +47 -65
  159. package/front_end/third_party/puppeteer/package/package.json +6 -6
  160. package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
  161. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +69 -27
  162. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +27 -8
  163. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -2
  164. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +6 -0
  165. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +60 -18
  166. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -9
  167. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +3 -0
  168. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +37 -1
  169. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -2
  170. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +1 -0
  171. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  172. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  173. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +19 -14
  174. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -7
  175. package/front_end/ui/components/tooltips/Tooltip.ts +3 -3
  176. package/front_end/{core/common → ui/legacy}/AppProvider.ts +1 -1
  177. package/front_end/ui/legacy/InspectorView.ts +4 -3
  178. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  179. package/front_end/ui/legacy/UIUserMetrics.ts +70 -0
  180. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -8
  181. package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +0 -6
  182. package/front_end/ui/legacy/legacy.ts +6 -0
  183. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  184. package/package.json +1 -1
  185. package/front_end/Images/src/custom-typography.svg +0 -3
  186. package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +0 -798
  187. package/front_end/ui/legacy/components/inline_editor/FontEditorUnitConverter.ts +0 -250
  188. package/front_end/ui/legacy/components/inline_editor/FontEditorUtils.ts +0 -204
  189. package/front_end/ui/legacy/components/inline_editor/fontEditor.css +0 -185
  190. /package/front_end/{core/common → ui/legacy}/App.ts +0 -0
@@ -247,12 +247,13 @@ export class VersionController {
247
247
 
248
248
  updateVersionFrom9To10(): void {
249
249
  // This one is localStorage specific, which is fine.
250
- if (!window.localStorage) {
250
+ const localStorage = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage();
251
+ if (!localStorage) {
251
252
  return;
252
253
  }
253
- for (const key in window.localStorage) {
254
+ for (const key in localStorage) {
254
255
  if (key.startsWith('revision-history')) {
255
- window.localStorage.removeItem(key);
256
+ localStorage.removeItem(key);
256
257
  }
257
258
  }
258
259
  }
@@ -888,16 +889,17 @@ export class VersionController {
888
889
  'workspaceExcludedFolders',
889
890
  'xhrBreakpoints',
890
891
  ]);
891
- if (!window.localStorage) {
892
+ const localStorage = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage();
893
+ if (!localStorage) {
892
894
  return;
893
895
  }
894
896
 
895
- for (const key in window.localStorage) {
897
+ for (const key in localStorage) {
896
898
  if (localSettings.has(key)) {
897
899
  continue;
898
900
  }
899
- const value = window.localStorage[key];
900
- window.localStorage.removeItem(key);
901
+ const value = localStorage[key];
902
+ localStorage.removeItem(key);
901
903
  this.#settings.globalStorage.set(key, value);
902
904
  }
903
905
  }
@@ -2,8 +2,6 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import * as App from './App.js';
6
- import * as AppProvider from './AppProvider.js';
7
5
  import * as Base64 from './Base64.js';
8
6
  import * as CharacterIdMap from './CharacterIdMap.js';
9
7
  import * as Color from './Color.js';
@@ -43,8 +41,6 @@ import * as VersionController from './VersionController.js';
43
41
  */
44
42
  export {UIString} from '../platform/platform.js';
45
43
  export {
46
- App,
47
- AppProvider,
48
44
  Base64,
49
45
  CharacterIdMap,
50
46
  Color,
@@ -250,7 +250,7 @@ export class AidaClient {
250
250
  } else if ('error' in result) {
251
251
  throw new Error(`Server responded: ${JSON.stringify(result)}`);
252
252
  } else {
253
- throw new Error('Unknown chunk result');
253
+ throw new Error(`Unknown chunk result ${JSON.stringify(result)}`);
254
254
  }
255
255
  }
256
256
  if (textUpdated) {
@@ -133,6 +133,8 @@ export enum ClientFeature {
133
133
  CHROME_ACCESSIBILITY_AGENT = 26,
134
134
  // Chrome AI Assistance Conversation Summary Agent.
135
135
  CHROME_CONVERSATION_SUMMARY_AGENT = 27,
136
+ // Chrome AI Assistance Storage Agent.
137
+ CHROME_STORAGE_AGENT = 28,
136
138
  }
137
139
 
138
140
  export enum UserTier {
@@ -468,9 +468,9 @@ export function gcaChunkResponseToAidaChunkResponse(response: GCA.GenerateConten
468
468
  })),
469
469
  };
470
470
  }
471
- const chunks: AIDA.AidaChunkResponse[] = (parts).map(part => {
471
+ const chunks: AIDA.AidaChunkResponse[] = parts.map(part => {
472
472
  const aidaChunkResponse: AIDA.AidaChunkResponse = {metadata};
473
- if (part.text) {
473
+ if (part.text !== undefined) {
474
474
  aidaChunkResponse.textChunk = {
475
475
  text: extractTextFromGcaParts(parts),
476
476
  };
@@ -46,15 +46,6 @@ export function setPlatformForTests(platform: string): void {
46
46
  _isWin = undefined;
47
47
  }
48
48
 
49
- let _isCustomDevtoolsFrontend: boolean;
50
-
51
- export function isCustomDevtoolsFrontend(): boolean {
52
- if (typeof _isCustomDevtoolsFrontend === 'undefined') {
53
- _isCustomDevtoolsFrontend = window.location.toString().startsWith('devtools://devtools/custom/');
54
- }
55
- return _isCustomDevtoolsFrontend;
56
- }
57
-
58
49
  let _fontFamily: string;
59
50
 
60
51
  export function fontFamily(): string {
@@ -6,28 +6,6 @@ import {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';
6
6
  import {EnumeratedHistogram} from './InspectorFrontendHostAPI.js';
7
7
 
8
8
  export class UserMetrics {
9
- #panelChangedSinceLaunch: boolean;
10
- #firedLaunchHistogram: boolean;
11
- #launchPanelName: string;
12
- constructor() {
13
- this.#panelChangedSinceLaunch = false;
14
- this.#firedLaunchHistogram = false;
15
- this.#launchPanelName = '';
16
- }
17
-
18
- panelShown(panelName: string, isLaunching?: boolean): void {
19
- const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;
20
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MAX_VALUE);
21
- InspectorFrontendHostInstance.recordUserMetricsAction('DevTools_PanelShown_' + panelName);
22
- // Store that the user has changed the panel so we know launch histograms should not be fired.
23
- if (!isLaunching) {
24
- this.#panelChangedSinceLaunch = true;
25
- }
26
- }
27
-
28
- settingsPanelShown(settingsViewId: string): void {
29
- this.panelShown('settings-' + settingsViewId);
30
- }
31
9
 
32
10
  sourcesPanelFileDebugged(mediaType?: string): void {
33
11
  const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;
@@ -51,38 +29,6 @@ export class UserMetrics {
51
29
  InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MAX_VALUE);
52
30
  }
53
31
 
54
- panelLoaded(panelName: string, histogramName: string): void {
55
- if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {
56
- return;
57
- }
58
-
59
- this.#firedLaunchHistogram = true;
60
- // Use rAF and window.setTimeout to ensure the marker is fired after layout and rendering.
61
- // This will give the most accurate representation of the tool being ready for a user.
62
- requestAnimationFrame(() => {
63
- window.setTimeout(() => {
64
- // Mark the load time so that we can pinpoint it more easily in a trace.
65
- performance.mark(histogramName);
66
- // If the user has switched panel before we finished loading, ignore the histogram,
67
- // since the launch timings will have been affected and are no longer valid.
68
- if (this.#panelChangedSinceLaunch) {
69
- return;
70
- }
71
- // This fires the event for the appropriate launch histogram.
72
- // The duration is measured as the time elapsed since the time origin of the document.
73
- InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());
74
- }, 0);
75
- });
76
- }
77
-
78
- setLaunchPanel(panelName: string|null): void {
79
- this.#launchPanelName = (panelName as string);
80
- }
81
-
82
- performanceTraceLoad(measure: PerformanceMeasure): void {
83
- InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.TraceLoad', measure.duration);
84
- }
85
-
86
32
  keybindSetSettingChanged(keybindSet: string): void {
87
33
  const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;
88
34
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
@@ -815,7 +761,6 @@ export enum DevtoolsExperiments {
815
761
  'live-heap-profile' = 11,
816
762
  'protocol-monitor' = 13,
817
763
  'timeline-invalidation-tracking' = 26,
818
- 'font-editor' = 41,
819
764
  'instrumentation-breakpoints' = 61,
820
765
  'use-source-map-scopes' = 76,
821
766
  'timeline-debug-mode' = 93,
@@ -8,7 +8,6 @@ export enum ExperimentName {
8
8
  LIVE_HEAP_PROFILE = 'live-heap-profile',
9
9
  PROTOCOL_MONITOR = 'protocol-monitor',
10
10
  TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
11
- FONT_EDITOR = 'font-editor',
12
11
  INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
13
12
  USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
14
13
  TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
@@ -45,7 +45,7 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
45
45
  #hardwareConcurrency?: number;
46
46
  #pendingMainTargetPromise?: (r: number) => void;
47
47
 
48
- private constructor(settings: Common.Settings.Settings, targetManager: TargetManager) {
48
+ constructor(settings: Common.Settings.Settings, targetManager: TargetManager) {
49
49
  super();
50
50
  this.#targetManager = targetManager;
51
51
  this.#cpuThrottlingOption = NoThrottlingOption;
@@ -233,11 +233,6 @@ export class CSSMetadata {
233
233
  return bezierAwareProperties.has(propertyName) || this.isCustomProperty(propertyName);
234
234
  }
235
235
 
236
- isFontAwareProperty(propertyName: string): boolean {
237
- propertyName = propertyName.toLowerCase();
238
- return fontAwareProperties.has(propertyName) || this.isCustomProperty(propertyName);
239
- }
240
-
241
236
  isCustomProperty(propertyName: string): boolean {
242
237
  return propertyName.startsWith('--');
243
238
  }
@@ -532,9 +527,6 @@ const bezierAwareProperties = new Set<string>([
532
527
  '-webkit-transition-timing-function',
533
528
  ]);
534
529
 
535
- const fontAwareProperties =
536
- new Set<string>(['font-size', 'line-height', 'font-weight', 'font-family', 'letter-spacing']);
537
-
538
530
  const colorAwareProperties = new Set<string>([
539
531
  'accent-color',
540
532
  'background',
@@ -642,6 +634,64 @@ const textEmphasisStyle = new Set([
642
634
  '"❤️"', // <string>
643
635
  ]);
644
636
 
637
+ const listStyleTypeValues = new Set([
638
+ 'disc',
639
+ 'circle',
640
+ 'square',
641
+ 'decimal',
642
+ 'decimal-leading-zero',
643
+ 'arabic-indic',
644
+ 'bengali',
645
+ 'cambodian',
646
+ 'khmer',
647
+ 'devanagari',
648
+ 'gujarati',
649
+ 'gurmukhi',
650
+ 'kannada',
651
+ 'lao',
652
+ 'malayalam',
653
+ 'mongolian',
654
+ 'myanmar',
655
+ 'oriya',
656
+ 'persian',
657
+ 'urdu',
658
+ 'telugu',
659
+ 'tibetan',
660
+ 'thai',
661
+ 'lower-roman',
662
+ 'upper-roman',
663
+ 'lower-greek',
664
+ 'lower-alpha',
665
+ 'lower-latin',
666
+ 'upper-alpha',
667
+ 'upper-latin',
668
+ 'cjk-earthly-branch',
669
+ 'cjk-heavenly-stem',
670
+ 'ethiopic-halehame',
671
+ 'ethiopic-halehame-am',
672
+ 'ethiopic-halehame-ti-er',
673
+ 'ethiopic-halehame-ti-et',
674
+ 'hangul',
675
+ 'hangul-consonant',
676
+ 'korean-hangul-formal',
677
+ 'korean-hanja-formal',
678
+ 'korean-hanja-informal',
679
+ 'hebrew',
680
+ 'armenian',
681
+ 'lower-armenian',
682
+ 'upper-armenian',
683
+ 'georgian',
684
+ 'cjk-ideographic',
685
+ 'simp-chinese-formal',
686
+ 'simp-chinese-informal',
687
+ 'trad-chinese-formal',
688
+ 'trad-chinese-informal',
689
+ 'hiragana',
690
+ 'katakana',
691
+ 'hiragana-iroha',
692
+ 'katakana-iroha',
693
+ ]);
694
+
645
695
  // manually maintained list of property #values to add into autocomplete list
646
696
  const extraPropertyValues = new Map<string, Set<string>>([
647
697
  ['background-repeat', new Set(['repeat', 'repeat-x', 'repeat-y', 'no-repeat', 'space', 'round'])],
@@ -1119,63 +1169,10 @@ const extraPropertyValues = new Map<string, Set<string>>([
1119
1169
  new Set([
1120
1170
  'outside',
1121
1171
  'inside',
1122
- 'disc',
1123
- 'circle',
1124
- 'square',
1125
- 'decimal',
1126
- 'decimal-leading-zero',
1127
- 'arabic-indic',
1128
- 'bengali',
1129
- 'cambodian',
1130
- 'khmer',
1131
- 'devanagari',
1132
- 'gujarati',
1133
- 'gurmukhi',
1134
- 'kannada',
1135
- 'lao',
1136
- 'malayalam',
1137
- 'mongolian',
1138
- 'myanmar',
1139
- 'oriya',
1140
- 'persian',
1141
- 'urdu',
1142
- 'telugu',
1143
- 'tibetan',
1144
- 'thai',
1145
- 'lower-roman',
1146
- 'upper-roman',
1147
- 'lower-greek',
1148
- 'lower-alpha',
1149
- 'lower-latin',
1150
- 'upper-alpha',
1151
- 'upper-latin',
1152
- 'cjk-earthly-branch',
1153
- 'cjk-heavenly-stem',
1154
- 'ethiopic-halehame',
1155
- 'ethiopic-halehame-am',
1156
- 'ethiopic-halehame-ti-er',
1157
- 'ethiopic-halehame-ti-et',
1158
- 'hangul',
1159
- 'hangul-consonant',
1160
- 'korean-hangul-formal',
1161
- 'korean-hanja-formal',
1162
- 'korean-hanja-informal',
1163
- 'hebrew',
1164
- 'armenian',
1165
- 'lower-armenian',
1166
- 'upper-armenian',
1167
- 'georgian',
1168
- 'cjk-ideographic',
1169
- 'simp-chinese-formal',
1170
- 'simp-chinese-informal',
1171
- 'trad-chinese-formal',
1172
- 'trad-chinese-informal',
1173
- 'hiragana',
1174
- 'katakana',
1175
- 'hiragana-iroha',
1176
- 'katakana-iroha',
1172
+ ...listStyleTypeValues,
1177
1173
  ]),
1178
1174
  ],
1175
+ ['list-style-type', listStyleTypeValues],
1179
1176
  ['max-block-size', new Set(['-webkit-fill-available', 'min-content', 'max-content', 'fit-content'])],
1180
1177
  ['max-inline-size', new Set(['-webkit-fill-available', 'min-content', 'max-content', 'fit-content'])],
1181
1178
  ['min-block-size', new Set(['-webkit-fill-available', 'min-content', 'max-content', 'fit-content'])],
@@ -7,7 +7,6 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
7
7
  import * as Common from '../common/common.js';
8
8
  import * as HostModule from '../host/host.js';
9
9
  import * as Platform from '../platform/platform.js';
10
- import * as Root from '../root/root.js';
11
10
 
12
11
  import type {CSSMatchedStyles} from './CSSMatchedStyles.js';
13
12
  import {cssMetadata, GridAreaRowRegex} from './CSSMetadata.js';
@@ -19,7 +18,7 @@ import {
19
18
  type Matcher,
20
19
  stripComments
21
20
  } from './CSSPropertyParser.js';
22
- import {CSSWideKeywordMatcher, FontMatcher} from './CSSPropertyParserMatchers.js';
21
+ import {CSSWideKeywordMatcher} from './CSSPropertyParserMatchers.js';
23
22
  import type {CSSStyleDeclaration} from './CSSStyleDeclaration.js';
24
23
 
25
24
  export const enum Events {
@@ -115,9 +114,6 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
115
114
  const matchers = matchedStyles.propertyMatchers(this.ownerStyle, computedStyles);
116
115
 
117
116
  matchers.push(new CSSWideKeywordMatcher(this, matchedStyles));
118
- if (Root.Runtime.experiments.isEnabled(Root.ExperimentNames.ExperimentName.FONT_EDITOR)) {
119
- matchers.push(new FontMatcher());
120
- }
121
117
  return matchers;
122
118
  }
123
119
 
@@ -739,8 +739,10 @@ export const enum LinkableNameProperties {
739
739
  ANIMATION = 'animation',
740
740
  ANIMATION_NAME = 'animation-name',
741
741
  FONT_PALETTE = 'font-palette',
742
- POSITION_TRY_FALLBACKS = 'position-try-fallbacks',
742
+ LIST_STYLE = 'list-style',
743
+ LIST_STYLE_TYPE = 'list-style-type',
743
744
  POSITION_TRY = 'position-try',
745
+ POSITION_TRY_FALLBACKS = 'position-try-fallbacks',
744
746
  }
745
747
 
746
748
  const enum AnimationLonghandPart {
@@ -765,8 +767,10 @@ export class LinkableNameMatcher extends matcherBase(LinkableNameMatch) {
765
767
  LinkableNameProperties.ANIMATION,
766
768
  LinkableNameProperties.ANIMATION_NAME,
767
769
  LinkableNameProperties.FONT_PALETTE,
768
- LinkableNameProperties.POSITION_TRY_FALLBACKS,
770
+ LinkableNameProperties.LIST_STYLE,
771
+ LinkableNameProperties.LIST_STYLE_TYPE,
769
772
  LinkableNameProperties.POSITION_TRY,
773
+ LinkableNameProperties.POSITION_TRY_FALLBACKS,
770
774
  ];
771
775
  return names.includes(propertyName);
772
776
  }
@@ -867,6 +871,11 @@ export class LinkableNameMatcher extends matcherBase(LinkableNameMatch) {
867
871
  return null;
868
872
  }
869
873
 
874
+ // If it is a builtin keyword value, it is not linkable.
875
+ if (cssMetadata().getPropertyValues(propertyName).includes(text)) {
876
+ return null;
877
+ }
878
+
870
879
  if (propertyName === 'animation') {
871
880
  return this.matchAnimationNameInShorthand(node, matching);
872
881
  }
@@ -945,36 +954,6 @@ export class ShadowMatcher extends matcherBase(ShadowMatch) {
945
954
  }
946
955
  }
947
956
 
948
- export class FontMatch implements Match {
949
- constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode) {
950
- }
951
- }
952
-
953
- // clang-format off
954
- export class FontMatcher extends matcherBase(FontMatch) {
955
- // clang-format on
956
- override accepts(propertyName: string): boolean {
957
- return cssMetadata().isFontAwareProperty(propertyName);
958
- }
959
- override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): Match|null {
960
- if (node.name !== 'Declaration') {
961
- return null;
962
- }
963
- const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node));
964
- if (valueNodes.length === 0) {
965
- return null;
966
- }
967
- const validNodes = matching.ast.propertyName === 'font-family' ? ['ValueName', 'StringLiteral', 'Comment', ','] :
968
- ['Comment', 'ValueName', 'NumberLiteral'];
969
-
970
- if (valueNodes.some(node => !validNodes.includes(node.name))) {
971
- return null;
972
- }
973
- const valueText = matching.ast.textRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
974
- return new FontMatch(valueText, node);
975
- }
976
- }
977
-
978
957
  export class LengthMatch implements Match {
979
958
  constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode, readonly unit: string) {
980
959
  }
@@ -31,10 +31,13 @@
31
31
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
32
  */
33
33
 
34
- import * as Common from '../../core/common/common.js';
35
- import * as SDK from '../../core/sdk/sdk.js';
36
34
  import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
37
35
  import type * as Protocol from '../../generated/protocol.js';
36
+ import * as Common from '../common/common.js';
37
+
38
+ import {SDKModel} from './SDKModel.js';
39
+ import * as StorageKeyManager from './StorageKeyManager.js';
40
+ import {Capability, type Target} from './Target.js';
38
41
 
39
42
  export class DOMStorage extends Common.ObjectWrapper.ObjectWrapper<DOMStorage.EventTypes> {
40
43
  private readonly model: DOMStorageModel;
@@ -112,16 +115,16 @@ export namespace DOMStorage {
112
115
  }
113
116
  }
114
117
 
115
- export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
116
- readonly #storageKeyManager: SDK.StorageKeyManager.StorageKeyManager|null;
118
+ export class DOMStorageModel extends SDKModel<EventTypes> {
119
+ readonly #storageKeyManager: StorageKeyManager.StorageKeyManager|null;
117
120
  #storages: Record<string, DOMStorage>;
118
121
  readonly agent: ProtocolProxyApi.DOMStorageApi;
119
122
  private enabled?: boolean;
120
123
 
121
- constructor(target: SDK.Target.Target) {
124
+ constructor(target: Target) {
122
125
  super(target);
123
126
 
124
- this.#storageKeyManager = target.model(SDK.StorageKeyManager.StorageKeyManager);
127
+ this.#storageKeyManager = target.model(StorageKeyManager.StorageKeyManager);
125
128
  this.#storages = {};
126
129
  this.agent = target.domstorageAgent();
127
130
  }
@@ -133,10 +136,9 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
133
136
 
134
137
  this.target().registerDOMStorageDispatcher(new DOMStorageDispatcher(this));
135
138
  if (this.#storageKeyManager) {
139
+ this.#storageKeyManager.addEventListener(StorageKeyManager.Events.STORAGE_KEY_ADDED, this.storageKeyAdded, this);
136
140
  this.#storageKeyManager.addEventListener(
137
- SDK.StorageKeyManager.Events.STORAGE_KEY_ADDED, this.storageKeyAdded, this);
138
- this.#storageKeyManager.addEventListener(
139
- SDK.StorageKeyManager.Events.STORAGE_KEY_REMOVED, this.storageKeyRemoved, this);
141
+ StorageKeyManager.Events.STORAGE_KEY_REMOVED, this.storageKeyRemoved, this);
140
142
 
141
143
  for (const storageKey of this.#storageKeyManager.storageKeys()) {
142
144
  this.addStorageKey(storageKey);
@@ -250,7 +252,7 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
250
252
  }
251
253
  }
252
254
 
253
- SDK.SDKModel.SDKModel.register(DOMStorageModel, {capabilities: SDK.Target.Capability.DOM_STORAGE, autostart: false});
255
+ SDKModel.register(DOMStorageModel, {capabilities: Capability.DOM_STORAGE, autostart: false});
254
256
 
255
257
  export const enum Events {
256
258
  DOM_STORAGE_ADDED = 'DOMStorageAdded',
@@ -44,6 +44,7 @@ import * as CSSSupports from './CSSSupports.js';
44
44
  import * as DebuggerModel from './DebuggerModel.js';
45
45
  import * as DOMDebuggerModel from './DOMDebuggerModel.js';
46
46
  import * as DOMModel from './DOMModel.js';
47
+ import * as DOMStorageModel from './DOMStorageModel.js';
47
48
  import * as EmulationModel from './EmulationModel.js';
48
49
  import * as EnhancedTracesParser from './EnhancedTracesParser.js';
49
50
  import * as EventBreakpointsModel from './EventBreakpointsModel.js';
@@ -128,6 +129,7 @@ export {
128
129
  DebuggerModel,
129
130
  DOMDebuggerModel,
130
131
  DOMModel,
132
+ DOMStorageModel,
131
133
  EmulationModel,
132
134
  EnhancedTracesParser,
133
135
  EventBreakpointsModel,
@@ -149,6 +149,15 @@ const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
149
149
  clear: () => window.localStorage.clear(),
150
150
  };
151
151
 
152
+ let isCustomDevtoolsFrontendInternal: boolean;
153
+
154
+ function isCustomDevtoolsFrontend(): boolean {
155
+ if (typeof isCustomDevtoolsFrontendInternal === 'undefined') {
156
+ isCustomDevtoolsFrontendInternal = window.location.toString().startsWith('devtools://devtools/custom/');
157
+ }
158
+ return isCustomDevtoolsFrontendInternal;
159
+ }
160
+
152
161
  export class MainImpl {
153
162
  #readyForTestPromise = Promise.withResolvers<void>();
154
163
  #veStartPromise!: Promise<void>;
@@ -285,7 +294,7 @@ export class MainImpl {
285
294
  } {
286
295
  this.#initializeExperiments();
287
296
  let storagePrefix = '';
288
- if (Host.Platform.isCustomDevtoolsFrontend()) {
297
+ if (isCustomDevtoolsFrontend()) {
289
298
  storagePrefix = '__custom__';
290
299
  } else if (
291
300
  !Root.Runtime.Runtime.queryParam('can_dock') && Boolean(Root.Runtime.Runtime.queryParam('debugFrontend')) &&
@@ -370,11 +379,6 @@ export class MainImpl {
370
379
  Root.Runtime.experiments.register(
371
380
  Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
372
381
 
373
- // Font Editor
374
- Root.Runtime.experiments.register(
375
- Root.ExperimentNames.ExperimentName.FONT_EDITOR, 'New font editor in the Styles tab',
376
- 'https://developer.chrome.com/blog/new-in-devtools-89/#font');
377
-
378
382
  Root.Runtime.experiments.registerHostExperiment({
379
383
  name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
380
384
  title: 'Durable Messages',
@@ -563,7 +567,7 @@ export class MainImpl {
563
567
 
564
568
  MainImpl.timeEnd('Main._createAppUI');
565
569
 
566
- const appProvider = Common.AppProvider.getRegisteredAppProviders()[0];
570
+ const appProvider = UI.AppProvider.getRegisteredAppProviders()[0];
567
571
  if (!appProvider) {
568
572
  throw new Error('Unable to boot DevTools, as the appprovider is missing');
569
573
  }
@@ -572,7 +576,7 @@ export class MainImpl {
572
576
 
573
577
  async #showAppUI(appProvider: Object): Promise<void> {
574
578
  MainImpl.time('Main._showAppUI');
575
- const app = (appProvider as Common.AppProvider.AppProvider).createApp();
579
+ const app = (appProvider as UI.AppProvider.AppProvider).createApp();
576
580
  // It is important to kick controller lifetime after apps are instantiated.
577
581
  UI.DockController.DockController.instance().initialize();
578
582
  ThemeSupport.ThemeSupport.instance().fetchColorsAndApplyHostTheme();
@@ -2,10 +2,9 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import type * as Common from '../../core/common/common.js';
6
5
  import * as UI from '../../ui/legacy/legacy.js';
7
6
 
8
- export class SimpleApp implements Common.App.App {
7
+ export class SimpleApp implements UI.App.App {
9
8
  presentUI(document: Document): void {
10
9
  const rootView = new UI.RootView.RootView();
11
10
  UI.InspectorView.InspectorView.instance().show(rootView.element);
@@ -16,7 +15,7 @@ export class SimpleApp implements Common.App.App {
16
15
 
17
16
  let simpleAppProviderInstance: SimpleAppProvider;
18
17
 
19
- export class SimpleAppProvider implements Common.AppProvider.AppProvider {
18
+ export class SimpleAppProvider implements UI.AppProvider.AppProvider {
20
19
  static instance(opts: {
21
20
  forceNew: boolean|null,
22
21
  } = {forceNew: null}): SimpleAppProvider {
@@ -28,7 +27,7 @@ export class SimpleAppProvider implements Common.AppProvider.AppProvider {
28
27
  return simpleAppProviderInstance;
29
28
  }
30
29
 
31
- createApp(): Common.App.App {
30
+ createApp(): UI.App.App {
32
31
  return new SimpleApp();
33
32
  }
34
33
  }
@@ -946,7 +946,7 @@ UI.Toolbar.registerToolbarItem({
946
946
  location: UI.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,
947
947
  });
948
948
 
949
- Common.AppProvider.registerAppProvider({
949
+ UI.AppProvider.registerAppProvider({
950
950
  async loadAppProvider() {
951
951
  const Main = await loadMainModule();
952
952
  return Main.SimpleApp.SimpleAppProvider.instance();