chrome-devtools-frontend 1.0.1534717 → 1.0.1536371

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 (95) hide show
  1. package/docs/contributing/images/issues-nearestslo.png +0 -0
  2. package/docs/contributing/issues.md +32 -58
  3. package/eslint.config.mjs +1 -0
  4. package/front_end/core/common/Console.ts +1 -8
  5. package/front_end/core/common/ParsedURL.ts +10 -20
  6. package/front_end/core/common/SegmentedRange.ts +1 -2
  7. package/front_end/core/common/StringOutputStream.ts +1 -4
  8. package/front_end/core/host/InspectorFrontendHost.ts +6 -0
  9. package/front_end/core/host/UserMetrics.ts +5 -1
  10. package/front_end/core/i18n/i18nImpl.ts +0 -24
  11. package/front_end/core/protocol_client/CDPConnection.ts +53 -5
  12. package/front_end/core/protocol_client/protocol_client.ts +2 -0
  13. package/front_end/core/sdk/AnimationModel.ts +1 -2
  14. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
  15. package/front_end/core/sdk/CSSModel.ts +1 -1
  16. package/front_end/core/sdk/CSSProperty.ts +3 -6
  17. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -4
  18. package/front_end/core/sdk/DebuggerModel.ts +1 -2
  19. package/front_end/core/sdk/EnhancedTracesParser.ts +4 -0
  20. package/front_end/core/sdk/SourceMap.ts +2 -3
  21. package/front_end/devtools_compatibility.js +32 -24
  22. package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +2 -1
  23. package/front_end/generated/InspectorBackendCommands.js +1 -2
  24. package/front_end/generated/SupportedCSSProperties.js +57 -0
  25. package/front_end/generated/protocol.ts +0 -27
  26. package/front_end/panels/accessibility/AccessibilityNodeView.ts +18 -17
  27. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -12
  28. package/front_end/panels/ai_assistance/PatchWidget.ts +39 -40
  29. package/front_end/panels/ai_assistance/components/ChatView.ts +5 -4
  30. package/front_end/panels/ai_assistance/components/ExploreWidget.ts +0 -2
  31. package/front_end/panels/application/AppManifestView.ts +7 -6
  32. package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -4
  33. package/front_end/panels/application/OpenedWindowDetailsView.ts +6 -6
  34. package/front_end/panels/application/StorageView.ts +9 -8
  35. package/front_end/panels/application/components/BackForwardCacheView.ts +333 -314
  36. package/front_end/panels/application/components/ProtocolHandlersView.ts +3 -2
  37. package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -1
  38. package/front_end/panels/autofill/AutofillView.ts +2 -3
  39. package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +8 -8
  40. package/front_end/panels/changes/CombinedDiffView.ts +13 -14
  41. package/front_end/panels/common/BadgeNotification.ts +2 -1
  42. package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
  43. package/front_end/panels/console/ConsoleInsightTeaser.ts +13 -2
  44. package/front_end/panels/console/ConsolePinPane.ts +12 -7
  45. package/front_end/panels/console/ConsoleView.ts +1 -0
  46. package/front_end/panels/console/consoleView.css +0 -1
  47. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +9 -9
  48. package/front_end/panels/elements/ComputedStyleWidget.ts +7 -7
  49. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
  50. package/front_end/panels/elements/EventListenersWidget.ts +9 -9
  51. package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -6
  52. package/front_end/panels/elements/PlatformFontsWidget.ts +5 -5
  53. package/front_end/panels/elements/PropertiesWidget.ts +8 -8
  54. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
  55. package/front_end/panels/layer_viewer/PaintProfilerView.ts +3 -3
  56. package/front_end/panels/network/RequestCookiesView.ts +2 -1
  57. package/front_end/panels/network/RequestTimingView.ts +2 -1
  58. package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -6
  59. package/front_end/panels/recorder/RecorderController.ts +34 -23
  60. package/front_end/panels/recorder/components/CreateRecordingView.ts +249 -240
  61. package/front_end/panels/security/CookieControlsView.ts +74 -67
  62. package/front_end/panels/security/CookieReportView.ts +18 -16
  63. package/front_end/panels/security/IPProtectionView.ts +1 -2
  64. package/front_end/panels/security/SecurityPanel.ts +19 -19
  65. package/front_end/panels/settings/AISettingsTab.ts +2 -1
  66. package/front_end/panels/settings/KeybindsSettingsTab.ts +6 -0
  67. package/front_end/panels/settings/components/SyncSection.ts +2 -1
  68. package/front_end/panels/sources/DebuggerPausedMessage.ts +4 -3
  69. package/front_end/panels/sources/ResourceOriginPlugin.ts +3 -2
  70. package/front_end/panels/sources/SourcesNavigator.ts +2 -1
  71. package/front_end/panels/sources/TabbedEditorContainer.ts +3 -2
  72. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +9 -9
  73. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +36 -36
  74. package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
  75. package/front_end/panels/timeline/components/DetailsView.ts +5 -4
  76. package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
  77. package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -4
  78. package/front_end/panels/timeline/components/MetricCompareStrings.ts +25 -24
  79. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -2
  80. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -1
  81. package/front_end/third_party/chromium/README.chromium +1 -1
  82. package/front_end/ui/components/docs/tooltip/basic.ts +1 -1
  83. package/front_end/ui/components/tooltips/Tooltip.ts +32 -17
  84. package/front_end/ui/i18n/i18n.ts +31 -0
  85. package/front_end/ui/legacy/SoftDropDown.ts +1 -12
  86. package/front_end/ui/legacy/ViewManager.ts +2 -4
  87. package/front_end/ui/legacy/Widget.ts +33 -17
  88. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -1
  89. package/front_end/ui/legacy/legacy.ts +0 -2
  90. package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
  91. package/mcp/mcp.ts +1 -0
  92. package/package.json +1 -1
  93. package/front_end/ui/components/docs/recorder_create_recording_view/basic.html +0 -20
  94. package/front_end/ui/components/docs/recorder_create_recording_view/basic.ts +0 -27
  95. package/front_end/ui/legacy/ThrottledWidget.ts +0 -48
