chrome-devtools-frontend 1.0.1574367 → 1.0.1575635

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 (107) hide show
  1. package/.stylelintrc.json +1 -1
  2. package/AUTHORS +1 -0
  3. package/docs/contributing/settings-experiments-features.md +5 -2
  4. package/front_end/core/common/Settings.ts +1 -1
  5. package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -1
  6. package/front_end/core/host/InspectorFrontendHostStub.ts +10 -0
  7. package/front_end/core/host/UserMetrics.ts +15 -0
  8. package/front_end/core/root/Runtime.ts +119 -39
  9. package/front_end/core/sdk/CSSMatchedStyles.ts +27 -0
  10. package/front_end/entrypoints/main/MainImpl.ts +25 -7
  11. package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +3 -2
  12. package/front_end/generated/InspectorBackendCommands.ts +37 -0
  13. package/front_end/generated/protocol-mapping.d.ts +257 -0
  14. package/front_end/generated/protocol-proxy-api.d.ts +256 -0
  15. package/front_end/generated/protocol.ts +359 -0
  16. package/front_end/models/ai_assistance/AiConversation.ts +31 -10
  17. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -0
  18. package/front_end/models/ai_assistance/agents/AiAgent.ts +29 -5
  19. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +73 -0
  20. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +141 -0
  21. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +3 -3
  22. package/front_end/models/ai_assistance/agents/StylingAgent.ts +5 -4
  23. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  24. package/front_end/models/issues_manager/CorsIssue.ts +0 -3
  25. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -0
  26. package/front_end/models/live-metrics/LiveMetrics.ts +31 -51
  27. package/front_end/models/stack_trace/StackTrace.ts +41 -0
  28. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +72 -6
  29. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +1 -0
  30. package/front_end/panels/ai_assistance/components/ChatInput.ts +24 -2
  31. package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -4
  32. package/front_end/panels/ai_assistance/components/ChatView.ts +5 -6
  33. package/front_end/panels/ai_assistance/components/chatView.css +10 -0
  34. package/front_end/panels/application/StorageView.ts +3 -3
  35. package/front_end/panels/application/preloading/components/preloadingDisabledInfobar.css +1 -1
  36. package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +32 -16
  37. package/front_end/panels/common/aiCodeCompletionSummaryToolbar.css +1 -1
  38. package/front_end/panels/console/ConsoleContextSelector.ts +4 -3
  39. package/front_end/panels/console/ConsoleFormat.ts +31 -2
  40. package/front_end/panels/console/ConsoleInsightTeaser.ts +6 -1
  41. package/front_end/panels/elements/ElementsTreeElement.ts +46 -2
  42. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
  43. package/front_end/panels/elements/StylePropertyTreeElement.ts +63 -0
  44. package/front_end/panels/elements/StylesSidebarPane.ts +17 -2
  45. package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -0
  46. package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +3 -3
  47. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
  48. package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -6
  49. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +3 -2
  50. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -3
  51. package/front_end/panels/network/SignedExchangeInfoView.ts +3 -4
  52. package/front_end/panels/network/components/HeaderSectionRow.css +1 -1
  53. package/front_end/panels/recorder/components/RecordingView.ts +2 -2
  54. package/front_end/panels/recorder/components/recordingView.css +5 -0
  55. package/front_end/panels/security/SecurityPanelSidebar.ts +10 -9
  56. package/front_end/panels/settings/AISettingsTab.ts +2 -1
  57. package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -5
  58. package/front_end/panels/settings/SettingsScreen.ts +14 -9
  59. package/front_end/panels/settings/settings-meta.ts +1 -0
  60. package/front_end/panels/sources/CallStackSidebarPane.ts +10 -0
  61. package/front_end/panels/sources/DebuggerPlugin.ts +18 -12
  62. package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
  63. package/front_end/panels/sources/SourcesNavigator.ts +2 -2
  64. package/front_end/panels/sources/SourcesPanel.ts +6 -3
  65. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
  66. package/front_end/panels/sources/sources-meta.ts +2 -1
  67. package/front_end/panels/timeline/TimelinePanel.ts +2 -1
  68. package/front_end/panels/timeline/TimelineUIUtils.ts +2 -2
  69. package/front_end/panels/timeline/components/DetailsView.ts +7 -7
  70. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -2
  71. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
  72. package/front_end/panels/whats_new/ReleaseNoteText.ts +11 -11
  73. package/front_end/panels/whats_new/releaseNoteView.css +1 -1
  74. package/front_end/panels/whats_new/resources/WNDT.md +6 -6
  75. package/front_end/third_party/chromium/README.chromium +1 -1
  76. package/front_end/third_party/puppeteer/README.chromium +2 -2
  77. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  78. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +30 -25
  79. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  80. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  81. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  82. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  84. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +30 -21
  85. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  86. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +31 -26
  87. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  88. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  90. package/front_end/third_party/puppeteer/package/package.json +3 -3
  91. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +45 -44
  92. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  93. package/front_end/ui/components/buttons/Button.ts +2 -2
  94. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  95. package/front_end/ui/components/panel_feedback/panelFeedback.css +1 -1
  96. package/front_end/ui/kit/link/Link.ts +31 -0
  97. package/front_end/ui/legacy/LinkContextMenuProvider.ts +3 -5
  98. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +2 -2
  99. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +336 -250
  100. package/front_end/ui/legacy/inspectorCommon.css +0 -1
  101. package/front_end/ui/legacy/legacy.ts +0 -4
  102. package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
  103. package/front_end/ui/visual_logging/LoggingDriver.ts +10 -6
  104. package/mcp/HostBindings.ts +6 -0
  105. package/package.json +1 -1
  106. package/front_end/ui/legacy/XElement.ts +0 -41
  107. package/front_end/ui/legacy/XLink.ts +0 -128
