chrome-devtools-frontend 1.0.943182 → 1.0.944903
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/InspectorFrontendHostAPI.ts +5 -5
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/i18n/locales/af.json +455 -44
- package/front_end/core/i18n/locales/am.json +455 -44
- package/front_end/core/i18n/locales/ar.json +455 -44
- package/front_end/core/i18n/locales/as.json +455 -44
- package/front_end/core/i18n/locales/az.json +455 -44
- package/front_end/core/i18n/locales/be.json +456 -45
- package/front_end/core/i18n/locales/bg.json +455 -44
- package/front_end/core/i18n/locales/bn.json +455 -44
- package/front_end/core/i18n/locales/bs.json +455 -44
- package/front_end/core/i18n/locales/ca.json +457 -46
- package/front_end/core/i18n/locales/cs.json +458 -47
- package/front_end/core/i18n/locales/cy.json +455 -44
- package/front_end/core/i18n/locales/da.json +455 -44
- package/front_end/core/i18n/locales/de.json +455 -44
- package/front_end/core/i18n/locales/el.json +455 -44
- package/front_end/core/i18n/locales/en-GB.json +449 -38
- package/front_end/core/i18n/locales/en-US.json +10 -34
- package/front_end/core/i18n/locales/en-XL.json +22 -46
- package/front_end/core/i18n/locales/es-419.json +455 -44
- package/front_end/core/i18n/locales/es.json +455 -44
- package/front_end/core/i18n/locales/et.json +455 -44
- package/front_end/core/i18n/locales/eu.json +462 -51
- package/front_end/core/i18n/locales/fa.json +455 -44
- package/front_end/core/i18n/locales/fi.json +455 -44
- package/front_end/core/i18n/locales/fil.json +454 -43
- package/front_end/core/i18n/locales/fr-CA.json +455 -44
- package/front_end/core/i18n/locales/fr.json +456 -45
- package/front_end/core/i18n/locales/gl.json +455 -44
- package/front_end/core/i18n/locales/gu.json +456 -45
- package/front_end/core/i18n/locales/he.json +455 -44
- package/front_end/core/i18n/locales/hi.json +455 -44
- package/front_end/core/i18n/locales/hr.json +455 -44
- package/front_end/core/i18n/locales/hu.json +455 -44
- package/front_end/core/i18n/locales/hy.json +455 -44
- package/front_end/core/i18n/locales/id.json +455 -44
- package/front_end/core/i18n/locales/is.json +455 -44
- package/front_end/core/i18n/locales/it.json +502 -91
- package/front_end/core/i18n/locales/ja.json +456 -45
- package/front_end/core/i18n/locales/ka.json +455 -44
- package/front_end/core/i18n/locales/kk.json +456 -45
- package/front_end/core/i18n/locales/km.json +455 -44
- package/front_end/core/i18n/locales/kn.json +455 -44
- package/front_end/core/i18n/locales/ko.json +455 -44
- package/front_end/core/i18n/locales/ky.json +456 -45
- package/front_end/core/i18n/locales/lo.json +454 -43
- package/front_end/core/i18n/locales/lt.json +455 -44
- package/front_end/core/i18n/locales/lv.json +458 -47
- package/front_end/core/i18n/locales/mk.json +455 -44
- package/front_end/core/i18n/locales/ml.json +461 -50
- package/front_end/core/i18n/locales/mn.json +455 -44
- package/front_end/core/i18n/locales/mr.json +455 -44
- package/front_end/core/i18n/locales/ms.json +455 -44
- package/front_end/core/i18n/locales/my.json +456 -45
- package/front_end/core/i18n/locales/ne.json +456 -45
- package/front_end/core/i18n/locales/nl.json +532 -121
- package/front_end/core/i18n/locales/no.json +455 -44
- package/front_end/core/i18n/locales/or.json +455 -44
- package/front_end/core/i18n/locales/pa.json +455 -44
- package/front_end/core/i18n/locales/pl.json +455 -44
- package/front_end/core/i18n/locales/pt-PT.json +504 -93
- package/front_end/core/i18n/locales/pt.json +454 -43
- package/front_end/core/i18n/locales/ro.json +455 -44
- package/front_end/core/i18n/locales/ru.json +455 -44
- package/front_end/core/i18n/locales/si.json +455 -44
- package/front_end/core/i18n/locales/sk.json +456 -45
- package/front_end/core/i18n/locales/sl.json +455 -44
- package/front_end/core/i18n/locales/sq.json +455 -44
- package/front_end/core/i18n/locales/sr-Latn.json +455 -44
- package/front_end/core/i18n/locales/sr.json +455 -44
- package/front_end/core/i18n/locales/sv.json +456 -45
- package/front_end/core/i18n/locales/sw.json +455 -44
- package/front_end/core/i18n/locales/ta.json +456 -45
- package/front_end/core/i18n/locales/te.json +454 -43
- package/front_end/core/i18n/locales/th.json +455 -44
- package/front_end/core/i18n/locales/tr.json +455 -44
- package/front_end/core/i18n/locales/uk.json +455 -44
- package/front_end/core/i18n/locales/ur.json +455 -44
- package/front_end/core/i18n/locales/uz.json +455 -44
- package/front_end/core/i18n/locales/vi.json +455 -44
- package/front_end/core/i18n/locales/zh-HK.json +459 -48
- package/front_end/core/i18n/locales/zh-TW.json +457 -46
- package/front_end/core/i18n/locales/zh.json +460 -49
- package/front_end/core/i18n/locales/zu.json +455 -44
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/protocol_client/NodeURL.ts +1 -0
- package/front_end/core/sdk/AccessibilityModel.ts +99 -78
- 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 +6 -0
- 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/ServiceWorkerCacheModel.ts +13 -12
- 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 +2 -4
- package/front_end/generated/InspectorBackendCommands.js +3 -1
- package/front_end/generated/protocol-mapping.d.ts +1 -0
- package/front_end/generated/protocol-proxy-api.d.ts +2 -0
- package/front_end/generated/protocol.d.ts +40 -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/IsolatedFileSystemManager.ts +10 -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/timeline_model/TimelineJSProfile.ts +3 -16
- package/front_end/models/timeline_model/TimelineModel.ts +0 -1
- package/front_end/models/workspace/UISourceCode.ts +2 -2
- package/front_end/panels/animation/animationTimeline.css +2 -0
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
- package/front_end/panels/application/BackForwardCacheView.ts +26 -26
- 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/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 -125
- package/front_end/panels/elements/ElementsPanel.ts +6 -7
- 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 +7 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
- 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/Plugin.ts +0 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +23 -50
- package/front_end/panels/timeline/TimelineController.ts +0 -3
- 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/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 +3 -3
- 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/components/tree_outline/TreeOutline.ts +8 -0
- package/front_end/ui/legacy/Dialog.ts +8 -3
- 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 +6 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/inspector_overlay/css_grid_label_helpers.ts +1 -1
- package/inspector_overlay/highlight_common.ts +1 -1
- package/inspector_overlay/tool_highlight.ts +1 -1
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/es_modules_import.js +0 -16
- package/scripts/eslint_rules/tests/es_modules_import_test.js +0 -16
|
@@ -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,
|
|
@@ -6,87 +6,113 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
6
6
|
import type * as TreeOutline from '../../ui/components/tree_outline/tree_outline.js';
|
|
7
7
|
import * as ElementsComponents from './components/components.js';
|
|
8
8
|
import * as LitHtml from '../../ui/lit-html/lit-html.js';
|
|
9
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
9
10
|
|
|
10
11
|
export type AXTreeNodeData = SDK.AccessibilityModel.AccessibilityNode;
|
|
11
12
|
export type AXTreeNode = TreeOutline.TreeOutlineUtils.TreeNode<AXTreeNodeData>;
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (role === 'Iframe') {
|
|
18
|
-
return {
|
|
19
|
-
treeNodeData,
|
|
20
|
-
children: async(): Promise<AXTreeNode[]> => {
|
|
21
|
-
const domNode = await sdkNode.deferredDOMNode()?.resolvePromise();
|
|
22
|
-
if (!domNode) {
|
|
23
|
-
throw new Error('Could not find corresponding DOMNode');
|
|
24
|
-
}
|
|
25
|
-
const frameId = domNode.frameOwnerFrameId();
|
|
14
|
+
function isLeafNode(node: SDK.AccessibilityModel.AccessibilityNode): boolean {
|
|
15
|
+
return node.numChildren() === 0 && node.role()?.value !== 'Iframe';
|
|
16
|
+
}
|
|
26
17
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (!document) {
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
18
|
+
function getModel(frameId: Protocol.Page.FrameId): SDK.AccessibilityModel.AccessibilityModel {
|
|
19
|
+
const frame = SDK.FrameManager.FrameManager.instance().getFrame(frameId);
|
|
20
|
+
const model = frame?.resourceTreeModel().target().model(SDK.AccessibilityModel.AccessibilityModel);
|
|
21
|
+
if (!model) {
|
|
22
|
+
throw Error('Could not instantiate model for frameId');
|
|
23
|
+
}
|
|
24
|
+
return model;
|
|
25
|
+
}
|
|
38
26
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
let localRoot = axmodel.axNodeForDOMNode(document);
|
|
45
|
-
if (!localRoot && frameId) {
|
|
46
|
-
// Request the root node of the iframe document:
|
|
47
|
-
localRoot = await axmodel.requestRootNode(1, frameId) || null;
|
|
48
|
-
}
|
|
49
|
-
if (!localRoot) {
|
|
50
|
-
throw new Error('Could not find root node');
|
|
51
|
-
}
|
|
52
|
-
return [sdkNodeToAXTreeNode(localRoot)];
|
|
53
|
-
},
|
|
54
|
-
id: sdkNode.id(),
|
|
55
|
-
};
|
|
27
|
+
export async function getRootNode(frameId: Protocol.Page.FrameId): Promise<SDK.AccessibilityModel.AccessibilityNode> {
|
|
28
|
+
const model = getModel(frameId);
|
|
29
|
+
const root = await model.requestRootNode(frameId);
|
|
30
|
+
if (!root) {
|
|
31
|
+
throw Error('No accessibility root for frame');
|
|
56
32
|
}
|
|
33
|
+
return root;
|
|
34
|
+
}
|
|
57
35
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
36
|
+
function getFrameIdForNodeOrDocument(node: SDK.DOMModel.DOMNode): Protocol.Page.FrameId {
|
|
37
|
+
let frameId;
|
|
38
|
+
if (node instanceof SDK.DOMModel.DOMDocument) {
|
|
39
|
+
frameId = node.body?.frameId();
|
|
40
|
+
} else {
|
|
41
|
+
frameId = node.frameId();
|
|
42
|
+
}
|
|
43
|
+
if (!frameId) {
|
|
44
|
+
throw Error('No frameId for DOM node');
|
|
63
45
|
}
|
|
46
|
+
return frameId;
|
|
47
|
+
}
|
|
64
48
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// there are backend children that need to be loaded into the model, so request them now.
|
|
74
|
-
await sdkNode.accessibilityModel().requestAXChildren(sdkNode.id(), sdkNode.getFrameId() || undefined);
|
|
49
|
+
export async function getNodeAndAncestorsFromDOMNode(domNode: SDK.DOMModel.DOMNode):
|
|
50
|
+
Promise<SDK.AccessibilityModel.AccessibilityNode[]> {
|
|
51
|
+
let frameId = getFrameIdForNodeOrDocument(domNode);
|
|
52
|
+
const model = getModel(frameId);
|
|
53
|
+
const result = await model.requestAndLoadSubTreeToNode(domNode);
|
|
54
|
+
if (!result) {
|
|
55
|
+
throw Error('Could not retrieve accessibility node for inspected DOM node');
|
|
56
|
+
}
|
|
75
57
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
58
|
+
const topFrameId = SDK.FrameManager.FrameManager.instance().getTopFrame()?.id;
|
|
59
|
+
if (!topFrameId) {
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
while (frameId !== topFrameId) {
|
|
63
|
+
const node = await SDK.FrameManager.FrameManager.instance().getFrame(frameId)?.getOwnerDOMNodeOrDocument();
|
|
64
|
+
if (!node) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
frameId = getFrameIdForNodeOrDocument(node);
|
|
68
|
+
const model = getModel(frameId);
|
|
69
|
+
const ancestors = await model.requestAndLoadSubTreeToNode(node);
|
|
70
|
+
result.push(...ancestors || []);
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
79
74
|
|
|
80
|
-
|
|
75
|
+
async function getChildren(node: SDK.AccessibilityModel.AccessibilityNode):
|
|
76
|
+
Promise<SDK.AccessibilityModel.AccessibilityNode[]> {
|
|
77
|
+
if (node.role()?.value === 'Iframe') {
|
|
78
|
+
const domNode = await node.deferredDOMNode()?.resolvePromise();
|
|
79
|
+
if (!domNode) {
|
|
80
|
+
throw new Error('Could not find corresponding DOMNode');
|
|
81
|
+
}
|
|
82
|
+
const frameId = domNode.frameOwnerFrameId();
|
|
83
|
+
if (!frameId) {
|
|
84
|
+
throw Error('No owner frameId on iframe node');
|
|
85
|
+
}
|
|
86
|
+
const localRoot = await getRootNode(frameId);
|
|
87
|
+
return [localRoot];
|
|
88
|
+
}
|
|
89
|
+
if (node.hasUnloadedChildren()) {
|
|
90
|
+
await node.accessibilityModel().requestAXChildren(node.id(), node.getFrameId() || undefined);
|
|
91
|
+
if (node.numChildren() !== node.children().length) {
|
|
92
|
+
throw new Error('Once loaded, number of children and length of children must match.');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return node.children();
|
|
96
|
+
}
|
|
81
97
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
98
|
+
export async function sdkNodeToAXTreeNodes(sdkNode: SDK.AccessibilityModel.AccessibilityNode): Promise<AXTreeNode[]> {
|
|
99
|
+
const treeNodeData = sdkNode;
|
|
100
|
+
if (isLeafNode(sdkNode)) {
|
|
101
|
+
return [{
|
|
102
|
+
treeNodeData,
|
|
103
|
+
id: getNodeId(sdkNode),
|
|
104
|
+
}];
|
|
105
|
+
}
|
|
85
106
|
|
|
86
|
-
|
|
107
|
+
return [{
|
|
108
|
+
treeNodeData,
|
|
109
|
+
children: async(): Promise<AXTreeNode[]> => {
|
|
110
|
+
const childNodes = await getChildren(sdkNode);
|
|
111
|
+
const childTreeNodes = await Promise.all(childNodes.map(childNode => sdkNodeToAXTreeNodes(childNode)));
|
|
112
|
+
return childTreeNodes.flat(1);
|
|
87
113
|
},
|
|
88
|
-
id: sdkNode
|
|
89
|
-
};
|
|
114
|
+
id: getNodeId(sdkNode),
|
|
115
|
+
}];
|
|
90
116
|
}
|
|
91
117
|
|
|
92
118
|
type Data = ElementsComponents.AccessibilityTreeNode.AccessibilityTreeNodeData;
|
|
@@ -96,6 +122,11 @@ export function accessibilityNodeRenderer(node: AXTreeNode): LitHtml.TemplateRes
|
|
|
96
122
|
const sdkNode = node.treeNodeData;
|
|
97
123
|
const name = sdkNode.name()?.value || '';
|
|
98
124
|
const role = sdkNode.role()?.value || '';
|
|
125
|
+
const properties = sdkNode.properties() || [];
|
|
99
126
|
const ignored = sdkNode.ignored();
|
|
100
|
-
return LitHtml.html`<${tag} .data=${{name, role, ignored} as Data}></${tag}>`;
|
|
127
|
+
return LitHtml.html`<${tag} .data=${{name, role, ignored, properties} as Data}></${tag}>`;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function getNodeId(node: SDK.AccessibilityModel.AccessibilityNode): string {
|
|
131
|
+
return node.getFrameId() + '#' + node.id();
|
|
101
132
|
}
|