chrome-devtools-frontend 1.0.943709 → 1.0.945329
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/config/gni/devtools_grd_files.gni +3 -0
- package/front_end/core/common/ParsedURL.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/i18nImpl.ts +7 -4
- package/front_end/core/i18n/locales/en-US.json +3 -72
- package/front_end/core/i18n/locales/en-XL.json +15 -84
- package/front_end/core/protocol_client/NodeURL.ts +1 -0
- package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -0
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
- package/front_end/core/sdk/Cookie.ts +17 -0
- package/front_end/core/sdk/CookieModel.ts +1 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -4
- package/front_end/core/sdk/NetworkManager.ts +4 -1
- package/front_end/core/sdk/NetworkRequest.ts +2 -2
- package/front_end/core/sdk/OverlayModel.ts +0 -9
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/Script.ts +2 -7
- package/front_end/core/sdk/sdk-meta.ts +0 -26
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +0 -13
- package/front_end/entrypoints/main/MainImpl.ts +4 -0
- package/front_end/models/bindings/BreakpointManager.ts +3 -4
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -9
- package/front_end/models/bindings/ResourceMapping.ts +1 -2
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -11
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
- package/front_end/models/formatter/SourceFormatter.ts +0 -15
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
- package/front_end/models/persistence/PersistenceActions.ts +4 -1
- package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
- package/front_end/models/text_utils/ContentProvider.ts +1 -2
- package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
- package/front_end/models/workspace/UISourceCode.ts +2 -2
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
- package/front_end/panels/animation/animationTimeline.css +2 -0
- package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
- package/front_end/panels/application/ReportingApiView.ts +15 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
- package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
- package/front_end/panels/changes/ChangesView.ts +8 -7
- package/front_end/panels/console/ConsolePinPane.ts +1 -0
- package/front_end/panels/console/ConsolePrompt.ts +121 -171
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +2 -2
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +98 -67
- package/front_end/panels/elements/AccessibilityTreeView.ts +76 -126
- package/front_end/panels/elements/ElementsPanel.ts +6 -7
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
- package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
- package/front_end/panels/emulation/DeviceModeView.ts +3 -0
- package/front_end/panels/help/ReleaseNoteText.ts +3 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +5 -1
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
- package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
- package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
- package/front_end/services/window_bounds/window_bounds.ts +9 -0
- package/front_end/third_party/acorn/README.chromium +2 -2
- package/front_end/third_party/acorn/acorn.ts +1 -1
- package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
- package/front_end/third_party/acorn/package/README.md +1 -1
- package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
- package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
- package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
- package/front_end/third_party/acorn/package/dist/bin.js +47 -21
- package/front_end/third_party/acorn/package/package.json +1 -1
- package/front_end/third_party/acorn-loose/README.chromium +2 -2
- package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
- package/front_end/third_party/acorn-loose/package/package.json +2 -2
- package/front_end/third_party/codemirror.next/bundle.ts +4 -3
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +39 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +4 -4
- package/front_end/third_party/i18n/i18n-impl.ts +1 -1
- package/front_end/third_party/lit-html/README.chromium +2 -2
- package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
- package/front_end/third_party/lit-html/package/LICENSE +9 -9
- package/front_end/third_party/lit-html/package/README.md +12 -162
- package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
- package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/async-directive.js +2 -7
- package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
- package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
- package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
- package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
- package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive.js +6 -1
- package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
- package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
- package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
- package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
- package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
- package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
- package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
- package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
- package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
- package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
- package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
- package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
- package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
- package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
- package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
- package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
- package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
- package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
- package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
- package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
- package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
- package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
- package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
- package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
- package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
- package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
- package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.js +6 -5
- package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
- package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
- package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
- package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
- package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
- package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directive.js +1 -1
- package/front_end/third_party/lit-html/package/directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
- package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
- package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
- package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
- package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
- package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
- package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
- package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
- package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
- package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
- package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
- package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/live.js +1 -4
- package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
- package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
- package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
- package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
- package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
- package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
- package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
- package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
- package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
- package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
- package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/until.js +2 -6
- package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
- package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
- package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
- package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/package.json +75 -24
- package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
- package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
- package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
- package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
- package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/static.js +1 -1
- package/front_end/third_party/lit-html/package/static.js.map +1 -1
- package/front_end/third_party/marked/README.chromium +2 -2
- package/front_end/third_party/marked/marked.ts +2 -2
- package/front_end/third_party/marked/package/README.md +7 -1
- package/front_end/third_party/marked/package/bin/marked.js +214 -0
- package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
- package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
- package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
- package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
- package/front_end/third_party/marked/package/man/marked.1 +5 -24
- package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
- package/front_end/third_party/marked/package/marked.min.js +1 -1
- package/front_end/third_party/marked/package/package.json +41 -32
- package/front_end/third_party/marked/package/src/Lexer.js +109 -108
- package/front_end/third_party/marked/package/src/Parser.js +38 -15
- package/front_end/third_party/marked/package/src/Renderer.js +5 -5
- package/front_end/third_party/marked/package/src/Slugger.js +2 -2
- package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
- package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
- package/front_end/third_party/marked/package/src/defaults.js +6 -9
- package/front_end/third_party/marked/package/src/helpers.js +16 -27
- package/front_end/third_party/marked/package/src/marked.js +146 -63
- package/front_end/third_party/marked/package/src/rules.js +20 -45
- package/front_end/third_party/wasmparser/README.chromium +2 -2
- package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
- package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/package.json +1 -1
- package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
- package/front_end/ui/components/text_editor/TextEditor.ts +29 -0
- package/front_end/ui/components/text_editor/config.ts +36 -14
- package/front_end/ui/components/text_editor/javascript.ts +14 -9
- package/front_end/ui/components/text_editor/theme.ts +29 -4
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ViewManager.ts +6 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
- package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/inspector_overlay/main.ts +3 -0
- package/package.json +1 -1
|
@@ -9,15 +9,12 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
9
9
|
import * as AccessibilityTreeUtils from './AccessibilityTreeUtils.js';
|
|
10
10
|
import {ElementsPanel} from './ElementsPanel.js';
|
|
11
11
|
|
|
12
|
-
export class AccessibilityTreeView extends UI.Widget.VBox
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private treeData: AccessibilityTreeUtils.AXTreeNode[] = [];
|
|
12
|
+
export class AccessibilityTreeView extends UI.Widget.VBox implements
|
|
13
|
+
SDK.TargetManager.SDKModelObserver<SDK.AccessibilityModel.AccessibilityModel> {
|
|
14
|
+
private accessibilityTreeComponent = new TreeOutline.TreeOutline.TreeOutline<AccessibilityTreeUtils.AXTreeNodeData>();
|
|
16
15
|
private readonly toggleButton: HTMLButtonElement;
|
|
17
|
-
private accessibilityModel: SDK.AccessibilityModel.AccessibilityModel|null = null;
|
|
18
|
-
private rootAXNode: SDK.AccessibilityModel.AccessibilityNode|null = null;
|
|
19
|
-
private selectedTreeNode: AccessibilityTreeUtils.AXTreeNode|null = null;
|
|
20
16
|
private inspectedDOMNode: SDK.DOMModel.DOMNode|null = null;
|
|
17
|
+
private root: SDK.AccessibilityModel.AccessibilityNode|null = null;
|
|
21
18
|
|
|
22
19
|
constructor(toggleButton: HTMLButtonElement) {
|
|
23
20
|
super();
|
|
@@ -27,6 +24,8 @@ export class AccessibilityTreeView extends UI.Widget.VBox {
|
|
|
27
24
|
this.contentElement.appendChild(this.toggleButton);
|
|
28
25
|
this.contentElement.appendChild(this.accessibilityTreeComponent);
|
|
29
26
|
|
|
27
|
+
SDK.TargetManager.TargetManager.instance().observeModels(SDK.AccessibilityModel.AccessibilityModel, this);
|
|
28
|
+
|
|
30
29
|
// The DOM tree and accessibility are kept in sync as much as possible, so
|
|
31
30
|
// on node selection, update the currently inspected node and reveal in the
|
|
32
31
|
// DOM tree.
|
|
@@ -57,154 +56,105 @@ export class AccessibilityTreeView extends UI.Widget.VBox {
|
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
wasShown(): void {
|
|
59
|
+
async wasShown(): Promise<void> {
|
|
60
|
+
await this.refreshAccessibilityTree();
|
|
61
61
|
if (this.inspectedDOMNode) {
|
|
62
|
-
this.loadSubTreeIntoAccessibilityModel(this.inspectedDOMNode);
|
|
63
|
-
} else {
|
|
64
|
-
this.accessibilityTreeComponent.expandRecursively(1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
setAccessibilityModel(model: SDK.AccessibilityModel.AccessibilityModel|null): void {
|
|
69
|
-
this.accessibilityModel = model;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
wireToDOMModel(domModel: SDK.DOMModel.DOMModel): void {
|
|
73
|
-
if (!domModel.parentModel()) {
|
|
74
|
-
this.setAccessibilityModel(domModel.target().model(SDK.AccessibilityModel.AccessibilityModel));
|
|
62
|
+
await this.loadSubTreeIntoAccessibilityModel(this.inspectedDOMNode);
|
|
75
63
|
}
|
|
76
|
-
domModel.addEventListener(SDK.DOMModel.Events.NodeInserted, this.domUpdated, this);
|
|
77
|
-
domModel.addEventListener(SDK.DOMModel.Events.NodeRemoved, this.domUpdatedNode, this);
|
|
78
|
-
domModel.addEventListener(SDK.DOMModel.Events.AttrModified, this.domUpdatedNode, this);
|
|
79
|
-
domModel.addEventListener(SDK.DOMModel.Events.AttrRemoved, this.domUpdatedNode, this);
|
|
80
|
-
domModel.addEventListener(SDK.DOMModel.Events.CharacterDataModified, this.domUpdated, this);
|
|
81
|
-
domModel.addEventListener(SDK.DOMModel.Events.ChildNodeCountUpdated, this.domUpdated, this);
|
|
82
|
-
domModel.addEventListener(SDK.DOMModel.Events.DistributedNodesChanged, this.domUpdated, this);
|
|
83
|
-
domModel.addEventListener(SDK.DOMModel.Events.DocumentUpdated, this.documentUpdated, this);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
unwireFromDOMModel(domModel: SDK.DOMModel.DOMModel): void {
|
|
87
|
-
domModel.removeEventListener(SDK.DOMModel.Events.NodeInserted, this.domUpdated, this);
|
|
88
|
-
domModel.removeEventListener(SDK.DOMModel.Events.NodeRemoved, this.domUpdatedNode, this);
|
|
89
|
-
domModel.removeEventListener(SDK.DOMModel.Events.AttrModified, this.domUpdatedNode, this);
|
|
90
|
-
domModel.removeEventListener(SDK.DOMModel.Events.AttrRemoved, this.domUpdatedNode, this);
|
|
91
|
-
domModel.removeEventListener(SDK.DOMModel.Events.CharacterDataModified, this.domUpdated, this);
|
|
92
|
-
domModel.removeEventListener(SDK.DOMModel.Events.ChildNodeCountUpdated, this.domUpdated, this);
|
|
93
|
-
domModel.removeEventListener(SDK.DOMModel.Events.DistributedNodesChanged, this.domUpdated, this);
|
|
94
|
-
domModel.removeEventListener(SDK.DOMModel.Events.DocumentUpdated, this.documentUpdated, this);
|
|
95
64
|
}
|
|
96
65
|
|
|
97
|
-
|
|
98
|
-
this.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
await axModel?.requestAndLoadSubTreeToNode(node);
|
|
108
|
-
this.renderTree();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
documentUpdated(event: Common.EventTarget.EventTargetEvent<SDK.DOMModel.DOMModel>): void {
|
|
112
|
-
const domModel = event.data;
|
|
113
|
-
const axModel = domModel.target().model(SDK.AccessibilityModel.AccessibilityModel);
|
|
114
|
-
if (domModel.existingDocument() && !domModel.parentModel() && axModel) {
|
|
115
|
-
this.refreshAccessibilityTree(axModel);
|
|
66
|
+
async refreshAccessibilityTree(): Promise<void> {
|
|
67
|
+
if (!this.root) {
|
|
68
|
+
const frameId = SDK.FrameManager.FrameManager.instance().getTopFrame()?.id;
|
|
69
|
+
if (!frameId) {
|
|
70
|
+
throw Error('No top frame');
|
|
71
|
+
}
|
|
72
|
+
this.root = await AccessibilityTreeUtils.getRootNode(frameId);
|
|
73
|
+
if (!this.root) {
|
|
74
|
+
throw Error('No root');
|
|
75
|
+
}
|
|
116
76
|
}
|
|
77
|
+
await this.renderTree();
|
|
78
|
+
await this.accessibilityTreeComponent.expandRecursively(1);
|
|
117
79
|
}
|
|
118
80
|
|
|
119
|
-
renderTree(): void {
|
|
120
|
-
if (!this.
|
|
121
|
-
|
|
122
|
-
} else {
|
|
123
|
-
this.treeData = [AccessibilityTreeUtils.sdkNodeToAXTreeNode(this.rootAXNode)];
|
|
81
|
+
async renderTree(): Promise<void> {
|
|
82
|
+
if (!this.root) {
|
|
83
|
+
return;
|
|
124
84
|
}
|
|
125
|
-
|
|
85
|
+
const treeData = await AccessibilityTreeUtils.sdkNodeToAXTreeNodes(this.root);
|
|
126
86
|
this.accessibilityTreeComponent.data = {
|
|
127
87
|
defaultRenderer: AccessibilityTreeUtils.accessibilityNodeRenderer,
|
|
128
|
-
tree:
|
|
88
|
+
tree: treeData,
|
|
89
|
+
filter: (node): TreeOutline.TreeOutline.FilterOption => {
|
|
90
|
+
return node.ignored() || (node.role()?.value === 'generic' && !node.name()?.value) ?
|
|
91
|
+
TreeOutline.TreeOutline.FilterOption.FLATTEN :
|
|
92
|
+
TreeOutline.TreeOutline.FilterOption.SHOW;
|
|
93
|
+
},
|
|
129
94
|
};
|
|
130
|
-
|
|
131
|
-
const axModel = this.inspectedDOMNode?.domModel().target().model(SDK.AccessibilityModel.AccessibilityModel);
|
|
132
|
-
const inspectedAXNode = axModel?.axNodeForDOMNode(this.inspectedDOMNode);
|
|
133
|
-
if (inspectedAXNode) {
|
|
134
|
-
this.selectedTreeNode = AccessibilityTreeUtils.sdkNodeToAXTreeNode(inspectedAXNode);
|
|
135
|
-
this.accessibilityTreeComponent.expandToAndSelectTreeNode(this.selectedTreeNode);
|
|
136
|
-
} else {
|
|
137
|
-
this.accessibilityTreeComponent.expandRecursively(1);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
async refreshAccessibilityTree(accessibilityModel: SDK.AccessibilityModel.AccessibilityModel): Promise<void> {
|
|
142
|
-
// We always expand the root node so we might as well fetch one level of children immediately.
|
|
143
|
-
const root = await accessibilityModel.requestRootNode();
|
|
144
|
-
if (!root) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
this.rootAXNode = root;
|
|
149
|
-
this.inspectedDOMNode = null;
|
|
150
|
-
this.renderTree();
|
|
151
95
|
}
|
|
152
96
|
|
|
153
97
|
// Given a selected DOM node, asks the model to load the missing subtree from the root to the
|
|
154
98
|
// selected node and then re-renders the tree.
|
|
155
99
|
async loadSubTreeIntoAccessibilityModel(selectedNode: SDK.DOMModel.DOMNode): Promise<void> {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// If this node has been loaded previously, the accessibility tree will return it's cached node.
|
|
161
|
-
// Eventually we'll need some mechanism for forcing it to fetch a new node when we are subscribing
|
|
162
|
-
// for updates, but TBD later.
|
|
163
|
-
// EG for a backend tree like:
|
|
164
|
-
//
|
|
165
|
-
// A*
|
|
166
|
-
// B
|
|
167
|
-
// C
|
|
168
|
-
// D
|
|
169
|
-
// E
|
|
170
|
-
// Where only A is already loaded into the model, calling requestAndLoadSubTreeToNode(C) will
|
|
171
|
-
// load [A, B, D, C] into the model, and return C.
|
|
172
|
-
await this.accessibilityModel.requestAndLoadSubTreeToNode(selectedNode);
|
|
173
|
-
const inspectedAXNode = this.accessibilityModel.axNodeForDOMNode(selectedNode);
|
|
100
|
+
const ancestors = await AccessibilityTreeUtils.getNodeAndAncestorsFromDOMNode(selectedNode);
|
|
101
|
+
const inspectedAXNode = ancestors.find(node => node.backendDOMNodeId() === selectedNode.backendNodeId());
|
|
174
102
|
if (!inspectedAXNode) {
|
|
175
103
|
return;
|
|
176
104
|
}
|
|
105
|
+
await this.accessibilityTreeComponent.expandNodeIds(ancestors.map(node => node.getFrameId() + '#' + node.id()));
|
|
106
|
+
await this.accessibilityTreeComponent.focusNodeId(AccessibilityTreeUtils.getNodeId(inspectedAXNode));
|
|
107
|
+
}
|
|
177
108
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
// These nodes require a special case, as they don't have an unignored node in the
|
|
184
|
-
// accessibility tree. Someone inspecting these in the DOM is probably expecting to
|
|
185
|
-
// be focused on the root WebArea of the accessibility tree.
|
|
186
|
-
// TODO(meredithl): Fix for when the inspected node is ingored in the accessibility
|
|
187
|
-
// tree. Eg, inspecting <head> in the DOM tree.
|
|
188
|
-
if (selectedNode.nodeName() === 'BODY' || selectedNode.nodeName() === 'HTML') {
|
|
189
|
-
this.accessibilityTreeComponent.expandToAndSelectTreeNode(this.treeData[0]);
|
|
190
|
-
this.selectedTreeNode = this.treeData[0];
|
|
109
|
+
// A node was revealed through the elements picker.
|
|
110
|
+
async revealAndSelectNode(inspectedNode: SDK.DOMModel.DOMNode): Promise<void> {
|
|
111
|
+
if (inspectedNode === this.inspectedDOMNode) {
|
|
191
112
|
return;
|
|
192
113
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
this.
|
|
114
|
+
this.inspectedDOMNode = inspectedNode;
|
|
115
|
+
// We only want to load nodes into the model when the AccessibilityTree is visible.
|
|
116
|
+
if (this.isShowing()) {
|
|
117
|
+
await this.loadSubTreeIntoAccessibilityModel(inspectedNode);
|
|
118
|
+
}
|
|
196
119
|
}
|
|
197
120
|
|
|
198
|
-
// Selected node in the DOM has changed
|
|
199
|
-
// unloaded.
|
|
121
|
+
// Selected node in the DOM tree has changed.
|
|
200
122
|
async selectedNodeChanged(inspectedNode: SDK.DOMModel.DOMNode): Promise<void> {
|
|
123
|
+
if (this.isShowing()) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (inspectedNode.ownerDocument && (inspectedNode.nodeName() === 'HTML' || inspectedNode.nodeName() === 'BODY')) {
|
|
127
|
+
inspectedNode = inspectedNode.ownerDocument;
|
|
128
|
+
}
|
|
201
129
|
if (inspectedNode === this.inspectedDOMNode) {
|
|
202
130
|
return;
|
|
203
131
|
}
|
|
204
132
|
this.inspectedDOMNode = inspectedNode;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
treeUpdated({data}: Common.EventTarget
|
|
136
|
+
.EventTargetEvent<SDK.AccessibilityModel.EventTypes[SDK.AccessibilityModel.Events.TreeUpdated]>):
|
|
137
|
+
void {
|
|
138
|
+
if (!data.root) {
|
|
139
|
+
this.renderTree();
|
|
140
|
+
return;
|
|
208
141
|
}
|
|
142
|
+
const topFrameId = SDK.FrameManager.FrameManager.instance().getTopFrame()?.id;
|
|
143
|
+
if (data.root?.getFrameId() !== topFrameId) {
|
|
144
|
+
this.renderTree();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.root = data.root;
|
|
148
|
+
this.accessibilityTreeComponent.collapseAllNodes();
|
|
149
|
+
|
|
150
|
+
this.refreshAccessibilityTree();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
modelAdded(model: SDK.AccessibilityModel.AccessibilityModel): void {
|
|
154
|
+
model.addEventListener(SDK.AccessibilityModel.Events.TreeUpdated, this.treeUpdated, this);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
modelRemoved(model: SDK.AccessibilityModel.AccessibilityModel): void {
|
|
158
|
+
model.removeEventListener(SDK.AccessibilityModel.Events.TreeUpdated, this.treeUpdated, this);
|
|
209
159
|
}
|
|
210
160
|
}
|
|
@@ -328,11 +328,6 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
328
328
|
modelAdded(domModel: SDK.DOMModel.DOMModel): void {
|
|
329
329
|
const parentModel = domModel.parentModel();
|
|
330
330
|
|
|
331
|
-
// Different frames will have different DOMModels, we only want to add the accessibility model
|
|
332
|
-
// for the top level frame, as the accessibility tree does not yet support exploring IFrames.
|
|
333
|
-
if (this.accessibilityTreeView) {
|
|
334
|
-
this.accessibilityTreeView.wireToDOMModel(domModel);
|
|
335
|
-
}
|
|
336
331
|
let treeOutline: ElementsTreeOutline|null = parentModel ? ElementsTreeOutline.forDOMModel(parentModel) : null;
|
|
337
332
|
if (!treeOutline) {
|
|
338
333
|
treeOutline = new ElementsTreeOutline(true, true);
|
|
@@ -507,6 +502,10 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
507
502
|
crumbs,
|
|
508
503
|
selectedNode: ElementsComponents.Helper.legacyNodeToElementsComponentsNode(selectedNode),
|
|
509
504
|
};
|
|
505
|
+
|
|
506
|
+
if (this.accessibilityTreeView) {
|
|
507
|
+
this.accessibilityTreeView.selectedNodeChanged(selectedNode);
|
|
508
|
+
}
|
|
510
509
|
} else {
|
|
511
510
|
this.breadcrumbs.data = {crumbs: [], selectedNode: null};
|
|
512
511
|
}
|
|
@@ -837,7 +836,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
837
836
|
if (!treeOutline) {
|
|
838
837
|
return null;
|
|
839
838
|
}
|
|
840
|
-
return
|
|
839
|
+
return treeOutline.findTreeElement(node);
|
|
841
840
|
}
|
|
842
841
|
|
|
843
842
|
private leaveUserAgentShadowDOM(node: SDK.DOMModel.DOMNode): SDK.DOMModel.DOMNode {
|
|
@@ -859,7 +858,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
859
858
|
}
|
|
860
859
|
|
|
861
860
|
if (this.accessibilityTreeView) {
|
|
862
|
-
this.accessibilityTreeView.
|
|
861
|
+
this.accessibilityTreeView.revealAndSelectNode(node);
|
|
863
862
|
}
|
|
864
863
|
|
|
865
864
|
await UI.ViewManager.ViewManager.instance().showView('elements', false, !focus);
|
|
@@ -1044,6 +1044,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1044
1044
|
},
|
|
1045
1045
|
]),
|
|
1046
1046
|
TextEditor.Config.baseConfiguration(initialValue),
|
|
1047
|
+
TextEditor.Config.closeBrackets,
|
|
1047
1048
|
TextEditor.Config.autocompletion,
|
|
1048
1049
|
CodeMirror.html.html(),
|
|
1049
1050
|
TextEditor.Config.domWordWrap.instance(),
|
|
@@ -39,12 +39,19 @@ export class StylePropertyHighlighter {
|
|
|
39
39
|
* Find the first non-overridden property that matches the provided name, scroll to it and highlight it.
|
|
40
40
|
*/
|
|
41
41
|
findAndHighlightPropertyName(propertyName: string): void {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
for (const section of this.styleSidebarPane.allSections()) {
|
|
43
|
+
if (!section.style().hasActiveProperty(propertyName)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
section.showAllItems();
|
|
47
|
+
const treeElement = this.findTreeElementFromSection(
|
|
48
|
+
treeElement => treeElement.property.name === propertyName && !treeElement.overloaded(), section);
|
|
49
|
+
if (treeElement) {
|
|
50
|
+
this.scrollAndHighlightTreeElement(treeElement);
|
|
51
|
+
if (section) {
|
|
52
|
+
section.element.focus();
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
}
|
|
@@ -57,23 +64,26 @@ export class StylePropertyHighlighter {
|
|
|
57
64
|
treeElement: StylePropertyTreeElement|null,
|
|
58
65
|
section: StylePropertiesSection|null,
|
|
59
66
|
} {
|
|
60
|
-
let result: StylePropertyTreeElement|null = null;
|
|
61
|
-
let containingSection: StylePropertiesSection|null = null;
|
|
62
67
|
for (const section of this.styleSidebarPane.allSections()) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
result = treeElement;
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
treeElement = treeElement.traverseNextTreeElement(false, null, true);
|
|
68
|
+
const treeElement = this.findTreeElementFromSection(compareCb, section);
|
|
69
|
+
if (treeElement) {
|
|
70
|
+
return {treeElement, section};
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
}
|
|
73
|
+
return {treeElement: null, section: null};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private findTreeElementFromSection(
|
|
77
|
+
compareCb: (arg0: StylePropertyTreeElement) => boolean, section: StylePropertiesSection): StylePropertyTreeElement
|
|
78
|
+
|null {
|
|
79
|
+
let treeElement = section.propertiesTreeOutline.firstChild();
|
|
80
|
+
while (treeElement && (treeElement instanceof StylePropertyTreeElement)) {
|
|
81
|
+
if (compareCb(treeElement)) {
|
|
82
|
+
return treeElement;
|
|
74
83
|
}
|
|
84
|
+
treeElement = treeElement.traverseNextTreeElement(false, null, true);
|
|
75
85
|
}
|
|
76
|
-
return
|
|
86
|
+
return null;
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
private scrollAndHighlightTreeElement(treeElement: StylePropertyTreeElement): void {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
6
|
import * as Platform from '../../../core/platform/platform.js';
|
|
7
|
+
import * as Protocol from '../../../generated/protocol.js';
|
|
7
8
|
|
|
8
9
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
9
10
|
import * as Coordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
|
|
@@ -31,10 +32,23 @@ function truncateTextIfNeeded(text: string): string {
|
|
|
31
32
|
return text;
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
function isPrintable(valueType: Protocol.Accessibility.AXValueType): boolean {
|
|
36
|
+
switch (valueType) {
|
|
37
|
+
case Protocol.Accessibility.AXValueType.Boolean:
|
|
38
|
+
case Protocol.Accessibility.AXValueType.BooleanOrUndefined:
|
|
39
|
+
case Protocol.Accessibility.AXValueType.String:
|
|
40
|
+
case Protocol.Accessibility.AXValueType.Number:
|
|
41
|
+
return true;
|
|
42
|
+
default:
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
34
47
|
export interface AccessibilityTreeNodeData {
|
|
35
48
|
ignored: boolean;
|
|
36
49
|
name: string;
|
|
37
50
|
role: string;
|
|
51
|
+
properties: Protocol.Accessibility.AXProperty[];
|
|
38
52
|
}
|
|
39
53
|
|
|
40
54
|
export class AccessibilityTreeNode extends HTMLElement {
|
|
@@ -44,11 +58,13 @@ export class AccessibilityTreeNode extends HTMLElement {
|
|
|
44
58
|
private ignored = true;
|
|
45
59
|
private name = '';
|
|
46
60
|
private role = '';
|
|
61
|
+
private properties: Protocol.Accessibility.AXProperty[] = [];
|
|
47
62
|
|
|
48
63
|
set data(data: AccessibilityTreeNodeData) {
|
|
49
64
|
this.ignored = data.ignored;
|
|
50
65
|
this.name = data.name;
|
|
51
66
|
this.role = data.role;
|
|
67
|
+
this.properties = data.properties;
|
|
52
68
|
this.render();
|
|
53
69
|
}
|
|
54
70
|
|
|
@@ -57,12 +73,20 @@ export class AccessibilityTreeNode extends HTMLElement {
|
|
|
57
73
|
}
|
|
58
74
|
|
|
59
75
|
private async render(): Promise<void> {
|
|
76
|
+
const role = LitHtml.html`<span class='role-value'>${truncateTextIfNeeded(this.role)}</span>`;
|
|
77
|
+
const name = LitHtml.html`"<span class='attribute-value'>${this.name}</span>"`;
|
|
78
|
+
const properties = this.properties.map(
|
|
79
|
+
({name, value}) => isPrintable(value.type) ?
|
|
80
|
+
LitHtml.html` <span class='attribute-name'>${name}</span>: <span class='attribute-value'>${
|
|
81
|
+
value.value}</span>` :
|
|
82
|
+
LitHtml.nothing);
|
|
83
|
+
|
|
60
84
|
await Coordinator.RenderCoordinator.RenderCoordinator.instance().write('Accessibility node render', () => {
|
|
61
85
|
// clang-format off
|
|
62
86
|
LitHtml.render(
|
|
63
|
-
|
|
64
|
-
LitHtml.html`<span>${i18nString(UIStrings.ignored)}</span
|
|
65
|
-
LitHtml.html
|
|
87
|
+
this.ignored ?
|
|
88
|
+
LitHtml.html`<span>${i18nString(UIStrings.ignored)}</span>` :
|
|
89
|
+
LitHtml.html`${role} ${name}${properties}`,
|
|
66
90
|
this.shadow,
|
|
67
91
|
{host: this});
|
|
68
92
|
// clang-format on
|
|
@@ -547,6 +547,9 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
|
547
547
|
const link = document.createElement('a');
|
|
548
548
|
link.download = fileName + '.png';
|
|
549
549
|
canvas.toBlob(blob => {
|
|
550
|
+
if (blob === null) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
550
553
|
link.href = URL.createObjectURL(blob);
|
|
551
554
|
link.click();
|
|
552
555
|
});
|
|
@@ -21,7 +21,9 @@ function getReleaseNoteLang(): string {
|
|
|
21
21
|
// @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
|
|
22
22
|
const currentDevToolsLocale = new Intl.Locale(currentDevToolsUILanguage);
|
|
23
23
|
|
|
24
|
-
return releaseNoteLangs.has(currentDevToolsLocale.language) ?
|
|
24
|
+
return currentDevToolsLocale.language && releaseNoteLangs.has(currentDevToolsLocale.language) ?
|
|
25
|
+
currentDevToolsLocale.language :
|
|
26
|
+
'';
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
function getLocalizedReleaseNoteURL(url: string): string {
|
|
@@ -246,6 +246,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
246
246
|
// TODO(crbug.com/1167717): Make this a const enum again
|
|
247
247
|
// eslint-disable-next-line rulesdir/const_enum
|
|
248
248
|
export enum Events {
|
|
249
|
+
// RequestSelected might fire twice for the same "activation"
|
|
249
250
|
RequestSelected = 'RequestSelected',
|
|
250
251
|
RequestActivated = 'RequestActivated',
|
|
251
252
|
}
|
|
@@ -1007,7 +1008,10 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1007
1008
|
cell.style.setProperty('padding-left', leftPadding);
|
|
1008
1009
|
this.nameCell = cell;
|
|
1009
1010
|
cell.addEventListener('dblclick', this.openInNewTab.bind(this), false);
|
|
1010
|
-
cell.addEventListener('
|
|
1011
|
+
cell.addEventListener('mousedown', () => {
|
|
1012
|
+
// When the request panel isn't visible yet, firing the RequestActivated event
|
|
1013
|
+
// doesn't make it visible if no request is selected. So we'll select it first.
|
|
1014
|
+
this.select();
|
|
1011
1015
|
this.parentView().dispatchEventToListeners(Events.RequestActivated, {showPanel: true});
|
|
1012
1016
|
});
|
|
1013
1017
|
let iconElement;
|
|
@@ -41,7 +41,7 @@ export class SnippetFileSystem extends Persistence.PlatformFileSystem.PlatformFi
|
|
|
41
41
|
private readonly snippetsSetting: Common.Settings.Setting<Snippet[]>;
|
|
42
42
|
constructor() {
|
|
43
43
|
// TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
|
|
44
|
-
super('snippet://'
|
|
44
|
+
super('snippet://', 'snippets');
|
|
45
45
|
this.lastSnippetIdentifierSetting =
|
|
46
46
|
Common.Settings.Settings.instance().createSetting('scriptSnippets_lastIdentifier', 0);
|
|
47
47
|
this.snippetsSetting = Common.Settings.Settings.instance().createSetting('scriptSnippets', []);
|
|
@@ -71,6 +71,7 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
|
|
|
71
71
|
const editorConfig = [
|
|
72
72
|
CodeMirror.javascript.javascriptLanguage,
|
|
73
73
|
TextEditor.Config.baseConfiguration(oldCondition || ''),
|
|
74
|
+
TextEditor.Config.closeBrackets,
|
|
74
75
|
TextEditor.Config.autocompletion,
|
|
75
76
|
CodeMirror.EditorView.lineWrapping,
|
|
76
77
|
TextEditor.Config.showCompletionHint,
|
|
@@ -702,8 +702,8 @@ export class DebuggerPlugin extends Plugin {
|
|
|
702
702
|
if (this.popoverHelper.isPopoverVisible()) {
|
|
703
703
|
this.popoverHelper.hidePopover();
|
|
704
704
|
event.consume();
|
|
705
|
+
return true;
|
|
705
706
|
}
|
|
706
|
-
return true;
|
|
707
707
|
}
|
|
708
708
|
if (ctrlDown && this.executionLocation) {
|
|
709
709
|
this.setControlDown(true);
|
|
@@ -851,7 +851,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
|
851
851
|
// TODO(crbug.com/1253323): Cast to RawPathString will be removed when migration to branded types is complete.
|
|
852
852
|
const folderPath = Common.ParsedURL.ParsedURL.capFilePrefix(
|
|
853
853
|
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path) as
|
|
854
|
-
Platform.DevToolsPath.
|
|
854
|
+
Platform.DevToolsPath.UrlString,
|
|
855
855
|
Host.Platform.isWin());
|
|
856
856
|
contextMenu.revealSection().appendItem(
|
|
857
857
|
i18nString(UIStrings.openFolder),
|
|
@@ -380,7 +380,6 @@ export class UISourceCodeFrame extends
|
|
|
380
380
|
const location = this.editorLocationToUILocation(lineNumber, columnNumber);
|
|
381
381
|
contextMenu.appendApplicableItems(
|
|
382
382
|
new Workspace.UISourceCode.UILocation(this.uiSourceCodeInternal, location.lineNumber, location.columnNumber));
|
|
383
|
-
contextMenu.appendApplicableItems(this);
|
|
384
383
|
for (const plugin of this.plugins) {
|
|
385
384
|
plugin.populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber);
|
|
386
385
|
}
|
|
@@ -46,7 +46,7 @@ import type {PerformanceModel} from './PerformanceModel.js';
|
|
|
46
46
|
import {FlameChartStyle, Selection, TimelineFlameChartMarker} from './TimelineFlameChartView.js';
|
|
47
47
|
import {TimelineSelection} from './TimelinePanel.js';
|
|
48
48
|
import type {TimelineCategory} from './TimelineUIUtils.js';
|
|
49
|
-
import {TimelineUIUtils} from './TimelineUIUtils.js';
|
|
49
|
+
import {TimelineUIUtils, assignLayoutShiftsToClusters} from './TimelineUIUtils.js';
|
|
50
50
|
|
|
51
51
|
const UIStrings = {
|
|
52
52
|
/**
|
|
@@ -768,7 +768,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
|
768
768
|
|
|
769
769
|
const metricEvents: SDK.TracingModel.Event[] = [];
|
|
770
770
|
const lcpEvents = [];
|
|
771
|
-
const layoutShifts = [];
|
|
771
|
+
const layoutShifts: SDK.TracingModel.Event[] = [];
|
|
772
772
|
const timelineModel = this.performanceModel.timelineModel();
|
|
773
773
|
for (const track of this.model.tracks()) {
|
|
774
774
|
for (const event of track.events) {
|
|
@@ -807,38 +807,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
|
807
807
|
}
|
|
808
808
|
|
|
809
809
|
if (layoutShifts.length) {
|
|
810
|
-
|
|
811
|
-
const limitTimeInMs = 5000;
|
|
812
|
-
let firstTimestamp = Number.NEGATIVE_INFINITY;
|
|
813
|
-
let previousTimestamp = Number.NEGATIVE_INFINITY;
|
|
814
|
-
let maxScore = 0;
|
|
815
|
-
let currentClusterId = 1;
|
|
816
|
-
let currentClusterScore = 0;
|
|
817
|
-
let currentCluster = new Set<SDK.TracingModel.Event>();
|
|
818
|
-
|
|
819
|
-
for (const e of layoutShifts) {
|
|
820
|
-
if (e.args['data']['had_recent_input'] || e.args['data']['weighted_score_delta'] === undefined) {
|
|
821
|
-
continue;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
if (e.startTime - firstTimestamp > limitTimeInMs || e.startTime - previousTimestamp > gapTimeInMs) {
|
|
825
|
-
firstTimestamp = e.startTime;
|
|
826
|
-
|
|
827
|
-
for (const layoutShift of currentCluster) {
|
|
828
|
-
layoutShift.args['data']['_current_cluster_score'] = currentClusterScore;
|
|
829
|
-
layoutShift.args['data']['_current_cluster_id'] = currentClusterId;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
currentClusterId += 1;
|
|
833
|
-
currentClusterScore = 0;
|
|
834
|
-
currentCluster = new Set();
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
previousTimestamp = e.startTime;
|
|
838
|
-
currentClusterScore += e.args['data']['weighted_score_delta'];
|
|
839
|
-
currentCluster.add(e);
|
|
840
|
-
maxScore = Math.max(maxScore, currentClusterScore);
|
|
841
|
-
}
|
|
810
|
+
assignLayoutShiftsToClusters(layoutShifts);
|
|
842
811
|
}
|
|
843
812
|
|
|
844
813
|
metricEvents.sort(SDK.TracingModel.Event.compareStartTime);
|