@@ -494,7 +494,6 @@ select option {
494
494
  font: var(--sys-typescale-body4-regular);
495
495
  color: var(--sys-color-on-surface-subtle);
496
496
 
497
- > x-link,
498
497
  > devtools-link {
499
498
  white-space: nowrap;
500
499
  margin-left: var(--sys-size-3);
@@ -51,8 +51,6 @@ import * as UIUtils from './UIUtils.js';
51
51
  import * as View from './View.js';
52
52
  import * as ViewManager from './ViewManager.js';
53
53
  import * as Widget from './Widget.js';
54
- import * as XElement from './XElement.js';
55
- import * as XLink from './XLink.js';
56
54
  import * as ZoomManager from './ZoomManager.js';
57
55
 
58
56
  export {
@@ -105,7 +103,5 @@ export {
105
103
  View,
106
104
  ViewManager,
107
105
  Widget,
108
- XElement,
109
- XLink,
110
106
  ZoomManager
111
107
  };
@@ -1190,6 +1190,7 @@ export const knownContextValues = new Set([
1190
1190
  'dblclick',
1191
1191
  'de',
1192
1192
  'debug',
1193
+ 'debug-with-ai',
1193
1194
  'debugger',
1194
1195
  'debugger-paused',
1195
1196
  'debugger.breakpoint-input-window',
@@ -1387,6 +1388,7 @@ export const knownContextValues = new Set([
1387
1388
  'elements.capture-area-screenshot',
1388
1389
  'elements.color-mix-popover',
1389
1390
  'elements.copy-styles',
1391
+ 'elements.css-animation-hint',
1390
1392
  'elements.css-color-mix',
1391
1393
  'elements.css-hint',
1392
1394
  'elements.css-property-doc',
@@ -1426,6 +1428,7 @@ export const knownContextValues = new Set([
1426
1428
  'em',
1427
1429
  'emoji',
1428
1430
  'emptied',
1431
+ 'empty',
1429
1432
  'empty-cells',
1430
1433
  'empty-view',
1431
1434
  'emulate-auto-dark-mode',
@@ -1887,6 +1890,7 @@ export const knownContextValues = new Set([
1887
1890
  'identity',
1888
1891
  'ignore-this-retainer',
1889
1892
  'image',
1893
+ 'image-animation',
1890
1894
  'image-orientation',
1891
1895
  'image-rendering',
1892
1896
  'image-url',
@@ -345,22 +345,26 @@ async function onResizeOrIntersection(entries: ResizeObserverEntry[]|Intersectio
345
345
  if (!loggingState?.size) {
346
346
  continue;
347
347
  }
348
+ const resizeToOrFromZero =
349
+ overlap.width * overlap.height * loggingState.size.width * loggingState.size.height === 0;
348
350
 
349
- let hasPendingParent = false;
350
- for (const pendingElement of pendingResize.keys()) {
351
+ let suppressedByParentResize = false;
352
+ for (const [pendingElement, overlap] of pendingResize.entries()) {
351
353
  if (pendingElement === element) {
352
354
  continue;
353
355
  }
354
356
  const pendingState = getLoggingState(pendingElement);
355
- if (isAncestorOf(pendingState, loggingState)) {
356
- hasPendingParent = true;
357
+ const pendingResizeToOrFromZero =
358
+ overlap.width * overlap.height * (pendingState?.size?.width || 0) * (pendingState?.size?.height || 0) === 0;
359
+ if (isAncestorOf(pendingState, loggingState) && resizeToOrFromZero && pendingResizeToOrFromZero) {
360
+ suppressedByParentResize = true;
357
361
  break;
358
362
  }
359
- if (isAncestorOf(loggingState, pendingState)) {
363
+ if (isAncestorOf(loggingState, pendingState) && resizeToOrFromZero && pendingResizeToOrFromZero) {
360
364
  pendingResize.delete(pendingElement);
361
365
  }
362
366
  }
363
- if (hasPendingParent) {
367
+ if (suppressedByParentResize) {
364
368
  continue;
365
369
  }
366
370
  pendingResize.set(element, overlap);
@@ -180,6 +180,9 @@ export class McpHostBindings implements Host.InspectorFrontendHostAPI.InspectorF
180
180
  recordPerformanceHistogram(): void {
181
181
  }
182
182
 
183
+ recordPerformanceHistogramMedium(): void {
184
+ }
185
+
183
186
  recordUserMetricsAction(): void {
184
187
  }
185
188
 
@@ -307,4 +310,7 @@ export class McpHostBindings implements Host.InspectorFrontendHostAPI.InspectorF
307
310
 
308
311
  recordFunctionCall(): void {
309
312
  }
313
+
314
+ setChromeFlag(): void {
315
+ }
310
316
  }
package/package.json CHANGED
@@ -105,5 +105,5 @@
105
105
  "flat-cache": "6.1.12"
106
106
  }
107
107
  },
108
- "version": "1.0.1574367"
108
+ "version": "1.0.1575635"
109
109
  }
@@ -1,41 +0,0 @@
1
- // Copyright 2017 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- export class XElement extends HTMLElement {
6
- static get observedAttributes(): string[] {
7
- return [
8
- 'flex', 'padding', 'padding-top', 'padding-bottom', 'padding-left',
9
- 'padding-right', 'margin', 'margin-top', 'margin-bottom', 'margin-left',
10
- 'margin-right', 'overflow', 'overflow-x', 'overflow-y', 'font-size',
11
- 'color', 'background', 'background-color', 'border', 'border-top',
12
- 'border-bottom', 'border-left', 'border-right', 'max-width', 'max-height',
13
- ];
14
- }
15
-
16
- attributeChangedCallback(attr: string, _oldValue: string|null, newValue: string|null): void {
17
- if (attr === 'flex') {
18
- if (newValue === null) {
19
- this.style.removeProperty('flex');
20
- } else if (newValue === 'initial' || newValue === 'auto' || newValue === 'none' || newValue.indexOf(' ') !== -1) {
21
- this.style.setProperty('flex', newValue);
22
- } else {
23
- this.style.setProperty('flex', '0 0 ' + newValue);
24
- }
25
- return;
26
- }
27
- if (newValue === null) {
28
- this.style.removeProperty(attr);
29
- if (attr.startsWith('padding-') || attr.startsWith('margin-') || attr.startsWith('border-') ||
30
- attr.startsWith('background-') || attr.startsWith('overflow-')) {
31
- const shorthand = attr.substring(0, attr.indexOf('-'));
32
- const shorthandValue = this.getAttribute(shorthand);
33
- if (shorthandValue !== null) {
34
- this.style.setProperty(shorthand, shorthandValue);
35
- }
36
- }
37
- } else {
38
- this.style.setProperty(attr, newValue);
39
- }
40
- }
41
- }
@@ -1,128 +0,0 @@
1
- // Copyright 2017 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Platform from '../../core/platform/platform.js';
6
- import * as UIHelpers from '../helpers/helpers.js';
7
- import * as VisualLogging from '../visual_logging/visual_logging.js';
8
-
9
- import * as ARIAUtils from './ARIAUtils.js';
10
- import {html as xhtml} from './Fragment.js';
11
- import {Tooltip} from './Tooltip.js';
12
- import {
13
- MaxLengthForDisplayedURLs,
14
- } from './UIUtils.js';
15
- import {XElement} from './XElement.js';
16
-
17
- export class XLink extends XElement {
18
- #href: Platform.DevToolsPath.UrlString|null;
19
- private clickable: boolean;
20
- private readonly onClick: (arg0: Event) => void;
21
- private readonly onKeyDown: (arg0: KeyboardEvent) => void;
22
- static create(
23
- url: string, linkText?: string, className?: string, preventClick?: boolean, jsLogContext?: string,
24
- tabindex = '0'): HTMLElement {
25
- if (!linkText) {
26
- linkText = url;
27
- }
28
- className = className || '';
29
- // clang-format off
30
- // TODO(dgozman): migrate css from 'devtools-link' to 'x-link'.
31
- const element = xhtml `
32
- <x-link href='${url}' tabindex='${tabindex}' class='${className} devtools-link' ${preventClick ? 'no-click' : ''}
33
- jslog=${VisualLogging.link().track({click: true, keydown:'Enter|Space'}).context(jsLogContext)}>${Platform.StringUtilities.trimMiddle(linkText, MaxLengthForDisplayedURLs)}</x-link>`;
34
- // clang-format on
35
- return element as HTMLElement;
36
- }
37
-
38
- constructor() {
39
- super();
40
-
41
- this.style.setProperty('display', 'inline');
42
- ARIAUtils.markAsLink(this);
43
- this.setAttribute('tabindex', '0');
44
- this.setAttribute('target', '_blank');
45
- this.setAttribute('rel', 'noopener');
46
-
47
- this.#href = null;
48
- this.clickable = true;
49
-
50
- this.onClick = (event: Event) => {
51
- event.consume(true);
52
- if (this.#href) {
53
- UIHelpers.openInNewTab(this.#href);
54
- }
55
- };
56
- this.onKeyDown = (event: KeyboardEvent) => {
57
- if (Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {
58
- event.consume(true);
59
- if (this.#href) {
60
- UIHelpers.openInNewTab(this.#href);
61
- }
62
- }
63
- };
64
- }
65
-
66
- static override get observedAttributes(): string[] {
67
- // TODO(dgozman): should be super.observedAttributes, but it does not compile.
68
- return XElement.observedAttributes.concat(['href', 'no-click', 'title', 'tabindex']);
69
- }
70
-
71
- get href(): Platform.DevToolsPath.UrlString|null {
72
- return this.#href;
73
- }
74
-
75
- override attributeChangedCallback(attr: string, oldValue: string|null, newValue: string|null): void {
76
- if (attr === 'no-click') {
77
- this.clickable = !newValue;
78
- this.updateClick();
79
- return;
80
- }
81
-
82
- if (attr === 'href') {
83
- // For invalid or non-absolute URLs, `href` should remain `null`.
84
- if (!newValue) {
85
- newValue = '';
86
- }
87
- let href: Platform.DevToolsPath.UrlString|null = null;
88
- try {
89
- const url = new URL(newValue);
90
- if (url.protocol !== 'javascript:') {
91
- href = Platform.DevToolsPath.urlString`${url}`;
92
- }
93
- } catch {
94
- }
95
-
96
- this.#href = href;
97
- if (!this.hasAttribute('title')) {
98
- Tooltip.install(this, newValue);
99
- }
100
- this.updateClick();
101
- return;
102
- }
103
-
104
- if (attr === 'tabindex') {
105
- if (oldValue !== newValue) {
106
- this.setAttribute('tabindex', newValue || '0');
107
- }
108
- return;
109
- }
110
-
111
- super.attributeChangedCallback(attr, oldValue, newValue);
112
- }
113
-
114
- private updateClick(): void {
115
- if (this.#href !== null && this.clickable) {
116
- this.addEventListener('click', this.onClick, false);
117
- this.addEventListener('keydown', this.onKeyDown, false);
118
- this.style.setProperty('cursor', 'pointer');
119
- } else {
120
- this.removeEventListener('click', this.onClick, false);
121
- this.removeEventListener('keydown', this.onKeyDown, false);
122
- this.style.removeProperty('cursor');
123
- }
124
- }
125
- }
126
-
127
- // eslint-disable-next-line @devtools/enforce-custom-element-prefix
128
- customElements.define('x-link', XLink);