chrome-devtools-frontend 1.0.943986 → 1.0.945579
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 +4 -0
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/circled_exclamation_icon.svg +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/CSSMetadata.ts +0 -1
- 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 -3
- 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/generated/protocol.d.ts +0 -4
- package/front_end/models/bindings/BreakpointManager.ts +3 -4
- package/front_end/models/bindings/ResourceMapping.ts +1 -2
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
- package/front_end/models/emulation/EmulatedDevices.ts +2 -4
- 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/BackForwardCacheView.ts +8 -1
- 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 +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
- package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
- package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -12
- package/front_end/panels/elements/StylesSidebarPane.ts +36 -10
- 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/adorners/Adorner.ts +14 -14
- package/front_end/ui/components/buttons/Button.ts +116 -42
- package/front_end/ui/components/data_grid/DataGrid.ts +122 -122
- package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
- package/front_end/ui/components/diff_view/DiffView.ts +4 -4
- package/front_end/ui/components/docs/button/basic.html +3 -0
- package/front_end/ui/components/docs/button/basic.ts +16 -0
- package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
- package/front_end/ui/components/icon_button/Icon.ts +24 -21
- package/front_end/ui/components/icon_button/IconButton.ts +31 -31
- package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +25 -25
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
- package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
- package/front_end/ui/components/report_view/ReportView.ts +18 -18
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
- package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
- package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
- package/front_end/ui/components/text_editor/TextEditor.ts +65 -36
- package/front_end/ui/components/text_editor/config.ts +36 -14
- package/front_end/ui/components/text_editor/javascript.ts +20 -15
- package/front_end/ui/components/text_editor/theme.ts +29 -4
- package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
- package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
- package/front_end/ui/legacy/Infobar.ts +9 -0
- 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/tabbedPane.css +1 -1
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/inspector_overlay/main.ts +3 -0
- package/package.json +1 -1
|
@@ -6,9 +6,9 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
-
import * as
|
|
9
|
+
import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
10
|
+
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
10
11
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
11
|
-
import * as TextEditor from '../../ui/legacy/components/text_editor/text_editor.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
13
|
|
|
14
14
|
import {ConsolePanel} from './ConsolePanel.js';
|
|
@@ -27,17 +27,17 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
27
27
|
private addCompletionsFromHistory: boolean;
|
|
28
28
|
private historyInternal: ConsoleHistoryManager;
|
|
29
29
|
private initialText: string;
|
|
30
|
-
private editor:
|
|
30
|
+
private editor: TextEditor.TextEditor.TextEditor;
|
|
31
31
|
private readonly eagerPreviewElement: HTMLDivElement;
|
|
32
32
|
private textChangeThrottler: Common.Throttler.Throttler;
|
|
33
33
|
private readonly formatter: ObjectUI.RemoteObjectPreviewFormatter.RemoteObjectPreviewFormatter;
|
|
34
34
|
private requestPreviewBound: () => Promise<void>;
|
|
35
|
+
private requestPreviewCurrent = 0;
|
|
35
36
|
private readonly innerPreviewElement: HTMLElement;
|
|
36
37
|
private readonly promptIcon: UI.Icon.Icon;
|
|
37
38
|
private readonly iconThrottler: Common.Throttler.Throttler;
|
|
38
39
|
private readonly eagerEvalSetting: Common.Settings.Setting<boolean>;
|
|
39
40
|
private previewRequestForTest: Promise<void>|null;
|
|
40
|
-
private defaultAutocompleteConfig: UI.TextEditor.AutocompleteConfig|null;
|
|
41
41
|
private highlightingNode: boolean;
|
|
42
42
|
|
|
43
43
|
constructor() {
|
|
@@ -46,7 +46,6 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
46
46
|
this.historyInternal = new ConsoleHistoryManager();
|
|
47
47
|
|
|
48
48
|
this.initialText = '';
|
|
49
|
-
this.editor = null;
|
|
50
49
|
this.eagerPreviewElement = document.createElement('div');
|
|
51
50
|
this.eagerPreviewElement.classList.add('console-eager-preview');
|
|
52
51
|
this.textChangeThrottler = new Common.Throttler.Throttler(150);
|
|
@@ -68,41 +67,41 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
68
67
|
|
|
69
68
|
this.element.tabIndex = 0;
|
|
70
69
|
this.previewRequestForTest = null;
|
|
70
|
+
this.highlightingNode = false;
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
const editorState = CodeMirror.EditorState.create({
|
|
73
|
+
doc: this.initialText,
|
|
74
|
+
extensions: [
|
|
75
|
+
CodeMirror.keymap.of(this.editorKeymap()),
|
|
76
|
+
CodeMirror.EditorView.updateListener.of(update => this.editorUpdate(update)),
|
|
77
|
+
TextEditor.JavaScript.argumentHints(),
|
|
78
|
+
TextEditor.JavaScript.completion(),
|
|
79
|
+
TextEditor.Config.showCompletionHint,
|
|
80
|
+
CodeMirror.javascript.javascript(),
|
|
81
|
+
TextEditor.Config.baseConfiguration(this.initialText),
|
|
82
|
+
TextEditor.Config.autocompletion,
|
|
83
|
+
CodeMirror.javascript.javascriptLanguage.data.of({
|
|
84
|
+
autocomplete: (context: CodeMirror.CompletionContext): CodeMirror.CompletionResult | null =>
|
|
85
|
+
this.historyCompletions(context),
|
|
86
|
+
}),
|
|
87
|
+
CodeMirror.EditorView.contentAttributes.of({'aria-label': i18nString(UIStrings.consolePrompt)}),
|
|
88
|
+
CodeMirror.EditorView.lineWrapping,
|
|
89
|
+
CodeMirror.autocompletion({aboveCursor: true}),
|
|
90
|
+
],
|
|
91
|
+
});
|
|
73
92
|
|
|
74
|
-
this.
|
|
93
|
+
this.editor = new TextEditor.TextEditor.TextEditor(editorState);
|
|
94
|
+
this.editor.addEventListener('keydown', (event): void => {
|
|
95
|
+
if (event.defaultPrevented) {
|
|
96
|
+
event.stopPropagation();
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
editorContainerElement.appendChild(this.editor);
|
|
75
100
|
|
|
76
|
-
const factory = TextEditor.CodeMirrorTextEditor.CodeMirrorTextEditorFactory.instance();
|
|
77
|
-
|
|
78
|
-
const options = {
|
|
79
|
-
devtoolsAccessibleName: (i18nString(UIStrings.consolePrompt) as string),
|
|
80
|
-
lineNumbers: false,
|
|
81
|
-
lineWrapping: true,
|
|
82
|
-
mimeType: 'javascript',
|
|
83
|
-
autoHeight: true,
|
|
84
|
-
};
|
|
85
|
-
this.editor = factory.createEditor((options as UI.TextEditor.Options));
|
|
86
|
-
|
|
87
|
-
this.defaultAutocompleteConfig =
|
|
88
|
-
ObjectUI.JavaScriptAutocomplete.JavaScriptAutocompleteConfig.createConfigForEditor(this.editor);
|
|
89
|
-
this.editor.configureAutocomplete(Object.assign({}, this.defaultAutocompleteConfig, {
|
|
90
|
-
suggestionsCallback: this.wordsWithQuery.bind(this),
|
|
91
|
-
anchorBehavior: UI.GlassPane.AnchorBehavior.PreferTop,
|
|
92
|
-
}));
|
|
93
|
-
this.editor.widget().element.addEventListener('keydown', this.editorKeyDown.bind(this), true);
|
|
94
|
-
this.editor.widget().show(editorContainerElement);
|
|
95
|
-
this.editor.addEventListener(UI.TextEditor.Events.CursorChanged, this.updatePromptIcon, this);
|
|
96
|
-
this.editor.addEventListener(UI.TextEditor.Events.TextChanged, this.onTextChanged, this);
|
|
97
|
-
this.editor.addEventListener(UI.TextEditor.Events.SuggestionChanged, this.onTextChanged, this);
|
|
98
|
-
|
|
99
|
-
this.setText(this.initialText);
|
|
100
|
-
this.initialText = '';
|
|
101
101
|
if (this.hasFocus()) {
|
|
102
102
|
this.focus();
|
|
103
103
|
}
|
|
104
104
|
this.element.removeAttribute('tabindex');
|
|
105
|
-
this.editor.widget().element.tabIndex = -1;
|
|
106
105
|
|
|
107
106
|
this.editorSetForTest();
|
|
108
107
|
|
|
@@ -126,7 +125,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
126
125
|
// ConsoleView and prompt both use a throttler, so we clear the preview
|
|
127
126
|
// ASAP to avoid inconsistency between a fresh viewport and stale preview.
|
|
128
127
|
if (this.eagerEvalSetting.get()) {
|
|
129
|
-
const asSoonAsPossible = !this.editor
|
|
128
|
+
const asSoonAsPossible = !TextEditor.Config.contentIncludingHint(this.editor.editor);
|
|
130
129
|
this.previewRequestForTest = this.textChangeThrottler.schedule(this.requestPreviewBound, asSoonAsPossible);
|
|
131
130
|
}
|
|
132
131
|
this.updatePromptIcon();
|
|
@@ -134,15 +133,16 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
private async requestPreview(): Promise<void> {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
const text = this.editor.textWithCurrentSuggestion().trim();
|
|
136
|
+
const id = ++this.requestPreviewCurrent;
|
|
137
|
+
const text = TextEditor.Config.contentIncludingHint(this.editor.editor).trim();
|
|
141
138
|
const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
142
139
|
const {preview, result} = await ObjectUI.JavaScriptREPL.JavaScriptREPL.evaluateAndBuildPreview(
|
|
143
140
|
text, true /* throwOnSideEffect */, true /* replMode */, 500 /* timeout */);
|
|
141
|
+
if (this.requestPreviewCurrent !== id) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
144
|
this.innerPreviewElement.removeChildren();
|
|
145
|
-
if (preview.deepTextContent() !== this.editor.
|
|
145
|
+
if (preview.deepTextContent() !== TextEditor.Config.contentIncludingHint(this.editor.editor).trim()) {
|
|
146
146
|
this.innerPreviewElement.appendChild(preview);
|
|
147
147
|
}
|
|
148
148
|
if (result && 'object' in result && result.object && result.object.subtype === 'node') {
|
|
@@ -174,149 +174,102 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
clearAutocomplete(): void {
|
|
177
|
-
|
|
178
|
-
this.editor.clearAutocomplete();
|
|
179
|
-
}
|
|
177
|
+
CodeMirror.closeCompletion(this.editor.editor);
|
|
180
178
|
}
|
|
181
179
|
|
|
182
180
|
private isCaretAtEndOfPrompt(): boolean {
|
|
183
|
-
return this.editor
|
|
184
|
-
this.editor.selection().collapseToEnd().equal(this.editor.fullRange().collapseToEnd());
|
|
181
|
+
return this.editor.state.selection.main.head === this.editor.state.doc.length;
|
|
185
182
|
}
|
|
186
183
|
|
|
187
184
|
moveCaretToEndOfPrompt(): void {
|
|
188
|
-
|
|
189
|
-
this.editor.
|
|
190
|
-
}
|
|
185
|
+
this.editor.dispatch({
|
|
186
|
+
selection: CodeMirror.EditorSelection.cursor(this.editor.state.doc.length),
|
|
187
|
+
});
|
|
191
188
|
}
|
|
192
189
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
this.editor.
|
|
196
|
-
}
|
|
197
|
-
this.initialText = text;
|
|
198
|
-
}
|
|
199
|
-
this.dispatchEventToListeners(Events.TextChanged);
|
|
190
|
+
clear(): void {
|
|
191
|
+
this.editor.dispatch({
|
|
192
|
+
changes: {from: 0, to: this.editor.state.doc.length},
|
|
193
|
+
});
|
|
200
194
|
}
|
|
201
195
|
|
|
202
196
|
text(): string {
|
|
203
|
-
return this.editor
|
|
197
|
+
return this.editor.state.doc.toString();
|
|
204
198
|
}
|
|
205
199
|
|
|
206
200
|
setAddCompletionsFromHistory(value: boolean): void {
|
|
207
201
|
this.addCompletionsFromHistory = value;
|
|
208
202
|
}
|
|
209
203
|
|
|
210
|
-
private
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
newText = this.historyInternal.previous(this.text());
|
|
228
|
-
isPrevious = true;
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
case UI.KeyboardShortcut.Keys.Down.code: {
|
|
232
|
-
const fullRange = this.editor.fullRange();
|
|
233
|
-
const endY = this.editor.visualCoordinates(fullRange.endLine, fullRange.endColumn).y;
|
|
234
|
-
if (keyboardEvent.shiftKey || !selection.isEmpty() || cursorY !== endY) {
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
newText = this.historyInternal.next();
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
case UI.KeyboardShortcut.Keys.P.code: { // Ctrl+P = Previous
|
|
241
|
-
if (Host.Platform.isMac() && keyboardEvent.ctrlKey && !keyboardEvent.metaKey && !keyboardEvent.altKey &&
|
|
242
|
-
!keyboardEvent.shiftKey) {
|
|
243
|
-
newText = this.historyInternal.previous(this.text());
|
|
244
|
-
isPrevious = true;
|
|
245
|
-
}
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
case UI.KeyboardShortcut.Keys.N.code: { // Ctrl+N = Next
|
|
249
|
-
if (Host.Platform.isMac() && keyboardEvent.ctrlKey && !keyboardEvent.metaKey && !keyboardEvent.altKey &&
|
|
250
|
-
!keyboardEvent.shiftKey) {
|
|
251
|
-
newText = this.historyInternal.next();
|
|
252
|
-
}
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
case UI.KeyboardShortcut.Keys.Enter.code: {
|
|
256
|
-
this.enterKeyPressed(keyboardEvent);
|
|
257
|
-
break;
|
|
204
|
+
private editorKeymap(): readonly CodeMirror.KeyBinding[] {
|
|
205
|
+
return [
|
|
206
|
+
{key: 'ArrowUp', run: (): boolean => this.moveHistory(-1)},
|
|
207
|
+
{key: 'ArrowDown', run: (): boolean => this.moveHistory(1)},
|
|
208
|
+
{mac: 'Ctrl-p', run: (): boolean => this.moveHistory(-1, true)},
|
|
209
|
+
{mac: 'Ctrl-n', run: (): boolean => this.moveHistory(1, true)},
|
|
210
|
+
{key: 'Enter', run: (): boolean => this.evaluate(), shift: CodeMirror.insertNewlineAndIndent},
|
|
211
|
+
];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
private moveHistory(dir: -1|1, force = false): boolean {
|
|
215
|
+
const {editor} = this.editor, {main} = editor.state.selection;
|
|
216
|
+
if (!force) {
|
|
217
|
+
if (!main.empty) {
|
|
218
|
+
return false;
|
|
258
219
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
220
|
+
const cursorCoords = editor.coordsAtPos(main.head);
|
|
221
|
+
const endCoords = editor.coordsAtPos(dir < 0 ? 0 : editor.state.doc.length);
|
|
222
|
+
// Check if there are wrapped lines in this direction, and let
|
|
223
|
+
// the cursor move normally if there are.
|
|
224
|
+
if (cursorCoords && endCoords &&
|
|
225
|
+
(dir < 0 ? cursorCoords.top > endCoords.top + 5 : cursorCoords.bottom < endCoords.bottom - 5)) {
|
|
226
|
+
return false;
|
|
264
227
|
}
|
|
265
228
|
}
|
|
266
229
|
|
|
230
|
+
const history = this.historyInternal;
|
|
231
|
+
const newText = dir < 0 ? history.previous(this.text()) : history.next();
|
|
267
232
|
if (newText === undefined) {
|
|
268
|
-
return;
|
|
233
|
+
return false;
|
|
269
234
|
}
|
|
270
|
-
keyboardEvent.consume(true);
|
|
271
|
-
this.setText(newText);
|
|
272
235
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
236
|
+
const cursorPos = dir < 0 ? newText.search(/\n|$/) : newText.length;
|
|
237
|
+
this.editor.dispatch({
|
|
238
|
+
changes: {from: 0, to: this.editor.state.doc.length, insert: newText},
|
|
239
|
+
selection: CodeMirror.EditorSelection.cursor(cursorPos),
|
|
240
|
+
scrollIntoView: true,
|
|
241
|
+
});
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
private enterWillEvaluate(): boolean {
|
|
246
|
+
const {state} = this.editor;
|
|
247
|
+
return state.doc.length > 0 && TextEditor.JavaScript.isExpressionComplete(state);
|
|
278
248
|
}
|
|
279
249
|
|
|
280
|
-
private
|
|
281
|
-
if (
|
|
282
|
-
|
|
250
|
+
private evaluate(): boolean {
|
|
251
|
+
if (this.enterWillEvaluate()) {
|
|
252
|
+
this.appendCommand(this.text(), true);
|
|
253
|
+
this.editor.dispatch({
|
|
254
|
+
changes: {from: 0, to: this.editor.state.doc.length},
|
|
255
|
+
scrollIntoView: true,
|
|
256
|
+
});
|
|
257
|
+
} else if (this.editor.state.doc.length) {
|
|
258
|
+
return CodeMirror.insertNewlineAndIndent(this.editor.editor);
|
|
259
|
+
} else {
|
|
260
|
+
this.editor.dispatch({scrollIntoView: true});
|
|
283
261
|
}
|
|
284
|
-
|
|
262
|
+
this.enterProcessedForTest();
|
|
263
|
+
return true;
|
|
285
264
|
}
|
|
286
265
|
|
|
287
266
|
private updatePromptIcon(): void {
|
|
288
267
|
this.iconThrottler.schedule(async () => {
|
|
289
|
-
|
|
290
|
-
this.promptIcon.classList.toggle('console-prompt-incomplete', !canComplete);
|
|
268
|
+
this.promptIcon.classList.toggle('console-prompt-incomplete', !this.enterWillEvaluate());
|
|
291
269
|
});
|
|
292
270
|
}
|
|
293
271
|
|
|
294
|
-
private
|
|
295
|
-
if (event.altKey || event.ctrlKey || event.shiftKey) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
event.consume(true);
|
|
300
|
-
|
|
301
|
-
// Since we prevent default, manually emulate the native "scroll on key input" behavior.
|
|
302
|
-
this.element.scrollIntoView();
|
|
303
|
-
this.clearAutocomplete();
|
|
304
|
-
|
|
305
|
-
const str = this.text();
|
|
306
|
-
if (!str.length) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
if (await this.enterWillEvaluate()) {
|
|
311
|
-
await this.appendCommand(str, true);
|
|
312
|
-
} else if (this.editor) {
|
|
313
|
-
this.editor.newlineAndIndent();
|
|
314
|
-
}
|
|
315
|
-
this.enterProcessedForTest();
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
private async appendCommand(text: string, useCommandLineAPI: boolean): Promise<void> {
|
|
319
|
-
this.setText('');
|
|
272
|
+
private appendCommand(text: string, useCommandLineAPI: boolean): void {
|
|
320
273
|
const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
321
274
|
if (currentExecutionContext) {
|
|
322
275
|
const executionContext = currentExecutionContext;
|
|
@@ -333,10 +286,19 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
333
286
|
private enterProcessedForTest(): void {
|
|
334
287
|
}
|
|
335
288
|
|
|
336
|
-
private
|
|
289
|
+
private editorUpdate(update: CodeMirror.ViewUpdate): void {
|
|
290
|
+
if (update.docChanged ||
|
|
291
|
+
CodeMirror.selectedCompletion(update.state) !== CodeMirror.selectedCompletion(update.startState)) {
|
|
292
|
+
this.onTextChanged();
|
|
293
|
+
} else if (update.selectionSet) {
|
|
294
|
+
this.updatePromptIcon();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private historyCompletions(context: CodeMirror.CompletionContext): CodeMirror.CompletionResult|null {
|
|
337
299
|
const text = this.text();
|
|
338
|
-
if (!this.addCompletionsFromHistory || !this.isCaretAtEndOfPrompt() || (!text && !
|
|
339
|
-
return
|
|
300
|
+
if (!this.addCompletionsFromHistory || !this.isCaretAtEndOfPrompt() || (!text.length && !context.explicit)) {
|
|
301
|
+
return null;
|
|
340
302
|
}
|
|
341
303
|
const result = [];
|
|
342
304
|
const set = new Set<string>();
|
|
@@ -350,30 +312,18 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
350
312
|
continue;
|
|
351
313
|
}
|
|
352
314
|
set.add(item);
|
|
353
|
-
result.push(
|
|
354
|
-
{text: item.substring(text.length - prefix.length), iconType: 'smallicon-text-prompt', isSecondary: true});
|
|
315
|
+
result.push({label: item, type: 'secondary', boost: -1e5});
|
|
355
316
|
}
|
|
356
|
-
return result
|
|
317
|
+
return result.length ? {
|
|
318
|
+
from: 0,
|
|
319
|
+
to: text.length,
|
|
320
|
+
options: result,
|
|
321
|
+
} :
|
|
322
|
+
null;
|
|
357
323
|
}
|
|
358
324
|
|
|
359
325
|
focus(): void {
|
|
360
|
-
|
|
361
|
-
this.editor.widget().focus();
|
|
362
|
-
} else {
|
|
363
|
-
this.element.focus();
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
private async wordsWithQuery(
|
|
368
|
-
queryRange: TextUtils.TextRange.TextRange, substituteRange: TextUtils.TextRange.TextRange,
|
|
369
|
-
force?: boolean): Promise<UI.SuggestBox.Suggestions> {
|
|
370
|
-
if (!this.editor || !this.defaultAutocompleteConfig || !this.defaultAutocompleteConfig.suggestionsCallback) {
|
|
371
|
-
return [];
|
|
372
|
-
}
|
|
373
|
-
const query = this.editor.text(queryRange);
|
|
374
|
-
const words = await this.defaultAutocompleteConfig.suggestionsCallback(queryRange, substituteRange, force);
|
|
375
|
-
const historyWords = this.historyCompletions(query, force);
|
|
376
|
-
return words ? words.concat(historyWords) : historyWords;
|
|
326
|
+
this.editor.focus();
|
|
377
327
|
}
|
|
378
328
|
|
|
379
329
|
private editorSetForTest(): void {
|
|
@@ -1218,7 +1218,7 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
private clearPromptBackwards(): void {
|
|
1221
|
-
this.prompt.
|
|
1221
|
+
this.prompt.clear();
|
|
1222
1222
|
}
|
|
1223
1223
|
|
|
1224
1224
|
private promptKeyDown(event: Event): void {
|
|
@@ -345,13 +345,13 @@
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
#console-messages .link {
|
|
348
|
+
cursor: pointer;
|
|
348
349
|
text-decoration: underline;
|
|
349
350
|
}
|
|
350
351
|
|
|
351
352
|
#console-messages .link,
|
|
352
353
|
#console-messages .devtools-link {
|
|
353
354
|
color: var(--color-text-secondary);
|
|
354
|
-
cursor: pointer;
|
|
355
355
|
word-break: break-all;
|
|
356
356
|
}
|
|
357
357
|
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
background: none;
|
|
339
339
|
border: none;
|
|
340
340
|
-webkit-mask-image: var(--image-file-ic_show_node_16x16);
|
|
341
|
-
background-color: var(--color-
|
|
341
|
+
background-color: var(--color-text-secondary);
|
|
342
342
|
width: 16px;
|
|
343
343
|
height: 16px;
|
|
344
344
|
display: none;
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
|
|
349
349
|
.show-element:focus,
|
|
350
350
|
.show-element:hover {
|
|
351
|
-
background-color: var(--color-
|
|
351
|
+
background-color: var(--color-primary);
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
.nodeId-column:focus-within .show-element,
|
|
@@ -122,8 +122,9 @@ export function accessibilityNodeRenderer(node: AXTreeNode): LitHtml.TemplateRes
|
|
|
122
122
|
const sdkNode = node.treeNodeData;
|
|
123
123
|
const name = sdkNode.name()?.value || '';
|
|
124
124
|
const role = sdkNode.role()?.value || '';
|
|
125
|
+
const properties = sdkNode.properties() || [];
|
|
125
126
|
const ignored = sdkNode.ignored();
|
|
126
|
-
return LitHtml.html`<${tag} .data=${{name, role, ignored} as Data}></${tag}>`;
|
|
127
|
+
return LitHtml.html`<${tag} .data=${{name, role, ignored, properties} as Data}></${tag}>`;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
export function getNodeId(node: SDK.AccessibilityModel.AccessibilityNode): string {
|
|
@@ -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(),
|
|
@@ -30,6 +30,8 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
30
30
|
private section?: StylePropertiesSection;
|
|
31
31
|
private editorContainer: HTMLElement;
|
|
32
32
|
|
|
33
|
+
#triggerKey: string|undefined;
|
|
34
|
+
|
|
33
35
|
constructor() {
|
|
34
36
|
super(true);
|
|
35
37
|
this.contentElement.tabIndex = 0;
|
|
@@ -71,6 +73,14 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
71
73
|
this.editor?.addEventListener('propertydeselected', this.onPropertyDeselected);
|
|
72
74
|
}
|
|
73
75
|
|
|
76
|
+
setTriggerKey(value: string): void {
|
|
77
|
+
this.#triggerKey = value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
getTriggerKey(): string|undefined {
|
|
81
|
+
return this.#triggerKey;
|
|
82
|
+
}
|
|
83
|
+
|
|
74
84
|
unbindContext(): void {
|
|
75
85
|
this.pane = undefined;
|
|
76
86
|
this.section = undefined;
|
|
@@ -105,8 +115,8 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
105
115
|
}
|
|
106
116
|
|
|
107
117
|
static createTriggerButton(
|
|
108
|
-
pane: StylesSidebarPane, section: StylePropertiesSection, editorClass: {new(): Editor},
|
|
109
|
-
|
|
118
|
+
pane: StylesSidebarPane, section: StylePropertiesSection, editorClass: {new(): Editor}, buttonTitle: string,
|
|
119
|
+
triggerKey: string): HTMLElement {
|
|
110
120
|
const triggerButton = createButton(buttonTitle);
|
|
111
121
|
|
|
112
122
|
triggerButton.onclick = async(event): Promise<void> => {
|
|
@@ -115,6 +125,7 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
115
125
|
const widget = StyleEditorWidget.instance();
|
|
116
126
|
widget.setEditor(editorClass);
|
|
117
127
|
widget.bindContext(pane, section);
|
|
128
|
+
widget.setTriggerKey(triggerKey);
|
|
118
129
|
await widget.render();
|
|
119
130
|
const scrollerElement = triggerButton.enclosingNodeOrSelfWithClass('style-panes-wrapper');
|
|
120
131
|
const onScroll = (): void => {
|
|
@@ -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 {
|
|
@@ -668,21 +668,17 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
668
668
|
const section = this.section();
|
|
669
669
|
if (this.valueElement && section && section.editable && this.property.name === 'display') {
|
|
670
670
|
const propertyValue = this.property.trimmedValueWithoutImportant();
|
|
671
|
-
|
|
671
|
+
const isFlex = propertyValue === 'flex' || propertyValue === 'inline-flex';
|
|
672
|
+
const isGrid = propertyValue === 'grid' || propertyValue === 'inline-grid';
|
|
673
|
+
if (isFlex || isGrid) {
|
|
674
|
+
const key = `${section.getSectionIdx()}_${section.nextEditorTriggerButtonIdx}`;
|
|
672
675
|
const button = StyleEditorWidget.createTriggerButton(
|
|
673
|
-
this.parentPaneInternal, section, FlexboxEditor,
|
|
676
|
+
this.parentPaneInternal, section, isFlex ? FlexboxEditor : GridEditor,
|
|
677
|
+
isFlex ? i18nString(UIStrings.flexboxEditorButton) : i18nString(UIStrings.gridEditorButton), key);
|
|
678
|
+
section.nextEditorTriggerButtonIdx++;
|
|
674
679
|
this.listItemElement.appendChild(button);
|
|
675
680
|
const helper = this.parentPaneInternal.swatchPopoverHelper();
|
|
676
|
-
if (helper.isShowing(StyleEditorWidget.instance())) {
|
|
677
|
-
helper.setAnchorElement(button);
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
if (propertyValue === 'grid' || propertyValue === 'inline-grid') {
|
|
681
|
-
const button = StyleEditorWidget.createTriggerButton(
|
|
682
|
-
this.parentPaneInternal, section, GridEditor, i18nString(UIStrings.gridEditorButton));
|
|
683
|
-
this.listItemElement.appendChild(button);
|
|
684
|
-
const helper = this.parentPaneInternal.swatchPopoverHelper();
|
|
685
|
-
if (helper.isShowing(StyleEditorWidget.instance())) {
|
|
681
|
+
if (helper.isShowing(StyleEditorWidget.instance()) && StyleEditorWidget.instance().getTriggerKey() === key) {
|
|
686
682
|
helper.setAnchorElement(button);
|
|
687
683
|
}
|
|
688
684
|
}
|