chrome-devtools-frontend 1.0.941095 → 1.0.943017
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/WATCHLISTS +1 -1
- package/config/gni/all_devtools_files.gni +0 -62
- package/config/gni/devtools_grd_files.gni +55 -19
- package/config/gni/devtools_image_files.gni +2 -3
- package/front_end/.eslintrc.js +12 -1
- package/front_end/Images/src/feedback_button_icon.svg +3 -0
- package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
- package/front_end/Tests.js +1 -32
- package/front_end/core/common/Color.ts +5 -0
- package/front_end/core/i18n/locales/en-US.json +20 -29
- package/front_end/core/i18n/locales/en-XL.json +20 -29
- package/front_end/core/sdk/CPUProfilerModel.ts +7 -9
- package/front_end/core/sdk/ConsoleModel.ts +26 -28
- package/front_end/core/sdk/DebuggerModel.ts +4 -14
- package/front_end/core/sdk/sdk-meta.ts +17 -3
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -11
- package/front_end/entrypoints/inspector/inspector.json +1 -3
- package/front_end/entrypoints/js_app/js_app.json +1 -3
- package/front_end/entrypoints/main/MainImpl.ts +26 -0
- package/front_end/entrypoints/node_app/node_app.json +1 -3
- package/front_end/entrypoints/shell/shell.js +0 -11
- package/front_end/entrypoints/shell/shell.json +1 -5
- package/front_end/entrypoints/worker_app/worker_app.json +1 -7
- package/front_end/generated/InspectorBackendCommands.js +19 -0
- package/front_end/generated/protocol-mapping.d.ts +31 -1
- package/front_end/generated/protocol-proxy-api.d.ts +34 -2
- package/front_end/generated/protocol.d.ts +81 -6
- package/front_end/global_typings/global_defs.d.ts +5 -0
- package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +14 -2
- package/front_end/legacy_test_runner/legacy_test_runner.ts +10 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +11 -0
- package/front_end/models/formatter/SourceFormatter.ts +0 -10
- package/front_end/models/workspace/UISourceCode.ts +9 -42
- package/front_end/panels/animation/AnimationTimeline.ts +3 -3
- package/front_end/panels/application/ApplicationPanelSidebar.ts +3 -3
- package/front_end/panels/application/BackForwardCacheStrings.ts +3 -1
- package/front_end/panels/application/application-meta.ts +0 -3
- package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/console/ConsolePinPane.ts +21 -26
- package/front_end/panels/coverage/CoverageDecorationManager.ts +4 -5
- package/front_end/panels/coverage/CoverageView.ts +2 -105
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +11 -56
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -8
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
- package/front_end/panels/elements/components/adornerSettingsPane.css +0 -4
- package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
- package/front_end/panels/emulation/DeviceModeView.ts +2 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +3 -1
- package/front_end/panels/emulation/MediaQueryInspector.ts +3 -1
- package/front_end/panels/emulation/emulation-meta.ts +2 -4
- package/front_end/panels/issues/issues-meta.ts +0 -2
- package/front_end/panels/js_profiler/js_profiler-meta.ts +0 -3
- package/front_end/panels/layers/module.json +0 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
- package/front_end/panels/lighthouse/lighthouseStartView.css +4 -0
- package/front_end/panels/lighthouse/module.json +0 -6
- package/front_end/panels/media/media-meta.ts +0 -3
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -1
- package/front_end/panels/network/network-meta.ts +0 -3
- package/front_end/panels/profiler/CPUProfileView.ts +10 -3
- package/front_end/panels/profiler/profiler-meta.ts +0 -2
- package/front_end/panels/screencast/screencast-meta.ts +0 -3
- package/front_end/panels/security/security-meta.ts +0 -3
- package/front_end/panels/sources/BreakpointEditDialog.ts +16 -30
- package/front_end/panels/sources/CSSPlugin.ts +310 -331
- package/front_end/panels/sources/CallStackSidebarPane.ts +28 -34
- package/front_end/panels/sources/CoveragePlugin.ts +121 -6
- package/front_end/panels/sources/DebuggerPlugin.ts +1166 -1243
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +71 -101
- package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -3
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +26 -23
- package/front_end/panels/sources/Plugin.ts +20 -4
- package/front_end/panels/sources/ProfilePlugin.ts +185 -0
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
- package/front_end/panels/sources/ScriptOriginPlugin.ts +0 -10
- package/front_end/panels/sources/SnippetsPlugin.ts +1 -10
- package/front_end/panels/sources/SourcesPanel.ts +6 -5
- package/front_end/panels/sources/SourcesView.ts +10 -8
- package/front_end/panels/sources/TabbedEditorContainer.ts +31 -27
- package/front_end/panels/sources/UISourceCodeFrame.ts +335 -470
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/sources/sources-legacy.ts +0 -6
- package/front_end/panels/sources/sources-meta.ts +1 -4
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/timeline-meta.ts +0 -5
- package/front_end/third_party/codemirror.next/bundle.ts +9 -13
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -6
- package/front_end/third_party/codemirror.next/chunk/php.js +2 -6
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +2 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +279 -198
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +13 -11
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1128 -1158
- package/front_end/third_party/lighthouse/locales/ar-XB.json +211 -79
- package/front_end/third_party/lighthouse/locales/ar.json +213 -81
- package/front_end/third_party/lighthouse/locales/bg.json +211 -79
- package/front_end/third_party/lighthouse/locales/ca.json +212 -80
- package/front_end/third_party/lighthouse/locales/cs.json +211 -79
- package/front_end/third_party/lighthouse/locales/da.json +211 -79
- package/front_end/third_party/lighthouse/locales/de.json +211 -79
- package/front_end/third_party/lighthouse/locales/el.json +213 -81
- package/front_end/third_party/lighthouse/locales/en-GB.json +211 -79
- package/front_end/third_party/lighthouse/locales/en-US.json +186 -75
- package/front_end/third_party/lighthouse/locales/en-XA.json +211 -79
- package/front_end/third_party/lighthouse/locales/en-XL.json +186 -75
- package/front_end/third_party/lighthouse/locales/es-419.json +211 -79
- package/front_end/third_party/lighthouse/locales/es.json +212 -80
- package/front_end/third_party/lighthouse/locales/fi.json +211 -79
- package/front_end/third_party/lighthouse/locales/fil.json +211 -79
- package/front_end/third_party/lighthouse/locales/fr.json +211 -79
- package/front_end/third_party/lighthouse/locales/he.json +212 -80
- package/front_end/third_party/lighthouse/locales/hi.json +214 -82
- package/front_end/third_party/lighthouse/locales/hr.json +211 -79
- package/front_end/third_party/lighthouse/locales/hu.json +211 -79
- package/front_end/third_party/lighthouse/locales/id.json +211 -79
- package/front_end/third_party/lighthouse/locales/it.json +211 -79
- package/front_end/third_party/lighthouse/locales/ja.json +211 -79
- package/front_end/third_party/lighthouse/locales/ko.json +211 -79
- package/front_end/third_party/lighthouse/locales/lt.json +211 -79
- package/front_end/third_party/lighthouse/locales/lv.json +214 -82
- package/front_end/third_party/lighthouse/locales/nl.json +211 -79
- package/front_end/third_party/lighthouse/locales/no.json +211 -79
- package/front_end/third_party/lighthouse/locales/pl.json +211 -79
- package/front_end/third_party/lighthouse/locales/pt-PT.json +211 -79
- package/front_end/third_party/lighthouse/locales/pt.json +211 -79
- package/front_end/third_party/lighthouse/locales/ro.json +212 -80
- package/front_end/third_party/lighthouse/locales/ru.json +211 -79
- package/front_end/third_party/lighthouse/locales/sk.json +211 -79
- package/front_end/third_party/lighthouse/locales/sl.json +211 -79
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +211 -79
- package/front_end/third_party/lighthouse/locales/sr.json +211 -79
- package/front_end/third_party/lighthouse/locales/sv.json +211 -79
- package/front_end/third_party/lighthouse/locales/ta.json +218 -86
- package/front_end/third_party/lighthouse/locales/te.json +251 -119
- package/front_end/third_party/lighthouse/locales/th.json +211 -79
- package/front_end/third_party/lighthouse/locales/tr.json +211 -79
- package/front_end/third_party/lighthouse/locales/uk.json +212 -80
- package/front_end/third_party/lighthouse/locales/vi.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh-HK.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh-TW.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh.json +211 -79
- package/front_end/third_party/lighthouse/report/bundle.d.ts +72 -34
- package/front_end/third_party/lighthouse/report/bundle.js +698 -492
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -2
- package/front_end/third_party/lighthouse/report-assets/report.js +40 -35
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +2 -4
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +60 -68
- package/front_end/ui/components/data_grid/dataGrid.css +12 -10
- package/front_end/ui/components/docs/css_overview/start_view.html +25 -0
- package/front_end/ui/components/docs/css_overview/start_view.ts +14 -0
- package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
- package/front_end/ui/components/docs/panel_feedback/button.html +25 -0
- package/front_end/ui/components/docs/panel_feedback/button.ts +18 -0
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -14
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +67 -0
- package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +79 -36
- package/front_end/ui/components/text_editor/config.ts +42 -26
- package/front_end/ui/components/text_editor/javascript.ts +2 -3
- package/front_end/ui/components/text_editor/position.ts +17 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/text_editor/theme.ts +5 -1
- package/front_end/ui/legacy/Dialog.ts +3 -1
- package/front_end/ui/legacy/DropTarget.ts +2 -1
- package/front_end/ui/legacy/EmptyWidget.ts +2 -1
- package/front_end/ui/legacy/FilterBar.ts +2 -1
- package/front_end/ui/legacy/GlassPane.ts +4 -2
- package/front_end/ui/legacy/Infobar.ts +5 -8
- package/front_end/ui/legacy/InspectorView.ts +6 -1
- package/front_end/ui/legacy/ListWidget.ts +2 -1
- package/front_end/ui/legacy/PopoverHelper.ts +2 -1
- package/front_end/ui/legacy/ProgressIndicator.ts +2 -1
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -1
- package/front_end/ui/legacy/ReportView.ts +2 -1
- package/front_end/ui/legacy/RootView.ts +2 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +11 -7
- package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
- package/front_end/ui/legacy/SoftDropDown.ts +4 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -1
- package/front_end/ui/legacy/SuggestBox.ts +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +2 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +3 -2
- package/front_end/ui/legacy/Treeoutline.ts +3 -2
- package/front_end/ui/legacy/UIUtils.ts +16 -13
- package/front_end/ui/legacy/ViewManager.ts +2 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -3
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +35 -131
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -2
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +3 -6
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +19 -14
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +501 -252
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -0
- package/front_end/ui/legacy/components/source_frame/module.json +0 -3
- package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -11
- package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +3 -1
- package/front_end/ui/legacy/components/text_editor/module.json +0 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -15
- package/front_end/ui/legacy/radioButton.css +1 -13
- package/front_end/ui/legacy/textButton.css +5 -4
- package/front_end/ui/legacy/themeColors.css +36 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
- package/front_end/ui/legacy/utils/append-style.ts +9 -4
- package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +2 -2
- package/front_end/ui/legacy/utils/inject-core-styles.ts +7 -4
- package/package.json +1 -1
- package/scripts/build/generate_css_js_files.js +23 -9
- package/scripts/build/ninja/generate_css.gni +10 -1
- package/scripts/eslint_rules/lib/check_css_import.js +2 -2
- package/scripts/eslint_rules/tests/check_css_import_test.js +12 -0
- package/front_end/Images/radioDot-dark-theme.png +0 -0
- package/front_end/Images/radioDot.png +0 -0
- package/front_end/emulated_devices/module.json +0 -6
- package/front_end/panels/application/module.json +0 -7
- package/front_end/panels/emulation/module.json +0 -11
- package/front_end/panels/issues/module.json +0 -6
- package/front_end/panels/js_profiler/module.json +0 -5
- package/front_end/panels/layer_viewer/module.json +0 -6
- package/front_end/panels/media/module.json +0 -6
- package/front_end/panels/network/module.json +0 -6
- package/front_end/panels/profiler/module.json +0 -6
- package/front_end/panels/screencast/module.json +0 -6
- package/front_end/panels/security/module.json +0 -5
- package/front_end/panels/timeline/module.json +0 -8
- package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
- package/front_end/ui/legacy/components/perf_ui/module.json +0 -13
- package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +0 -1030
- package/front_end/ui/legacy/module.json +0 -41
|
@@ -252,6 +252,10 @@ declare namespace Protocol {
|
|
|
252
252
|
* All other properties
|
|
253
253
|
*/
|
|
254
254
|
properties?: AXProperty[];
|
|
255
|
+
/**
|
|
256
|
+
* ID for this node's parent.
|
|
257
|
+
*/
|
|
258
|
+
parentId?: AXNodeId;
|
|
255
259
|
/**
|
|
256
260
|
* IDs for each of this node's child nodes.
|
|
257
261
|
*/
|
|
@@ -260,6 +264,10 @@ declare namespace Protocol {
|
|
|
260
264
|
* The backend ID for the associated DOM node, if any.
|
|
261
265
|
*/
|
|
262
266
|
backendDOMNodeId?: DOM.BackendNodeId;
|
|
267
|
+
/**
|
|
268
|
+
* The frame ID for the frame associated with this nodes document.
|
|
269
|
+
*/
|
|
270
|
+
frameId?: Page.FrameId;
|
|
263
271
|
}
|
|
264
272
|
|
|
265
273
|
export interface GetPartialAXTreeRequest {
|
|
@@ -310,6 +318,37 @@ declare namespace Protocol {
|
|
|
310
318
|
nodes: AXNode[];
|
|
311
319
|
}
|
|
312
320
|
|
|
321
|
+
export interface GetRootAXNodeRequest {
|
|
322
|
+
/**
|
|
323
|
+
* The frame in whose document the node resides.
|
|
324
|
+
* If omitted, the root frame is used.
|
|
325
|
+
*/
|
|
326
|
+
frameId?: Page.FrameId;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface GetRootAXNodeResponse extends ProtocolResponseWithError {
|
|
330
|
+
node: AXNode;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface GetAXNodeAndAncestorsRequest {
|
|
334
|
+
/**
|
|
335
|
+
* Identifier of the node to get.
|
|
336
|
+
*/
|
|
337
|
+
nodeId?: DOM.NodeId;
|
|
338
|
+
/**
|
|
339
|
+
* Identifier of the backend node to get.
|
|
340
|
+
*/
|
|
341
|
+
backendNodeId?: DOM.BackendNodeId;
|
|
342
|
+
/**
|
|
343
|
+
* JavaScript object id of the node wrapper to get.
|
|
344
|
+
*/
|
|
345
|
+
objectId?: Runtime.RemoteObjectId;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface GetAXNodeAndAncestorsResponse extends ProtocolResponseWithError {
|
|
349
|
+
nodes: AXNode[];
|
|
350
|
+
}
|
|
351
|
+
|
|
313
352
|
export interface GetChildAXNodesRequest {
|
|
314
353
|
id: AXNodeId;
|
|
315
354
|
/**
|
|
@@ -353,6 +392,27 @@ declare namespace Protocol {
|
|
|
353
392
|
*/
|
|
354
393
|
nodes: AXNode[];
|
|
355
394
|
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* The loadComplete event mirrors the load complete event sent by the browser to assistive
|
|
398
|
+
* technology when the web page has finished loading.
|
|
399
|
+
*/
|
|
400
|
+
export interface LoadCompleteEvent {
|
|
401
|
+
/**
|
|
402
|
+
* New document root node.
|
|
403
|
+
*/
|
|
404
|
+
root: AXNode;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The nodesUpdated event is sent every time a previously requested node has changed the in tree.
|
|
409
|
+
*/
|
|
410
|
+
export interface NodesUpdatedEvent {
|
|
411
|
+
/**
|
|
412
|
+
* Updated node data.
|
|
413
|
+
*/
|
|
414
|
+
nodes: AXNode[];
|
|
415
|
+
}
|
|
356
416
|
}
|
|
357
417
|
|
|
358
418
|
export namespace Animation {
|
|
@@ -4878,6 +4938,7 @@ declare namespace Protocol {
|
|
|
4878
4938
|
*/
|
|
4879
4939
|
export interface UserAgentMetadata {
|
|
4880
4940
|
brands?: UserAgentBrandVersion[];
|
|
4941
|
+
fullVersionList?: UserAgentBrandVersion[];
|
|
4881
4942
|
fullVersion?: string;
|
|
4882
4943
|
platform: string;
|
|
4883
4944
|
platformVersion: string;
|
|
@@ -6987,9 +7048,10 @@ declare namespace Protocol {
|
|
|
6987
7048
|
*/
|
|
6988
7049
|
logId: string;
|
|
6989
7050
|
/**
|
|
6990
|
-
* Issuance date.
|
|
7051
|
+
* Issuance date. Unlike TimeSinceEpoch, this contains the number of
|
|
7052
|
+
* milliseconds since January 1, 1970, UTC, not the number of seconds.
|
|
6991
7053
|
*/
|
|
6992
|
-
timestamp:
|
|
7054
|
+
timestamp: number;
|
|
6993
7055
|
/**
|
|
6994
7056
|
* Hash algorithm.
|
|
6995
7057
|
*/
|
|
@@ -9844,6 +9906,7 @@ declare namespace Protocol {
|
|
|
9844
9906
|
ChUaModel = 'ch-ua-model',
|
|
9845
9907
|
ChUaMobile = 'ch-ua-mobile',
|
|
9846
9908
|
ChUaFullVersion = 'ch-ua-full-version',
|
|
9909
|
+
ChUaFullVersionList = 'ch-ua-full-version-list',
|
|
9847
9910
|
ChUaPlatformVersion = 'ch-ua-platform-version',
|
|
9848
9911
|
ChUaReduced = 'ch-ua-reduced',
|
|
9849
9912
|
ChViewportHeight = 'ch-viewport-height',
|
|
@@ -9867,6 +9930,7 @@ declare namespace Protocol {
|
|
|
9867
9930
|
Hid = 'hid',
|
|
9868
9931
|
IdleDetection = 'idle-detection',
|
|
9869
9932
|
InterestCohort = 'interest-cohort',
|
|
9933
|
+
JoinAdInterestGroup = 'join-ad-interest-group',
|
|
9870
9934
|
KeyboardMap = 'keyboard-map',
|
|
9871
9935
|
Magnetometer = 'magnetometer',
|
|
9872
9936
|
Microphone = 'microphone',
|
|
@@ -9875,6 +9939,7 @@ declare namespace Protocol {
|
|
|
9875
9939
|
Payment = 'payment',
|
|
9876
9940
|
PictureInPicture = 'picture-in-picture',
|
|
9877
9941
|
PublickeyCredentialsGet = 'publickey-credentials-get',
|
|
9942
|
+
RunAdAuction = 'run-ad-auction',
|
|
9878
9943
|
ScreenWakeLock = 'screen-wake-lock',
|
|
9879
9944
|
Serial = 'serial',
|
|
9880
9945
|
SharedAutofill = 'shared-autofill',
|
|
@@ -11261,6 +11326,16 @@ declare namespace Protocol {
|
|
|
11261
11326
|
data: binary;
|
|
11262
11327
|
}
|
|
11263
11328
|
|
|
11329
|
+
export const enum SetSPCTransactionModeRequestMode {
|
|
11330
|
+
None = 'none',
|
|
11331
|
+
Autoaccept = 'autoaccept',
|
|
11332
|
+
Autoreject = 'autoreject',
|
|
11333
|
+
}
|
|
11334
|
+
|
|
11335
|
+
export interface SetSPCTransactionModeRequest {
|
|
11336
|
+
mode: SetSPCTransactionModeRequestMode;
|
|
11337
|
+
}
|
|
11338
|
+
|
|
11264
11339
|
export interface GenerateTestReportRequest {
|
|
11265
11340
|
/**
|
|
11266
11341
|
* Message to be displayed in the report.
|
|
@@ -12084,7 +12159,7 @@ declare namespace Protocol {
|
|
|
12084
12159
|
}
|
|
12085
12160
|
|
|
12086
12161
|
/**
|
|
12087
|
-
* The security state of the page changed.
|
|
12162
|
+
* The security state of the page changed. No longer being sent.
|
|
12088
12163
|
*/
|
|
12089
12164
|
export interface SecurityStateChangedEvent {
|
|
12090
12165
|
/**
|
|
@@ -12096,8 +12171,8 @@ declare namespace Protocol {
|
|
|
12096
12171
|
*/
|
|
12097
12172
|
schemeIsCryptographic: boolean;
|
|
12098
12173
|
/**
|
|
12099
|
-
*
|
|
12100
|
-
*
|
|
12174
|
+
* Previously a list of explanations for the security state. Now always
|
|
12175
|
+
* empty.
|
|
12101
12176
|
*/
|
|
12102
12177
|
explanations: SecurityStateExplanation[];
|
|
12103
12178
|
/**
|
|
@@ -12105,7 +12180,7 @@ declare namespace Protocol {
|
|
|
12105
12180
|
*/
|
|
12106
12181
|
insecureContentStatus: InsecureContentStatus;
|
|
12107
12182
|
/**
|
|
12108
|
-
* Overrides user-visible description of the state.
|
|
12183
|
+
* Overrides user-visible description of the state. Always omitted.
|
|
12109
12184
|
*/
|
|
12110
12185
|
summary?: string;
|
|
12111
12186
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
+
import * as Common from '../../core/common/common.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @fileoverview using private properties isn't a Closure violation in tests.
|
|
@@ -52,8 +53,7 @@ BindingsTestRunner.TestFileSystem.prototype = {
|
|
|
52
53
|
|
|
53
54
|
function created(event) {
|
|
54
55
|
const fileSystem = event.data;
|
|
55
|
-
|
|
56
|
-
if (fileSystem.path() !== fileSystemPath) {
|
|
56
|
+
if (fileSystem.path() !== Common.ParsedURL.ParsedURL.rawPathToUrlString(fileSystemPath)) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -113,6 +113,14 @@ ConsoleTestRunner.prepareConsoleMessageText = function(messageElement) {
|
|
|
113
113
|
return messageText;
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* @param {!Element} messageElement
|
|
118
|
+
* @return {string}
|
|
119
|
+
*/
|
|
120
|
+
ConsoleTestRunner.prepareConsoleMessageTextTrimmed = function(messageElement) {
|
|
121
|
+
return ConsoleTestRunner.prepareConsoleMessageText(messageElement).replace(/[ ]+/g, ' ');
|
|
122
|
+
};
|
|
123
|
+
|
|
116
124
|
/**
|
|
117
125
|
* @param {!Console.ConsoleViewMessage} viewMessage
|
|
118
126
|
* @param {boolean} forceInvalidate
|
|
@@ -334,15 +342,19 @@ ConsoleTestRunner.dumpConsoleMessagesWithStyles = function() {
|
|
|
334
342
|
|
|
335
343
|
/**
|
|
336
344
|
* @param {boolean=} sortMessages
|
|
345
|
+
* @param {boolean=} trimMessages
|
|
337
346
|
*/
|
|
338
|
-
ConsoleTestRunner.dumpConsoleMessagesWithClasses = async function(sortMessages) {
|
|
347
|
+
ConsoleTestRunner.dumpConsoleMessagesWithClasses = async function(sortMessages, trimMessages) {
|
|
339
348
|
const result = [];
|
|
340
349
|
const messageViews = Console.ConsoleView.instance().visibleViewMessages;
|
|
341
350
|
for (let i = 0; i < messageViews.length; ++i) {
|
|
342
351
|
const element = messageViews[i].element();
|
|
343
352
|
const contentElement = messageViews[i].contentElement();
|
|
344
353
|
await TestRunner.waitForPendingLiveLocationUpdates();
|
|
345
|
-
|
|
354
|
+
let messageText = ConsoleTestRunner.prepareConsoleMessageText(element);
|
|
355
|
+
if (trimMessages) {
|
|
356
|
+
messageText = messageText.replace(/[ ]+/g, ' ');
|
|
357
|
+
}
|
|
346
358
|
result.push(messageText + ' ' + element.getAttribute('class') + ' > ' + contentElement.getAttribute('class'));
|
|
347
359
|
}
|
|
348
360
|
if (sortMessages) {
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../core/common/common-legacy.js';
|
|
6
|
+
import '../models/text_utils/text_utils-legacy.js';
|
|
7
|
+
import '../core/host/host-legacy.js';
|
|
8
|
+
import '../core/protocol_client/protocol_client-legacy.js';
|
|
9
|
+
import '../ui/legacy/legacy-legacy.js';
|
|
10
|
+
import '../models/workspace/workspace-legacy.js';
|
|
11
|
+
import '../models/bindings/bindings-legacy.js';
|
|
12
|
+
import '../ui/legacy/components/utils/utils-legacy.js';
|
|
13
|
+
import '../models/persistence/persistence-legacy.js';
|
|
14
|
+
import '../models/extensions/extensions-legacy.js';
|
|
5
15
|
import '../entrypoints/devtools_app/devtools_app.js';
|
|
6
16
|
import '../panels/accessibility/accessibility-legacy.js';
|
|
7
17
|
import '../panels/animation/animation-legacy.js';
|
|
@@ -12,7 +22,6 @@ import '../ui/legacy/components/data_grid/data_grid-legacy.js';
|
|
|
12
22
|
import '../third_party/diff/diff-legacy.js';
|
|
13
23
|
import '../models/extensions/extensions-legacy.js';
|
|
14
24
|
import '../models/formatter/formatter-legacy.js';
|
|
15
|
-
import '../core/host/host-legacy.js';
|
|
16
25
|
import '../ui/legacy/components/inline_editor/inline_editor-legacy.js';
|
|
17
26
|
import '../core/root/root-legacy.js';
|
|
18
27
|
import '../core/sdk/sdk-legacy.js';
|
|
@@ -393,6 +393,16 @@ export function textContentWithLineBreaks(node) {
|
|
|
393
393
|
return buffer;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
+
/**
|
|
397
|
+
* @param {!Node} node
|
|
398
|
+
* @return {string}
|
|
399
|
+
*/
|
|
400
|
+
export function textContentWithLineBreaksTrimmed(node) {
|
|
401
|
+
// We want to allow single empty lines (2 white space characters), but
|
|
402
|
+
// compress occurences of 3 or more whitespaces.
|
|
403
|
+
return textContentWithLineBreaks(node).replace(/\s{3,}/g, ' ');
|
|
404
|
+
}
|
|
405
|
+
|
|
396
406
|
/**
|
|
397
407
|
* @param {!Node} node
|
|
398
408
|
* @return {string}
|
|
@@ -1459,6 +1469,7 @@ TestRunner.showPanel = showPanel;
|
|
|
1459
1469
|
TestRunner.createKeyEvent = createKeyEvent;
|
|
1460
1470
|
TestRunner.safeWrap = safeWrap;
|
|
1461
1471
|
TestRunner.textContentWithLineBreaks = textContentWithLineBreaks;
|
|
1472
|
+
TestRunner.textContentWithLineBreaksTrimmed = textContentWithLineBreaksTrimmed;
|
|
1462
1473
|
TestRunner.textContentWithoutStyles = textContentWithoutStyles;
|
|
1463
1474
|
TestRunner.evaluateInPagePromise = evaluateInPagePromise;
|
|
1464
1475
|
TestRunner.callFunctionInPageAsync = callFunctionInPageAsync;
|
|
@@ -142,16 +142,6 @@ export class SourceFormatter {
|
|
|
142
142
|
await this.scriptMapping.setSourceMappingEnabled(formatData, true);
|
|
143
143
|
await this.styleMapping.setSourceMappingEnabled(formatData, true);
|
|
144
144
|
cacheEntry.formatData = formatData;
|
|
145
|
-
|
|
146
|
-
for (const decoration of uiSourceCode.allDecorations()) {
|
|
147
|
-
const range = decoration.range();
|
|
148
|
-
const startLocation = formattedMapping.originalToFormatted(range.startLine, range.startColumn);
|
|
149
|
-
const endLocation = formattedMapping.originalToFormatted(range.endLine, range.endColumn);
|
|
150
|
-
formattedUISourceCode.addDecoration(
|
|
151
|
-
new TextUtils.TextRange.TextRange(startLocation[0], startLocation[1], endLocation[0], endLocation[1]),
|
|
152
|
-
(decoration.type() as string), decoration.data());
|
|
153
|
-
}
|
|
154
|
-
|
|
155
145
|
resolve(formatData);
|
|
156
146
|
} catch (e) {
|
|
157
147
|
reject(e);
|
|
@@ -60,7 +60,7 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
60
60
|
private nameInternal: string;
|
|
61
61
|
private contentTypeInternal: Common.ResourceType.ResourceType;
|
|
62
62
|
private requestContentPromise: Promise<TextUtils.ContentProvider.DeferredContent>|null;
|
|
63
|
-
private decorations:
|
|
63
|
+
private decorations: Map<string, any> = new Map();
|
|
64
64
|
private hasCommitsInternal: boolean;
|
|
65
65
|
private messagesInternal: Set<Message>|null;
|
|
66
66
|
private contentLoadedInternal: boolean;
|
|
@@ -94,7 +94,6 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
94
94
|
|
|
95
95
|
this.contentTypeInternal = contentType;
|
|
96
96
|
this.requestContentPromise = null;
|
|
97
|
-
this.decorations = null;
|
|
98
97
|
this.hasCommitsInternal = false;
|
|
99
98
|
this.messagesInternal = null;
|
|
100
99
|
this.contentLoadedInternal = false;
|
|
@@ -455,45 +454,15 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
455
454
|
this.messagesInternal = null;
|
|
456
455
|
}
|
|
457
456
|
|
|
458
|
-
|
|
459
|
-
this.
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
addDecoration(range: TextUtils.TextRange.TextRange, type: string, data: any): void {
|
|
463
|
-
const marker = new LineMarker(range, type, data);
|
|
464
|
-
if (!this.decorations) {
|
|
465
|
-
this.decorations = new Platform.MapUtilities.Multimap();
|
|
466
|
-
}
|
|
467
|
-
this.decorations.set(type, marker);
|
|
468
|
-
this.dispatchEventToListeners(Events.LineDecorationAdded, marker);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
removeDecorationsForType(type: string): void {
|
|
472
|
-
if (!this.decorations) {
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
const markers = this.decorations.get(type);
|
|
476
|
-
this.decorations.deleteAll(type);
|
|
477
|
-
markers.forEach(marker => {
|
|
478
|
-
this.dispatchEventToListeners(Events.LineDecorationRemoved, marker);
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
allDecorations(): LineMarker[] {
|
|
483
|
-
return this.decorations ? this.decorations.valuesArray() : [];
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
removeAllDecorations(): void {
|
|
487
|
-
if (!this.decorations) {
|
|
488
|
-
return;
|
|
457
|
+
setDecorationData(type: string, data: any): void {
|
|
458
|
+
if (data !== this.decorations.get(type)) {
|
|
459
|
+
this.decorations.set(type, data);
|
|
460
|
+
this.dispatchEventToListeners(Events.DecorationChanged, type);
|
|
489
461
|
}
|
|
490
|
-
const decorationList = this.decorations.valuesArray();
|
|
491
|
-
this.decorations.clear();
|
|
492
|
-
decorationList.forEach(marker => this.dispatchEventToListeners(Events.LineDecorationRemoved, marker));
|
|
493
462
|
}
|
|
494
463
|
|
|
495
|
-
|
|
496
|
-
return this.decorations
|
|
464
|
+
getDecorationData(type: string): any {
|
|
465
|
+
return this.decorations.get(type);
|
|
497
466
|
}
|
|
498
467
|
|
|
499
468
|
disableEdit(): void {
|
|
@@ -513,8 +482,7 @@ export enum Events {
|
|
|
513
482
|
TitleChanged = 'TitleChanged',
|
|
514
483
|
MessageAdded = 'MessageAdded',
|
|
515
484
|
MessageRemoved = 'MessageRemoved',
|
|
516
|
-
|
|
517
|
-
LineDecorationRemoved = 'LineDecorationRemoved',
|
|
485
|
+
DecorationChanged = 'DecorationChanged',
|
|
518
486
|
}
|
|
519
487
|
|
|
520
488
|
export interface WorkingCopyCommitedEvent {
|
|
@@ -529,8 +497,7 @@ export type EventTypes = {
|
|
|
529
497
|
[Events.TitleChanged]: UISourceCode,
|
|
530
498
|
[Events.MessageAdded]: Message,
|
|
531
499
|
[Events.MessageRemoved]: Message,
|
|
532
|
-
[Events.
|
|
533
|
-
[Events.LineDecorationRemoved]: LineMarker,
|
|
500
|
+
[Events.DecorationChanged]: string,
|
|
534
501
|
};
|
|
535
502
|
|
|
536
503
|
export class UILocation {
|
|
@@ -438,9 +438,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements SDK.TargetManag
|
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
private togglePause(pause: boolean): void {
|
|
441
|
-
if (this.#scrubberPlayer) {
|
|
442
|
-
this.#scrubberPlayer.playbackRate = this.effectivePlaybackRate();
|
|
443
|
-
}
|
|
444
441
|
if (this.#selectedGroup) {
|
|
445
442
|
this.#selectedGroup.togglePause(pause);
|
|
446
443
|
const preview = this.#previewMap.get(this.#selectedGroup);
|
|
@@ -448,6 +445,9 @@ export class AnimationTimeline extends UI.Widget.VBox implements SDK.TargetManag
|
|
|
448
445
|
preview.element.classList.toggle('paused', pause);
|
|
449
446
|
}
|
|
450
447
|
}
|
|
448
|
+
if (this.#scrubberPlayer) {
|
|
449
|
+
this.#scrubberPlayer.playbackRate = this.effectivePlaybackRate();
|
|
450
|
+
}
|
|
451
451
|
this.updateControlButton();
|
|
452
452
|
}
|
|
453
453
|
|
|
@@ -1970,13 +1970,13 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
|
|
|
1970
1970
|
contextMenu.show();
|
|
1971
1971
|
}
|
|
1972
1972
|
|
|
1973
|
-
async revealResource(
|
|
1973
|
+
async revealResource(lineNumber?: number, columnNumber?: number): Promise<void> {
|
|
1974
1974
|
this.revealAndSelect(true);
|
|
1975
1975
|
const view = await this.panel.scheduleShowView(this.preparePreview());
|
|
1976
|
-
if (!(view instanceof SourceFrame.ResourceSourceFrame.ResourceSourceFrame) || typeof
|
|
1976
|
+
if (!(view instanceof SourceFrame.ResourceSourceFrame.ResourceSourceFrame) || typeof lineNumber !== 'number') {
|
|
1977
1977
|
return;
|
|
1978
1978
|
}
|
|
1979
|
-
view.revealPosition(
|
|
1979
|
+
view.revealPosition({lineNumber, columnNumber}, true);
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
1982
|
|
|
@@ -16,9 +16,10 @@ const UIStrings = {
|
|
|
16
16
|
'Back/forward cache is disabled by flags. Visit chrome://flags/#back-forward-cache to enable it locally on this device.',
|
|
17
17
|
/**
|
|
18
18
|
* @description Description text for not restored reason RelatedActiveContentsExist.
|
|
19
|
+
* Note: "window.open()" is the name of a JavaScript method and should not be translated.
|
|
19
20
|
*/
|
|
20
21
|
relatedActiveContentsExist:
|
|
21
|
-
'The page was opened using `window.open()
|
|
22
|
+
'The page was opened using \'`window.open()`\' and another tab has a reference to it, or the page opened a window.',
|
|
22
23
|
/**
|
|
23
24
|
* @description Description text for not restored reason HTTPStatusNotOK.
|
|
24
25
|
*/
|
|
@@ -83,6 +84,7 @@ const UIStrings = {
|
|
|
83
84
|
sessionRestored: 'Chrome restarted and cleared the back/forward cache entries.',
|
|
84
85
|
/**
|
|
85
86
|
* @description Description text for not restored reason ServiceWorkerPostMessage.
|
|
87
|
+
* Note: "MessageEvent" should not be translated.
|
|
86
88
|
*/
|
|
87
89
|
serviceWorkerPostMessage: 'A service worker attempted to send the page in back/forward cache a `MessageEvent`.',
|
|
88
90
|
/**
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
|
-
import * as Root from '../../core/root/root.js';
|
|
7
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
8
|
|
|
@@ -47,8 +46,6 @@ let loadedResourcesModule: (typeof Resources|undefined);
|
|
|
47
46
|
|
|
48
47
|
async function loadResourcesModule(): Promise<typeof Resources> {
|
|
49
48
|
if (!loadedResourcesModule) {
|
|
50
|
-
// Side-effect import resources in module.json
|
|
51
|
-
await Root.Runtime.Runtime.instance().loadModulePromise('panels/application');
|
|
52
49
|
loadedResourcesModule = await import('./application.js');
|
|
53
50
|
}
|
|
54
51
|
return loadedResourcesModule;
|
|
@@ -36,7 +36,7 @@ export class EndpointsGrid extends HTMLElement {
|
|
|
36
36
|
// clang-format off
|
|
37
37
|
render(html`
|
|
38
38
|
<div class="reporting-container">
|
|
39
|
-
<div class="reporting-header"
|
|
39
|
+
<div class="reporting-header">${i18n.i18n.lockedString('Endpoints')}</div>
|
|
40
40
|
<div class="reporting-placeholder">
|
|
41
41
|
<div>${i18nString(UIStrings.noEndpointsToDisplay)}</div>
|
|
42
42
|
</div>
|
|
@@ -136,7 +136,7 @@ export class ReportsGrid extends HTMLElement {
|
|
|
136
136
|
// clang-format off
|
|
137
137
|
render(html`
|
|
138
138
|
<div class="reporting-container">
|
|
139
|
-
<div class="reporting-header"
|
|
139
|
+
<div class="reporting-header">${i18n.i18n.lockedString('Reports')}</div>
|
|
140
140
|
${this.reports.length > 0 ? html`
|
|
141
141
|
<${DataGrid.DataGridController.DataGridController.litTagName} .data=${
|
|
142
142
|
reportsGridData as DataGrid.DataGridController.DataGridControllerData}>
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
9
|
+
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
8
10
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
9
11
|
// eslint-disable-next-line rulesdir/es_modules_import
|
|
10
12
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
11
|
-
import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
12
|
-
import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
13
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
14
|
|
|
15
15
|
import consolePinPaneStyles from './consolePinPane.css.js';
|
|
@@ -171,11 +171,10 @@ export class ConsolePin {
|
|
|
171
171
|
private readonly pinPreview: HTMLElement;
|
|
172
172
|
private lastResult: SDK.RuntimeModel.EvaluationResult|null;
|
|
173
173
|
private lastExecutionContext: SDK.RuntimeModel.ExecutionContext|null;
|
|
174
|
-
private editor: TextEditor.TextEditor.TextEditor
|
|
174
|
+
private editor: TextEditor.TextEditor.TextEditor;
|
|
175
175
|
private committedExpression: string;
|
|
176
176
|
private hovered: boolean;
|
|
177
177
|
private lastNode: SDK.RemoteObject.RemoteObject|null;
|
|
178
|
-
private readonly editorPromise: Promise<TextEditor.TextEditor.TextEditor>;
|
|
179
178
|
private consolePinNumber: number;
|
|
180
179
|
private deletePinIcon: UI.UIUtils.DevToolsCloseButton;
|
|
181
180
|
|
|
@@ -209,10 +208,10 @@ export class ConsolePin {
|
|
|
209
208
|
|
|
210
209
|
this.lastResult = null;
|
|
211
210
|
this.lastExecutionContext = null;
|
|
212
|
-
this.editor = null;
|
|
213
211
|
this.committedExpression = expression;
|
|
214
212
|
this.hovered = false;
|
|
215
213
|
this.lastNode = null;
|
|
214
|
+
this.editor = this.createEditor(expression, nameElement);
|
|
216
215
|
|
|
217
216
|
this.pinPreview.addEventListener('mouseenter', this.setHovered.bind(this, true), false);
|
|
218
217
|
this.pinPreview.addEventListener('mouseleave', this.setHovered.bind(this, false), false);
|
|
@@ -229,22 +228,19 @@ export class ConsolePin {
|
|
|
229
228
|
event.consume();
|
|
230
229
|
}
|
|
231
230
|
});
|
|
232
|
-
this.editorPromise = this.createEditor(expression, nameElement);
|
|
233
231
|
}
|
|
234
232
|
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
const TE = await import('../../ui/components/text_editor/text_editor.js');
|
|
238
|
-
this.editor = new TE.TextEditor.TextEditor(CM.EditorState.create({
|
|
233
|
+
createEditor(expression: string, parent: HTMLElement): TextEditor.TextEditor.TextEditor {
|
|
234
|
+
const editor = new TextEditor.TextEditor.TextEditor(CodeMirror.EditorState.create({
|
|
239
235
|
doc: expression,
|
|
240
236
|
extensions: [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
237
|
+
CodeMirror.EditorView.contentAttributes.of({'aria-label': i18nString(UIStrings.liveExpressionEditor)}),
|
|
238
|
+
CodeMirror.EditorView.lineWrapping,
|
|
239
|
+
CodeMirror.javascript.javascriptLanguage,
|
|
240
|
+
TextEditor.JavaScript.completion(),
|
|
241
|
+
TextEditor.Config.showCompletionHint,
|
|
242
|
+
CodeMirror.placeholder(i18nString(UIStrings.expression)),
|
|
243
|
+
CodeMirror.keymap.of([
|
|
248
244
|
{
|
|
249
245
|
key: 'Escape',
|
|
250
246
|
run: (view: CodeMirror.EditorView): boolean => {
|
|
@@ -261,13 +257,13 @@ export class ConsolePin {
|
|
|
261
257
|
},
|
|
262
258
|
},
|
|
263
259
|
]),
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
260
|
+
CodeMirror.EditorView.domEventHandlers({blur: (_e, view) => this.onBlur(view)}),
|
|
261
|
+
TextEditor.Config.baseConfiguration(expression),
|
|
262
|
+
TextEditor.Config.autocompletion,
|
|
267
263
|
],
|
|
268
264
|
}));
|
|
269
|
-
parent.appendChild(
|
|
270
|
-
return
|
|
265
|
+
parent.appendChild(editor);
|
|
266
|
+
return editor;
|
|
271
267
|
}
|
|
272
268
|
|
|
273
269
|
onBlur(editor: CodeMirror.EditorView): void {
|
|
@@ -305,9 +301,9 @@ export class ConsolePin {
|
|
|
305
301
|
}
|
|
306
302
|
|
|
307
303
|
async focus(): Promise<void> {
|
|
308
|
-
const editor = this.editor
|
|
304
|
+
const editor = this.editor;
|
|
309
305
|
editor.editor.focus();
|
|
310
|
-
editor.
|
|
306
|
+
editor.dispatch({selection: {anchor: editor.state.doc.length}});
|
|
311
307
|
}
|
|
312
308
|
|
|
313
309
|
appendToContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
|
|
@@ -322,8 +318,7 @@ export class ConsolePin {
|
|
|
322
318
|
if (!this.editor) {
|
|
323
319
|
return;
|
|
324
320
|
}
|
|
325
|
-
const
|
|
326
|
-
const text = TE.Config.contentIncludingHint(this.editor.editor);
|
|
321
|
+
const text = TextEditor.Config.contentIncludingHint(this.editor.editor);
|
|
327
322
|
const isEditing = this.pinElement.hasFocus();
|
|
328
323
|
const throwOnSideEffect = isEditing && text !== this.committedExpression;
|
|
329
324
|
const timeout = throwOnSideEffect ? 250 : undefined;
|
|
@@ -24,7 +24,7 @@ export class CoverageDecorationManager {
|
|
|
24
24
|
this.uiSourceCodeByContentProvider = new Platform.MapUtilities.Multimap();
|
|
25
25
|
|
|
26
26
|
for (const uiSourceCode of Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes()) {
|
|
27
|
-
uiSourceCode.
|
|
27
|
+
uiSourceCode.setDecorationData(decoratorType, this);
|
|
28
28
|
}
|
|
29
29
|
Workspace.Workspace.WorkspaceImpl.instance().addEventListener(
|
|
30
30
|
Workspace.Workspace.Events.UISourceCodeAdded, this.onUISourceCodeAdded, this);
|
|
@@ -32,7 +32,7 @@ export class CoverageDecorationManager {
|
|
|
32
32
|
|
|
33
33
|
reset(): void {
|
|
34
34
|
for (const uiSourceCode of Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes()) {
|
|
35
|
-
uiSourceCode.
|
|
35
|
+
uiSourceCode.setDecorationData(decoratorType, undefined);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -45,8 +45,7 @@ export class CoverageDecorationManager {
|
|
|
45
45
|
update(updatedEntries: CoverageInfo[]): void {
|
|
46
46
|
for (const entry of updatedEntries) {
|
|
47
47
|
for (const uiSourceCode of this.uiSourceCodeByContentProvider.get(entry.getContentProvider())) {
|
|
48
|
-
uiSourceCode.
|
|
49
|
-
uiSourceCode.addLineDecoration(0, decoratorType, this);
|
|
48
|
+
uiSourceCode.setDecorationData(decoratorType, this);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
}
|
|
@@ -185,7 +184,7 @@ export class CoverageDecorationManager {
|
|
|
185
184
|
|
|
186
185
|
private onUISourceCodeAdded(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
187
186
|
const uiSourceCode = event.data;
|
|
188
|
-
uiSourceCode.
|
|
187
|
+
uiSourceCode.setDecorationData(decoratorType, this);
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
export interface RawLocation {
|