chrome-devtools-frontend 1.0.1535712 → 1.0.1537268
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/docs/contributing/images/issues-nearestslo.png +0 -0
- package/docs/contributing/issues.md +17 -21
- package/front_end/core/common/Console.ts +1 -8
- package/front_end/core/common/ParsedURL.ts +10 -20
- package/front_end/core/common/SegmentedRange.ts +1 -2
- package/front_end/core/common/StringOutputStream.ts +1 -4
- package/front_end/core/host/AidaClient.ts +64 -5
- package/front_end/core/host/DispatchHttpRequestClient.ts +62 -0
- package/front_end/core/host/GdpClient.ts +8 -57
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/i18n/i18nImpl.ts +0 -24
- package/front_end/core/protocol_client/CDPConnection.ts +10 -8
- package/front_end/core/protocol_client/InspectorBackend.ts +36 -42
- package/front_end/core/sdk/AnimationModel.ts +1 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +3 -6
- package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -4
- package/front_end/core/sdk/DebuggerModel.ts +1 -2
- package/front_end/core/sdk/EnhancedTracesParser.ts +24 -5
- package/front_end/core/sdk/RehydratingConnection.ts +112 -4
- package/front_end/core/sdk/RehydratingObject.ts +8 -0
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/TraceObject.ts +5 -1
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +2 -1
- package/front_end/generated/InspectorBackendCommands.js +1 -2
- package/front_end/generated/SupportedCSSProperties.js +19 -0
- package/front_end/generated/protocol.ts +0 -27
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/trace/types/File.ts +9 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +18 -17
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -12
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -9
- package/front_end/panels/ai_assistance/components/ChatView.ts +63 -74
- package/front_end/panels/application/AppManifestView.ts +7 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -4
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -6
- package/front_end/panels/application/OpenedWindowDetailsView.ts +6 -6
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/components/BackForwardCacheView.ts +366 -342
- package/front_end/panels/application/components/FrameDetailsView.ts +8 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +65 -69
- package/front_end/panels/application/components/ProtocolHandlersView.ts +3 -2
- package/front_end/panels/application/components/backForwardCacheView.css +4 -0
- package/front_end/panels/application/components/badge.css +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +44 -53
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +8 -8
- package/front_end/panels/common/BadgeNotification.ts +2 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +8 -2
- package/front_end/panels/console/ConsolePinPane.ts +12 -7
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +9 -9
- package/front_end/panels/elements/ComputedStyleWidget.ts +7 -7
- package/front_end/panels/elements/EventListenersWidget.ts +9 -9
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -6
- package/front_end/panels/elements/PlatformFontsWidget.ts +5 -5
- package/front_end/panels/elements/PropertiesWidget.ts +8 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +2 -1
- package/front_end/panels/recorder/RecorderController.ts +33 -23
- package/front_end/panels/recorder/components/CreateRecordingView.ts +259 -226
- package/front_end/panels/security/CookieControlsView.ts +2 -1
- package/front_end/panels/security/CookieReportView.ts +3 -2
- package/front_end/panels/settings/AISettingsTab.ts +164 -172
- package/front_end/panels/settings/KeybindsSettingsTab.ts +6 -0
- package/front_end/panels/settings/SettingsScreen.ts +3 -7
- package/front_end/panels/settings/aiSettingsTab.css +151 -148
- package/front_end/panels/settings/components/SyncSection.ts +2 -1
- package/front_end/panels/settings/settings-meta.ts +1 -2
- package/front_end/panels/sources/AddSourceMapURLDialog.ts +23 -26
- package/front_end/panels/sources/DebuggerPausedMessage.ts +4 -3
- package/front_end/panels/sources/ResourceOriginPlugin.ts +3 -2
- package/front_end/panels/sources/SourcesNavigator.ts +2 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +9 -9
- package/front_end/panels/timeline/TimelinePanel.ts +60 -11
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
- package/front_end/panels/timeline/components/DetailsView.ts +5 -4
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +33 -34
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -4
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +25 -24
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -1
- package/front_end/third_party/chromium/README.chromium +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +28 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +28 -3
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +8 -5
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +5 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -2
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/util.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/docs/tooltip/basic.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +280 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +33 -18
- package/front_end/ui/i18n/i18n.ts +31 -0
- package/front_end/ui/legacy/Dialog.ts +0 -1
- package/front_end/ui/legacy/SettingsUI.ts +0 -14
- package/front_end/ui/legacy/SoftDropDown.ts +1 -12
- package/front_end/ui/legacy/ViewManager.ts +2 -4
- package/front_end/ui/legacy/Widget.ts +33 -17
- package/front_end/ui/legacy/XLink.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +9 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +9 -3
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -1
- package/mcp/mcp.ts +6 -0
- package/package.json +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +0 -4
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.ts +0 -25
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.ts +0 -36
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.ts +0 -27
- package/front_end/ui/legacy/ThrottledWidget.ts +0 -48
|
@@ -7,6 +7,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
10
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
12
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
12
13
|
|
|
@@ -626,65 +627,65 @@ export class AXNodeIgnoredReasonTreeElement extends AXNodePropertyTreeElement {
|
|
|
626
627
|
let reasonElement: Element|null = null;
|
|
627
628
|
switch (reason) {
|
|
628
629
|
case 'activeModalDialog':
|
|
629
|
-
reasonElement =
|
|
630
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsHiddenBy, {});
|
|
630
631
|
break;
|
|
631
632
|
case 'hiddenByChildTree':
|
|
632
|
-
reasonElement =
|
|
633
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsHiddenByChildTree, {});
|
|
633
634
|
break;
|
|
634
635
|
case 'ancestorIsLeafNode':
|
|
635
|
-
reasonElement =
|
|
636
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.ancestorChildrenAreAll, {});
|
|
636
637
|
break;
|
|
637
638
|
case 'ariaHiddenElement': {
|
|
638
639
|
const ariaHiddenSpan = document.createElement('span', {is: 'source-code'}).textContent = 'aria-hidden';
|
|
639
|
-
reasonElement =
|
|
640
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsPlaceholder, {PH1: ariaHiddenSpan});
|
|
640
641
|
break;
|
|
641
642
|
}
|
|
642
643
|
case 'ariaHiddenSubtree': {
|
|
643
644
|
const ariaHiddenSpan = document.createElement('span', {is: 'source-code'}).textContent = 'aria-hidden';
|
|
644
645
|
const trueSpan = document.createElement('span', {is: 'source-code'}).textContent = 'true';
|
|
645
|
-
reasonElement =
|
|
646
|
+
reasonElement = uiI18n.getFormatLocalizedString(
|
|
646
647
|
str_, UIStrings.placeholderIsPlaceholderOnAncestor, {PH1: ariaHiddenSpan, PH2: trueSpan});
|
|
647
648
|
break;
|
|
648
649
|
}
|
|
649
650
|
case 'emptyAlt':
|
|
650
|
-
reasonElement =
|
|
651
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementHasEmptyAltText, {});
|
|
651
652
|
break;
|
|
652
653
|
case 'emptyText':
|
|
653
|
-
reasonElement =
|
|
654
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.noTextContent, {});
|
|
654
655
|
break;
|
|
655
656
|
case 'inertElement':
|
|
656
|
-
reasonElement =
|
|
657
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsInert, {});
|
|
657
658
|
break;
|
|
658
659
|
case 'inertSubtree':
|
|
659
|
-
reasonElement =
|
|
660
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsInAnInertSubTree, {});
|
|
660
661
|
break;
|
|
661
662
|
case 'inheritsPresentation':
|
|
662
|
-
reasonElement =
|
|
663
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementsInheritsPresentational, {});
|
|
663
664
|
break;
|
|
664
665
|
case 'labelContainer':
|
|
665
|
-
reasonElement =
|
|
666
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.partOfLabelElement, {});
|
|
666
667
|
break;
|
|
667
668
|
case 'labelFor':
|
|
668
|
-
reasonElement =
|
|
669
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.labelFor, {});
|
|
669
670
|
break;
|
|
670
671
|
case 'notRendered':
|
|
671
|
-
reasonElement =
|
|
672
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsNotRendered, {});
|
|
672
673
|
break;
|
|
673
674
|
case 'notVisible':
|
|
674
|
-
reasonElement =
|
|
675
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsNotVisible, {});
|
|
675
676
|
break;
|
|
676
677
|
case 'presentationalRole': {
|
|
677
678
|
const role = axNode?.role()?.value || '';
|
|
678
679
|
const rolePresentationSpan = document.createElement('span', {is: 'source-code'}).textContent = 'role=' + role;
|
|
679
680
|
reasonElement =
|
|
680
|
-
|
|
681
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.elementHasPlaceholder, {PH1: rolePresentationSpan});
|
|
681
682
|
break;
|
|
682
683
|
}
|
|
683
684
|
case 'probablyPresentational':
|
|
684
|
-
reasonElement =
|
|
685
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementIsPresentational, {});
|
|
685
686
|
break;
|
|
686
687
|
case 'uninteresting':
|
|
687
|
-
reasonElement =
|
|
688
|
+
reasonElement = uiI18n.getFormatLocalizedString(str_, UIStrings.elementNotInteresting, {});
|
|
688
689
|
break;
|
|
689
690
|
}
|
|
690
691
|
if (reasonElement) {
|
|
@@ -15,7 +15,7 @@ import {SourceOrderPane} from './SourceOrderView.js';
|
|
|
15
15
|
|
|
16
16
|
let accessibilitySidebarViewInstance: AccessibilitySidebarView;
|
|
17
17
|
|
|
18
|
-
export class AccessibilitySidebarView extends UI.
|
|
18
|
+
export class AccessibilitySidebarView extends UI.Widget.VBox {
|
|
19
19
|
#node: SDK.DOMModel.DOMNode|null;
|
|
20
20
|
#axNode: SDK.AccessibilityModel.AccessibilityNode|null;
|
|
21
21
|
private skipNextPullNode: boolean;
|
|
@@ -24,8 +24,8 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
24
24
|
private readonly ariaSubPane: ARIAAttributesPane;
|
|
25
25
|
private readonly axNodeSubPane: AXNodeSubPane;
|
|
26
26
|
private readonly sourceOrderSubPane: SourceOrderPane;
|
|
27
|
-
private constructor(
|
|
28
|
-
super(
|
|
27
|
+
private constructor() {
|
|
28
|
+
super();
|
|
29
29
|
this.element.classList.add('accessibility-sidebar-view');
|
|
30
30
|
this.#node = null;
|
|
31
31
|
this.#axNode = null;
|
|
@@ -44,12 +44,9 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
44
44
|
this.pullNode();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
static instance(opts?: {
|
|
48
|
-
forceNew: boolean,
|
|
49
|
-
throttlingTimeout: number,
|
|
50
|
-
}): AccessibilitySidebarView {
|
|
47
|
+
static instance(opts?: {forceNew: boolean}): AccessibilitySidebarView {
|
|
51
48
|
if (!accessibilitySidebarViewInstance || opts?.forceNew) {
|
|
52
|
-
accessibilitySidebarViewInstance = new AccessibilitySidebarView(
|
|
49
|
+
accessibilitySidebarViewInstance = new AccessibilitySidebarView();
|
|
53
50
|
}
|
|
54
51
|
return accessibilitySidebarViewInstance;
|
|
55
52
|
}
|
|
@@ -65,7 +62,7 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
65
62
|
setNode(node: SDK.DOMModel.DOMNode|null, fromAXTree?: boolean): void {
|
|
66
63
|
this.skipNextPullNode = Boolean(fromAXTree);
|
|
67
64
|
this.#node = node;
|
|
68
|
-
this.
|
|
65
|
+
this.requestUpdate();
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
accessibilityNodeCallback(axNode: SDK.AccessibilityModel.AccessibilityNode|null): void {
|
|
@@ -85,7 +82,7 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
85
82
|
this.breadcrumbsSubPane.setAXNode(axNode);
|
|
86
83
|
}
|
|
87
84
|
|
|
88
|
-
override async
|
|
85
|
+
override async performUpdate(): Promise<void> {
|
|
89
86
|
const node = this.node();
|
|
90
87
|
this.axNodeSubPane.setNode(node);
|
|
91
88
|
this.ariaSubPane.setNode(node);
|
|
@@ -109,7 +106,7 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
109
106
|
super.wasShown();
|
|
110
107
|
|
|
111
108
|
// Pull down the latest date for this node.
|
|
112
|
-
void this.
|
|
109
|
+
void this.performUpdate();
|
|
113
110
|
|
|
114
111
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
115
112
|
SDK.DOMModel.DOMModel, SDK.DOMModel.Events.AttrModified, this.onNodeChange, this, {scoped: true});
|
|
@@ -152,6 +149,6 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
152
149
|
if (this.node() !== node) {
|
|
153
150
|
return;
|
|
154
151
|
}
|
|
155
|
-
this.
|
|
152
|
+
this.requestUpdate();
|
|
156
153
|
}
|
|
157
154
|
}
|
|
@@ -531,13 +531,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
531
531
|
#getChatUiState(): ChatViewState {
|
|
532
532
|
const blockedByAge = Root.Runtime.hostConfig.aidaAvailability?.blockedByAge === true;
|
|
533
533
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
return ChatViewState.
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
if (!this.#aiAssistanceEnabledSetting?.getIfNotDisabled() || blockedByAge) {
|
|
540
|
-
return ChatViewState.CONSENT_VIEW;
|
|
534
|
+
if (this.#aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE ||
|
|
535
|
+
!this.#aiAssistanceEnabledSetting?.getIfNotDisabled() || blockedByAge) {
|
|
536
|
+
return ChatViewState.DISABLED_VIEW;
|
|
541
537
|
}
|
|
542
538
|
|
|
543
539
|
if (this.#conversation?.type) {
|
|
@@ -986,7 +982,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
986
982
|
|
|
987
983
|
#getChatInputPlaceholder(): Platform.UIString.LocalizedString {
|
|
988
984
|
const state = this.#getChatUiState();
|
|
989
|
-
if (state === ChatViewState.
|
|
985
|
+
if (state === ChatViewState.DISABLED_VIEW || !this.#conversation) {
|
|
990
986
|
return i18nString(UIStrings.followTheSteps);
|
|
991
987
|
}
|
|
992
988
|
|
|
@@ -1019,7 +1015,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1019
1015
|
|
|
1020
1016
|
#getDisclaimerText(): Platform.UIString.LocalizedString {
|
|
1021
1017
|
const state = this.#getChatUiState();
|
|
1022
|
-
if (state === ChatViewState.
|
|
1018
|
+
if (state === ChatViewState.DISABLED_VIEW || !this.#conversation || this.#conversation.isReadOnly) {
|
|
1023
1019
|
return i18nString(UIStrings.inputDisclaimerForEmptyState);
|
|
1024
1020
|
}
|
|
1025
1021
|
|
|
@@ -19,6 +19,7 @@ import * as Marked from '../../../third_party/marked/marked.js';
|
|
|
19
19
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
20
20
|
import type * as MarkdownView from '../../../ui/components/markdown_view/markdown_view.js';
|
|
21
21
|
import type {MarkdownLitRenderer} from '../../../ui/components/markdown_view/MarkdownView.js';
|
|
22
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
22
23
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
23
24
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
24
25
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
@@ -203,10 +204,6 @@ const UIStringsNotTranslate = {
|
|
|
203
204
|
* @description Title for the add image button.
|
|
204
205
|
*/
|
|
205
206
|
addImageButtonTitle: 'Add image',
|
|
206
|
-
/**
|
|
207
|
-
* @description Disclaimer text right after the chat input.
|
|
208
|
-
*/
|
|
209
|
-
inputDisclaimerForEmptyState: 'This is an experimental AI feature and won\'t always get it right.',
|
|
210
207
|
} as const;
|
|
211
208
|
|
|
212
209
|
const str_ = i18n.i18n.registerUIStrings('panels/ai_assistance/components/ChatView.ts', UIStrings);
|
|
@@ -263,7 +260,7 @@ export interface ModelChatMessage {
|
|
|
263
260
|
export type ChatMessage = UserChatMessage|ModelChatMessage;
|
|
264
261
|
|
|
265
262
|
export const enum State {
|
|
266
|
-
|
|
263
|
+
DISABLED_VIEW = 'disabled-view',
|
|
267
264
|
CHAT_VIEW = 'chat-view',
|
|
268
265
|
EXPLORE_VIEW = 'explore-view'
|
|
269
266
|
}
|
|
@@ -516,6 +513,10 @@ export class ChatView extends HTMLElement {
|
|
|
516
513
|
|
|
517
514
|
#render(): void {
|
|
518
515
|
const renderFooter = (): Lit.LitTemplate => {
|
|
516
|
+
if (this.#props.state !== State.CHAT_VIEW) {
|
|
517
|
+
return Lit.nothing;
|
|
518
|
+
}
|
|
519
|
+
|
|
519
520
|
const classes = Lit.Directives.classMap({
|
|
520
521
|
'chat-view-footer': true,
|
|
521
522
|
'has-conversation': !!this.#props.conversationType,
|
|
@@ -523,35 +524,58 @@ export class ChatView extends HTMLElement {
|
|
|
523
524
|
});
|
|
524
525
|
|
|
525
526
|
// clang-format off
|
|
526
|
-
const footerContents = this.#props.conversationType
|
|
527
|
-
? renderRelevantDataDisclaimer({
|
|
528
|
-
isLoading: this.#props.isLoading,
|
|
529
|
-
blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
|
|
530
|
-
tooltipId: RELEVANT_DATA_LINK_FOOTER_ID,
|
|
531
|
-
disclaimerText: this.#props.disclaimerText,
|
|
532
|
-
})
|
|
533
|
-
: html`<p>
|
|
534
|
-
${lockedString(UIStringsNotTranslate.inputDisclaimerForEmptyState)}
|
|
535
|
-
<button
|
|
536
|
-
class="link"
|
|
537
|
-
role="link"
|
|
538
|
-
jslog=${VisualLogging.link('open-ai-settings').track({
|
|
539
|
-
click: true,
|
|
540
|
-
})}
|
|
541
|
-
@click=${() => {
|
|
542
|
-
void UI.ViewManager.ViewManager.instance().showView(
|
|
543
|
-
'chrome-ai',
|
|
544
|
-
);
|
|
545
|
-
}}
|
|
546
|
-
>${i18nString(UIStrings.learnAbout)}</button>
|
|
547
|
-
</p>`;
|
|
548
|
-
|
|
549
527
|
return html`
|
|
550
528
|
<footer class=${classes} jslog=${VisualLogging.section('footer')}>
|
|
551
|
-
${
|
|
529
|
+
${renderRelevantDataDisclaimer({
|
|
530
|
+
isLoading: this.#props.isLoading,
|
|
531
|
+
blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
|
|
532
|
+
tooltipId: RELEVANT_DATA_LINK_FOOTER_ID,
|
|
533
|
+
disclaimerText: this.#props.disclaimerText
|
|
534
|
+
})}
|
|
552
535
|
</footer>
|
|
553
536
|
`;
|
|
537
|
+
// clang-format on
|
|
554
538
|
};
|
|
539
|
+
|
|
540
|
+
const renderInputOrReadOnlySection = (): Lit.LitTemplate => {
|
|
541
|
+
if (this.#props.state !== State.CHAT_VIEW) {
|
|
542
|
+
return Lit.nothing;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if (this.#props.conversationType && this.#props.isReadOnly) {
|
|
546
|
+
return renderReadOnlySection({
|
|
547
|
+
conversationType: this.#props.conversationType,
|
|
548
|
+
onNewConversation: this.#props.onNewConversation,
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
return renderChatInput({
|
|
553
|
+
isLoading: this.#props.isLoading,
|
|
554
|
+
blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
|
|
555
|
+
isTextInputDisabled: this.#props.isTextInputDisabled,
|
|
556
|
+
inputPlaceholder: this.#props.inputPlaceholder,
|
|
557
|
+
disclaimerText: this.#props.disclaimerText,
|
|
558
|
+
selectedContext: this.#props.selectedContext,
|
|
559
|
+
inspectElementToggled: this.#props.inspectElementToggled,
|
|
560
|
+
multimodalInputEnabled: this.#props.multimodalInputEnabled,
|
|
561
|
+
conversationType: this.#props.conversationType,
|
|
562
|
+
imageInput: this.#props.imageInput,
|
|
563
|
+
aidaAvailability: this.#props.aidaAvailability,
|
|
564
|
+
isTextInputEmpty: this.#props.isTextInputEmpty,
|
|
565
|
+
uploadImageInputEnabled: this.#props.uploadImageInputEnabled,
|
|
566
|
+
onContextClick: this.#props.onContextClick,
|
|
567
|
+
onInspectElementClick: this.#props.onInspectElementClick,
|
|
568
|
+
onSubmit: this.#handleSubmit,
|
|
569
|
+
onTextAreaKeyDown: this.#handleTextAreaKeyDown,
|
|
570
|
+
onCancel: this.#handleCancel,
|
|
571
|
+
onNewConversation: this.#props.onNewConversation,
|
|
572
|
+
onTakeScreenshot: this.#props.onTakeScreenshot,
|
|
573
|
+
onRemoveImageInput: this.#props.onRemoveImageInput,
|
|
574
|
+
onTextInputChange: this.#props.onTextInputChange,
|
|
575
|
+
onImageUpload: this.#handleImageUpload
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
|
|
555
579
|
// clang-format off
|
|
556
580
|
Lit.render(html`
|
|
557
581
|
<style>${chatViewStyles}</style>
|
|
@@ -576,38 +600,7 @@ export class ChatView extends HTMLElement {
|
|
|
576
600
|
onMessageContainerRef: this.#handleMessageContainerRef,
|
|
577
601
|
onCopyResponseClick: this.#props.onCopyResponseClick,
|
|
578
602
|
})}
|
|
579
|
-
${
|
|
580
|
-
? renderReadOnlySection({
|
|
581
|
-
conversationType: this.#props.conversationType,
|
|
582
|
-
onNewConversation: this.#props.onNewConversation,
|
|
583
|
-
})
|
|
584
|
-
: renderChatInput({
|
|
585
|
-
isLoading: this.#props.isLoading,
|
|
586
|
-
blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
|
|
587
|
-
isTextInputDisabled: this.#props.isTextInputDisabled,
|
|
588
|
-
inputPlaceholder: this.#props.inputPlaceholder,
|
|
589
|
-
state: this.#props.state,
|
|
590
|
-
disclaimerText: this.#props.disclaimerText,
|
|
591
|
-
selectedContext: this.#props.selectedContext,
|
|
592
|
-
inspectElementToggled: this.#props.inspectElementToggled,
|
|
593
|
-
multimodalInputEnabled: this.#props.multimodalInputEnabled,
|
|
594
|
-
conversationType: this.#props.conversationType,
|
|
595
|
-
imageInput: this.#props.imageInput,
|
|
596
|
-
isTextInputEmpty: this.#props.isTextInputEmpty,
|
|
597
|
-
aidaAvailability: this.#props.aidaAvailability,
|
|
598
|
-
uploadImageInputEnabled: this.#props.uploadImageInputEnabled,
|
|
599
|
-
onContextClick: this.#props.onContextClick,
|
|
600
|
-
onInspectElementClick: this.#props.onInspectElementClick,
|
|
601
|
-
onSubmit: this.#handleSubmit,
|
|
602
|
-
onTextAreaKeyDown: this.#handleTextAreaKeyDown,
|
|
603
|
-
onCancel: this.#handleCancel,
|
|
604
|
-
onNewConversation: this.#props.onNewConversation,
|
|
605
|
-
onTakeScreenshot: this.#props.onTakeScreenshot,
|
|
606
|
-
onRemoveImageInput: this.#props.onRemoveImageInput,
|
|
607
|
-
onTextInputChange: this.#props.onTextInputChange,
|
|
608
|
-
onImageUpload: this.#handleImageUpload,
|
|
609
|
-
})
|
|
610
|
-
}
|
|
603
|
+
${renderInputOrReadOnlySection()}
|
|
611
604
|
</main>
|
|
612
605
|
${renderFooter()}
|
|
613
606
|
</div>
|
|
@@ -1411,7 +1404,6 @@ function renderChatInput({
|
|
|
1411
1404
|
blockedByCrossOrigin,
|
|
1412
1405
|
isTextInputDisabled,
|
|
1413
1406
|
inputPlaceholder,
|
|
1414
|
-
state,
|
|
1415
1407
|
selectedContext,
|
|
1416
1408
|
inspectElementToggled,
|
|
1417
1409
|
multimodalInputEnabled,
|
|
@@ -1436,7 +1428,6 @@ function renderChatInput({
|
|
|
1436
1428
|
blockedByCrossOrigin: boolean,
|
|
1437
1429
|
isTextInputDisabled: boolean,
|
|
1438
1430
|
inputPlaceholder: Platform.UIString.LocalizedString,
|
|
1439
|
-
state: State,
|
|
1440
1431
|
selectedContext: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null,
|
|
1441
1432
|
inspectElementToggled: boolean,
|
|
1442
1433
|
isTextInputEmpty: boolean,
|
|
@@ -1461,8 +1452,7 @@ function renderChatInput({
|
|
|
1461
1452
|
return Lit.nothing;
|
|
1462
1453
|
}
|
|
1463
1454
|
|
|
1464
|
-
const shouldShowMultiLine =
|
|
1465
|
-
aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE && selectedContext;
|
|
1455
|
+
const shouldShowMultiLine = aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE && selectedContext;
|
|
1466
1456
|
const chatInputContainerCls = Lit.Directives.classMap({
|
|
1467
1457
|
'chat-input-container': true,
|
|
1468
1458
|
'single-line-layout': !shouldShowMultiLine,
|
|
@@ -1546,16 +1536,16 @@ function renderConsentViewContents(): Lit.TemplateResult {
|
|
|
1546
1536
|
return html`${i18nString(UIStrings.notAvailableInIncognitoMode)}`;
|
|
1547
1537
|
}
|
|
1548
1538
|
if (config.devToolsAiAssistancePerformanceAgent?.enabled) {
|
|
1549
|
-
consentViewContents =
|
|
1539
|
+
consentViewContents = uiI18n.getFormatLocalizedString(
|
|
1550
1540
|
str_, UIStrings.turnOnForStylesRequestsPerformanceAndFiles, {PH1: settingsLink});
|
|
1551
1541
|
} else if (config.devToolsAiAssistanceFileAgent?.enabled) {
|
|
1552
1542
|
consentViewContents =
|
|
1553
|
-
|
|
1543
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.turnOnForStylesRequestsAndFiles, {PH1: settingsLink});
|
|
1554
1544
|
} else if (config.devToolsAiAssistanceNetworkAgent?.enabled) {
|
|
1555
1545
|
consentViewContents =
|
|
1556
|
-
|
|
1546
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.turnOnForStylesAndRequests, {PH1: settingsLink});
|
|
1557
1547
|
} else {
|
|
1558
|
-
consentViewContents =
|
|
1548
|
+
consentViewContents = uiI18n.getFormatLocalizedString(str_, UIStrings.turnOnForStyles, {PH1: settingsLink});
|
|
1559
1549
|
}
|
|
1560
1550
|
|
|
1561
1551
|
return html`${consentViewContents}`;
|
|
@@ -1617,11 +1607,10 @@ function renderMainContents({
|
|
|
1617
1607
|
conversationType?: AiAssistanceModel.AiHistoryStorage.ConversationType,
|
|
1618
1608
|
changeSummary?: string,
|
|
1619
1609
|
}): Lit.LitTemplate {
|
|
1620
|
-
if (state === State.
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
if (aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
|
|
1610
|
+
if (state === State.DISABLED_VIEW) {
|
|
1611
|
+
if (aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
|
|
1612
|
+
return renderDisabledState(renderConsentViewContents());
|
|
1613
|
+
}
|
|
1625
1614
|
return renderDisabledState(renderAidaUnavailableContents(aidaAvailability));
|
|
1626
1615
|
}
|
|
1627
1616
|
|
|
@@ -11,6 +11,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
11
11
|
import type * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
13
13
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
14
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
14
15
|
import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
15
16
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
16
17
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -704,7 +705,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
704
705
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(recommendedId);
|
|
705
706
|
});
|
|
706
707
|
suggestedIdNote.appendChild(
|
|
707
|
-
|
|
708
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.appIdNote, {PH1: suggestedIdSpan, PH2: copyButton}));
|
|
708
709
|
}
|
|
709
710
|
} else {
|
|
710
711
|
this.identitySection.removeField(i18nString(UIStrings.computedAppId));
|
|
@@ -781,7 +782,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
781
782
|
'https://web.dev/maskable-icon/', i18nString(UIStrings.documentationOnMaskableIcons), undefined, undefined,
|
|
782
783
|
'learn-more');
|
|
783
784
|
this.iconsSection.appendRow().appendChild(
|
|
784
|
-
|
|
785
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.needHelpReadOurS, {PH1: documentationLink}));
|
|
785
786
|
|
|
786
787
|
let squareSizedIconAvailable = false;
|
|
787
788
|
for (const icon of icons) {
|
|
@@ -938,8 +939,8 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
938
939
|
const wco = document.createElement('code');
|
|
939
940
|
wco.classList.add('wco');
|
|
940
941
|
wco.textContent = 'window-controls-overlay';
|
|
941
|
-
wcoStatusMessage.appendChild(
|
|
942
|
-
str_, UIStrings.wcoFound, {PH1: wco, PH2: displayOverrideText, PH3: link}));
|
|
942
|
+
wcoStatusMessage.appendChild(
|
|
943
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.wcoFound, {PH1: wco, PH2: displayOverrideText, PH3: link}));
|
|
943
944
|
|
|
944
945
|
if (this.overlayModel) {
|
|
945
946
|
await this.appendWindowControlsToSection(this.overlayModel, url, stringProperty('theme_color'));
|
|
@@ -950,14 +951,14 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
950
951
|
wcoStatusMessage.appendChild(infoIcon);
|
|
951
952
|
|
|
952
953
|
wcoStatusMessage.appendChild(
|
|
953
|
-
|
|
954
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.wcoNotFound, {PH1: displayOverrideText}));
|
|
954
955
|
}
|
|
955
956
|
|
|
956
957
|
const wcoDocumentationLink = UI.XLink.XLink.create(
|
|
957
958
|
'https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/window-controls-overlay',
|
|
958
959
|
i18nString(UIStrings.customizePwaTitleBar), undefined, undefined, 'customize-pwa-tittle-bar');
|
|
959
960
|
this.windowControlsSection.appendRow().appendChild(
|
|
960
|
-
|
|
961
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.wcoNeedHelpReadMore, {PH1: wcoDocumentationLink}));
|
|
961
962
|
|
|
962
963
|
this.dispatchEventToListeners(Events.MANIFEST_RENDERED);
|
|
963
964
|
}
|
|
@@ -2478,7 +2478,7 @@ class FrameWindowTreeElement extends ApplicationPanelTreeElement {
|
|
|
2478
2478
|
this.targetInfo = targetInfo;
|
|
2479
2479
|
if (this.view) {
|
|
2480
2480
|
this.view.setTargetInfo(targetInfo);
|
|
2481
|
-
this.view.
|
|
2481
|
+
this.view.requestUpdate();
|
|
2482
2482
|
}
|
|
2483
2483
|
}
|
|
2484
2484
|
|
|
@@ -2487,7 +2487,7 @@ class FrameWindowTreeElement extends ApplicationPanelTreeElement {
|
|
|
2487
2487
|
this.isWindowClosed = true;
|
|
2488
2488
|
if (this.view) {
|
|
2489
2489
|
this.view.setIsWindowClosed(true);
|
|
2490
|
-
this.view.
|
|
2490
|
+
this.view.requestUpdate();
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
2493
|
|
|
@@ -2496,7 +2496,7 @@ class FrameWindowTreeElement extends ApplicationPanelTreeElement {
|
|
|
2496
2496
|
if (!this.view) {
|
|
2497
2497
|
this.view = new OpenedWindowDetailsView(this.targetInfo, this.isWindowClosed);
|
|
2498
2498
|
} else {
|
|
2499
|
-
this.view.
|
|
2499
|
+
this.view.requestUpdate();
|
|
2500
2500
|
}
|
|
2501
2501
|
this.showView(this.view);
|
|
2502
2502
|
Host.userMetrics.panelShown('frame-window');
|
|
@@ -2525,7 +2525,7 @@ class WorkerTreeElement extends ApplicationPanelTreeElement {
|
|
|
2525
2525
|
if (!this.view) {
|
|
2526
2526
|
this.view = new WorkerDetailsView(this.targetInfo);
|
|
2527
2527
|
} else {
|
|
2528
|
-
this.view.
|
|
2528
|
+
this.view.requestUpdate();
|
|
2529
2529
|
}
|
|
2530
2530
|
this.showView(this.view);
|
|
2531
2531
|
Host.userMetrics.panelShown('frame-worker');
|
|
@@ -6,8 +6,6 @@ import * as Host from '../../core/host/host.js';
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
9
|
-
import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
10
|
-
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
9
|
|
|
12
10
|
import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
|
|
13
11
|
import * as ApplicationComponents from './components/components.js';
|
|
@@ -23,8 +21,7 @@ const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheTre
|
|
|
23
21
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
24
22
|
|
|
25
23
|
export class BackForwardCacheTreeElement extends ApplicationPanelTreeElement {
|
|
26
|
-
private view?:
|
|
27
|
-
.LegacyWrapper<UI.Widget.Widget, ApplicationComponents.BackForwardCacheView.BackForwardCacheView>;
|
|
24
|
+
private view?: ApplicationComponents.BackForwardCacheView.BackForwardCacheView;
|
|
28
25
|
|
|
29
26
|
constructor(resourcesPanel: ResourcesPanel) {
|
|
30
27
|
super(resourcesPanel, i18nString(UIStrings.backForwardCache), false, 'bfcache');
|
|
@@ -39,8 +36,7 @@ export class BackForwardCacheTreeElement extends ApplicationPanelTreeElement {
|
|
|
39
36
|
override onselect(selectedByUser?: boolean): boolean {
|
|
40
37
|
super.onselect(selectedByUser);
|
|
41
38
|
if (!this.view) {
|
|
42
|
-
this.view =
|
|
43
|
-
UI.Widget.Widget, new ApplicationComponents.BackForwardCacheView.BackForwardCacheView());
|
|
39
|
+
this.view = new ApplicationComponents.BackForwardCacheView.BackForwardCacheView();
|
|
44
40
|
}
|
|
45
41
|
this.showView(this.view);
|
|
46
42
|
Host.userMetrics.panelShown('back-forward-cache');
|
|
@@ -136,7 +136,7 @@ async function maybeCreateLinkToElementsPanel(
|
|
|
136
136
|
return linkElement;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
export class OpenedWindowDetailsView extends UI.
|
|
139
|
+
export class OpenedWindowDetailsView extends UI.Widget.VBox {
|
|
140
140
|
private targetInfo: Protocol.Target.TargetInfo;
|
|
141
141
|
private isWindowClosed: boolean;
|
|
142
142
|
private readonly reportView: UI.ReportView.ReportView;
|
|
@@ -169,10 +169,10 @@ export class OpenedWindowDetailsView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
169
169
|
this.securitySection.setFieldVisible(i18nString(UIStrings.openerFrame), false);
|
|
170
170
|
this.hasDOMAccessValue = this.securitySection.appendField(i18nString(UIStrings.accessToOpener));
|
|
171
171
|
UI.Tooltip.Tooltip.install(this.hasDOMAccessValue, i18nString(UIStrings.showsWhetherTheOpenedWindowIs));
|
|
172
|
-
this.
|
|
172
|
+
this.requestUpdate();
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
override async
|
|
175
|
+
override async performUpdate(): Promise<void> {
|
|
176
176
|
this.reportView.setTitle(this.buildTitle());
|
|
177
177
|
this.#urlFieldValue.textContent = this.targetInfo.url;
|
|
178
178
|
this.#urlFieldValue.title = this.targetInfo.url;
|
|
@@ -208,7 +208,7 @@ export class OpenedWindowDetailsView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
export class WorkerDetailsView extends UI.
|
|
211
|
+
export class WorkerDetailsView extends UI.Widget.VBox {
|
|
212
212
|
private readonly targetInfo: Protocol.Target.TargetInfo;
|
|
213
213
|
private readonly reportView: UI.ReportView.ReportView;
|
|
214
214
|
private readonly documentSection: UI.ReportView.Section;
|
|
@@ -239,7 +239,7 @@ export class WorkerDetailsView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
239
239
|
|
|
240
240
|
this.isolationSection = this.reportView.appendSection(i18nString(UIStrings.securityIsolation));
|
|
241
241
|
this.coepPolicy = this.isolationSection.appendField(i18nString(UIStrings.crossoriginEmbedderPolicy));
|
|
242
|
-
this.
|
|
242
|
+
this.requestUpdate();
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
workerTypeToString(type: string): Common.UIString.LocalizedString {
|
|
@@ -295,7 +295,7 @@ export class WorkerDetailsView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
override async
|
|
298
|
+
override async performUpdate(): Promise<void> {
|
|
299
299
|
await this.updateCoopCoepStatus();
|
|
300
300
|
}
|
|
301
301
|
}
|
|
@@ -10,6 +10,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
10
10
|
import * as Protocol from '../../generated/protocol.js';
|
|
11
11
|
import type * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
12
12
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
13
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
13
14
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
14
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
15
16
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -146,7 +147,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
146
147
|
/**
|
|
147
148
|
* @implements {SDK.TargetManager.Observer}
|
|
148
149
|
*/
|
|
149
|
-
export class StorageView extends UI.
|
|
150
|
+
export class StorageView extends UI.Widget.VBox {
|
|
150
151
|
private pieColors: Map<Protocol.Storage.StorageType, string>;
|
|
151
152
|
private reportView: UI.ReportView.ReportView;
|
|
152
153
|
private target: SDK.Target.Target|null;
|
|
@@ -163,9 +164,10 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
163
164
|
private quotaOverrideEditor: HTMLInputElement;
|
|
164
165
|
private quotaOverrideErrorMessage: HTMLElement;
|
|
165
166
|
private clearButton: Buttons.Button.Button;
|
|
167
|
+
private readonly throttler = new Common.Throttler.Throttler(1000);
|
|
166
168
|
|
|
167
169
|
constructor() {
|
|
168
|
-
super(true
|
|
170
|
+
super({useShadowDom: true});
|
|
169
171
|
this.registerRequiredCSS(storageViewStyles);
|
|
170
172
|
|
|
171
173
|
this.contentElement.classList.add('clear-storage-container');
|
|
@@ -341,7 +343,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
341
343
|
this.quotaOverrideCheckbox.checked = false;
|
|
342
344
|
this.quotaOverrideErrorMessage.textContent = '';
|
|
343
345
|
}
|
|
344
|
-
void this.
|
|
346
|
+
void this.performUpdate();
|
|
345
347
|
}
|
|
346
348
|
|
|
347
349
|
private updateStorageKey(mainStorageKey: string): void {
|
|
@@ -355,7 +357,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
355
357
|
this.quotaOverrideCheckbox.checked = false;
|
|
356
358
|
this.quotaOverrideErrorMessage.textContent = '';
|
|
357
359
|
}
|
|
358
|
-
void this.
|
|
360
|
+
void this.performUpdate();
|
|
359
361
|
}
|
|
360
362
|
|
|
361
363
|
private async applyQuotaOverrideFromInputField(): Promise<void> {
|
|
@@ -489,7 +491,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
489
491
|
}
|
|
490
492
|
}
|
|
491
493
|
|
|
492
|
-
override async
|
|
494
|
+
override async performUpdate(): Promise<void> {
|
|
493
495
|
if (!this.securityOrigin || !this.target) {
|
|
494
496
|
this.quotaRow.textContent = '';
|
|
495
497
|
this.populatePieChart(0, []);
|
|
@@ -509,8 +511,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
509
511
|
const formattedQuotaAsString = i18nString(UIStrings.storageWithCustomMarker, {PH1: quotaAsString});
|
|
510
512
|
const quota =
|
|
511
513
|
quotaOverridden ? UI.Fragment.Fragment.build`<b>${formattedQuotaAsString}</b>`.element() : quotaAsString;
|
|
512
|
-
const element =
|
|
513
|
-
i18n.i18n.getFormatLocalizedString(str_, UIStrings.storageQuotaUsed, {PH1: usageAsString, PH2: quota});
|
|
514
|
+
const element = uiI18n.getFormatLocalizedString(str_, UIStrings.storageQuotaUsed, {PH1: usageAsString, PH2: quota});
|
|
514
515
|
this.quotaRow.appendChild(element);
|
|
515
516
|
UI.Tooltip.Tooltip.install(
|
|
516
517
|
this.quotaRow,
|
|
@@ -542,7 +543,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
542
543
|
this.populatePieChart(response.usage, slices);
|
|
543
544
|
}
|
|
544
545
|
|
|
545
|
-
this.
|
|
546
|
+
void this.throttler.schedule(this.requestUpdate.bind(this));
|
|
546
547
|
}
|
|
547
548
|
|
|
548
549
|
private populatePieChart(total: number, slices: PerfUI.PieChart.Slice[]): void {
|