@@ -125,6 +125,14 @@ export class WidgetElement<WidgetT extends Widget> extends HTMLElement {
125
125
  widget.show(this.parentElement as HTMLElement, undefined, /* suppressOrphanWidgetError= */ true);
126
126
  }
127
127
 
128
+ disconnectedCallback(): void {
129
+ const widget = Widget.get(this);
130
+ if (widget) {
131
+ widget.setHideOnDetach();
132
+ widget.detach();
133
+ }
134
+ }
135
+
128
136
  override appendChild<T extends Node>(child: T): T {
129
137
  if (child instanceof HTMLElement && child.tagName !== 'STYLE') {
130
138
  Widget.getOrCreateWidget(child).show(this);
@@ -264,7 +272,6 @@ export class Widget {
264
272
  #notificationDepth = 0;
265
273
  #invalidationsSuspended = 0;
266
274
  #parentWidget: Widget|null = null;
267
- #defaultFocusedElement?: Element|null;
268
275
  #cachedConstraints?: Geometry.Constraints;
269
276
  #constraints?: Geometry.Constraints;
270
277
  #invalidationsRequested?: boolean;
@@ -724,7 +731,13 @@ export class Widget {
724
731
  }
725
732
 
726
733
  setDefaultFocusedElement(element: Element|null): void {
727
- this.#defaultFocusedElement = element;
734
+ const defaultFocusedElement = this.getDefaultFocusedElement();
735
+ if (defaultFocusedElement) {
736
+ defaultFocusedElement.removeAttribute('autofocus');
737
+ }
738
+ if (element) {
739
+ element.setAttribute('autofocus', '');
740
+ }
728
741
  }
729
742
 
730
743
  setDefaultFocusedChild(child: Widget): void {
@@ -732,21 +745,28 @@ export class Widget {
732
745
  this.defaultFocusedChild = child;
733
746
  }
734
747
 
735
- focus(): void {
736
- if (!this.isShowing()) {
737
- return;
748
+ getDefaultFocusedElement(): HTMLElement|null {
749
+ const autofocusElement = this.contentElement.hasAttribute('autofocus') ?
750
+ this.contentElement :
751
+ this.contentElement.querySelector<HTMLElement>('[autofocus]');
752
+ let widgetElement: Element|null = autofocusElement;
753
+ while (widgetElement) {
754
+ const widget = Widget.get(widgetElement);
755
+ if (widget) {
756
+ return widget === this ? autofocusElement : null;
757
+ }
758
+ widgetElement = widgetElement.parentElementOrShadowHost();
738
759
  }
760
+ return null;
761
+ }
739
762
 
740
- if (this.#shadowRoot?.delegatesFocus && this.contentElement.querySelector('[autofocus]')) {
741
- this.element.focus();
763
+ focus(): void {
764
+ if (!this.isShowing()) {
742
765
  return;
743
766
  }
744
-
745
- const element = (this.#defaultFocusedElement as HTMLElement | null);
746
- if (element) {
747
- if (!element.hasFocus()) {
748
- element.focus();
749
- }
767
+ const autofocusElement = this.getDefaultFocusedElement();
768
+ if (autofocusElement) {
769
+ autofocusElement.focus();
750
770
  return;
751
771
  }
752
772
 
@@ -759,10 +779,6 @@ export class Widget {
759
779
  return;
760
780
  }
761
781
  }
762
- let child = this.contentElement.traverseNextNode(this.contentElement);
763
- while (child) {
764
- child = child.traverseNextNode(this.contentElement);
765
- }
766
782
  }
767
783
  }
768
784
 
@@ -35,6 +35,7 @@ import * as i18n from '../../../../core/i18n/i18n.js';
35
35
  import * as Platform from '../../../../core/platform/platform.js';
36
36
  import * as SDK from '../../../../core/sdk/sdk.js';
37
37
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
38
+ import * as uiI18n from '../../../../ui/i18n/i18n.js';
38
39
  import * as IconButton from '../../../components/icon_button/icon_button.js';
39
40
  import * as TextEditor from '../../../components/text_editor/text_editor.js';
40
41
  import * as VisualLogging from '../../../visual_logging/visual_logging.js';
@@ -438,7 +439,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
438
439
  wrapperElement.classList.add('error');
439
440
  wrapperElement.classList.add('value');
440
441
  wrapperElement.appendChild(
441
- i18n.i18n.getFormatLocalizedString(str_, UIStrings.exceptionS, {PH1: propertyValue.element}));
442
+ uiI18n.getFormatLocalizedString(str_, UIStrings.exceptionS, {PH1: propertyValue.element}));
442
443
  propertyValue.element = wrapperElement;
443
444
  }
444
445
  propertyValue.element.classList.add('value');
@@ -42,7 +42,6 @@ import * as SuggestBox from './SuggestBox.js';
42
42
  import * as TabbedPane from './TabbedPane.js';
43
43
  import * as TargetCrashedScreen from './TargetCrashedScreen.js';
44
44
  import * as TextPrompt from './TextPrompt.js';
45
- import * as ThrottledWidget from './ThrottledWidget.js';
46
45
  import * as Toolbar from './Toolbar.js';
47
46
  import * as Tooltip from './Tooltip.js';
48
47
  import * as TreeOutline from './Treeoutline.js';
@@ -95,7 +94,6 @@ export {
95
94
  TabbedPane,
96
95
  TargetCrashedScreen,
97
96
  TextPrompt,
98
- ThrottledWidget,
99
97
  Toolbar,
100
98
  Tooltip,
101
99
  TreeOutline,
@@ -810,6 +810,7 @@ export const knownContextValues = new Set([
810
810
  'column-rule-color',
811
811
  'column-rule-outset',
812
812
  'column-rule-style',
813
+ 'column-rule-visibility-items',
813
814
  'column-rule-width',
814
815
  'column-span',
815
816
  'column-width',
@@ -848,6 +849,7 @@ export const knownContextValues = new Set([
848
849
  'console-group-similar-false',
849
850
  'console-history-autocomplete',
850
851
  'console-history-autocomplete-false',
852
+ 'console-insight-teaser',
851
853
  'console-insight-teasers-enabled',
852
854
  'console-insights',
853
855
  'console-insights-enabled',
@@ -3161,6 +3163,7 @@ export const knownContextValues = new Set([
3161
3163
  'row-rule-color',
3162
3164
  'row-rule-outset',
3163
3165
  'row-rule-style',
3166
+ 'row-rule-visibility-items',
3164
3167
  'row-rule-width',
3165
3168
  'rp-id',
3166
3169
  'rpId',
@@ -3685,6 +3688,7 @@ export const knownContextValues = new Set([
3685
3688
  'targets',
3686
3689
  'task-duration',
3687
3690
  'te',
3691
+ 'teaser-info-tooltip',
3688
3692
  'terms-of-service',
3689
3693
  'terms-of-service-accepted',
3690
3694
  'terms-of-service.console-insights',
@@ -3729,6 +3733,7 @@ export const knownContextValues = new Set([
3729
3733
  'text-emphasis-style',
3730
3734
  'text-grow',
3731
3735
  'text-indent',
3736
+ 'text-justify',
3732
3737
  'text-node',
3733
3738
  'text-orientation',
3734
3739
  'text-overflow',
package/mcp/mcp.ts CHANGED
@@ -2,6 +2,7 @@
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
+ export * as I18n from '../front_end/core/i18n/i18n.js';
5
6
  export {ConnectionTransport} from '../front_end/core/protocol_client/ConnectionTransport.js';
6
7
  export {
7
8
  PerformanceInsightFormatter
package/package.json CHANGED
@@ -102,5 +102,5 @@
102
102
  "flat-cache": "6.1.12"
103
103
  }
104
104
  },
105
- "version": "1.0.1534717"
105
+ "version": "1.0.1536371"
106
106
  }
@@ -1,20 +0,0 @@
1
- <!--
2
- Copyright 2023 The Chromium Authors
3
- Use of this source code is governed by a BSD-style license that can be
4
- found in the LICENSE file.
5
- -->
6
- <!DOCTYPE html>
7
- <html>
8
-
9
- <head>
10
- <meta charset="UTF-8" />
11
- <meta name="viewport" content="width=device-width" />
12
- <title>Recorder: CreateRecordingView</title>
13
- </head>
14
-
15
- <body>
16
- <div id="container"></div>
17
- <script src="./basic.js" type="module"></script>
18
- </body>
19
-
20
- </html>
@@ -1,27 +0,0 @@
1
- // Copyright 2023 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 ComponentHelpers from '../../../../../front_end/ui/components/helpers/helpers.js';
6
- import * as RecorderComponents from '../../../../panels/recorder/components/components.js';
7
- import * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';
8
-
9
- await ComponentHelpers.ComponentServerSetup.setup();
10
- await FrontendHelpers.initializeGlobalVars();
11
- async function initializeGlobalActions(): Promise<void> {
12
- const UI = await import('../../../../../front_end/ui/legacy/legacy.js');
13
- const actionRegistry = UI.ActionRegistry.ActionRegistry.instance();
14
- UI.ShortcutRegistry.ShortcutRegistry.instance({
15
- forceNew: true,
16
- actionRegistry,
17
- });
18
- }
19
-
20
- await initializeGlobalActions();
21
-
22
- const component1 = new RecorderComponents.CreateRecordingView.CreateRecordingView();
23
- document.getElementById('container')?.appendChild(component1);
24
-
25
- const component2 = new RecorderComponents.CreateRecordingView.CreateRecordingView();
26
- document.getElementById('container')?.appendChild(component2);
27
- component2.shadowRoot?.querySelector('devtools-control-button')?.click();
@@ -1,48 +0,0 @@
1
- // Copyright 2014 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 Common from '../../core/common/common.js';
6
-
7
- import {VBox} from './Widget.js';
8
-
9
- export class ThrottledWidget extends VBox {
10
- private readonly updateThrottler: Common.Throttler.Throttler;
11
- private updateWhenVisible: boolean;
12
- protected lastUpdatePromise: Promise<void> = Promise.resolve();
13
-
14
- constructor(useShadowDom?: boolean, timeout?: number) {
15
- super({useShadowDom});
16
- this.updateThrottler = new Common.Throttler.Throttler(timeout === undefined ? 100 : timeout);
17
- this.updateWhenVisible = false;
18
- }
19
-
20
- protected doUpdate(): Promise<void> {
21
- return Promise.resolve();
22
- }
23
-
24
- update(): void {
25
- this.updateWhenVisible = !this.isShowing();
26
- if (this.updateWhenVisible) {
27
- return;
28
- }
29
- this.lastUpdatePromise = this.updateThrottler.schedule(() => {
30
- if (this.isShowing()) {
31
- return this.doUpdate();
32
- }
33
- this.updateWhenVisible = true;
34
- return Promise.resolve();
35
- });
36
- }
37
-
38
- override get updateComplete(): Promise<boolean> {
39
- return this.updateThrottler.processCompleted?.then(result => Boolean(result)) || Promise.resolve(false);
40
- }
41
-
42
- override wasShown(): void {
43
- super.wasShown();
44
- if (this.updateWhenVisible) {
45
- this.update();
46
- }
47
- }
48
- }