chrome-devtools-frontend 1.0.942529 → 1.0.943986
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 -14
- package/config/gni/devtools_grd_files.gni +6 -5
- package/front_end/Tests.js +0 -32
- 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 +8 -8
- package/front_end/core/i18n/locales/en-XL.json +8 -8
- 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/sdk/AccessibilityModel.ts +99 -78
- package/front_end/core/sdk/CPUProfilerModel.ts +7 -9
- package/front_end/core/sdk/ConsoleModel.ts +27 -33
- package/front_end/core/sdk/NetworkManager.ts +3 -0
- package/front_end/core/sdk/Script.ts +0 -4
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +13 -12
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.js +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -4
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/inspector/inspector.js +1 -1
- package/front_end/entrypoints/inspector/inspector.json +1 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +2 -3
- package/front_end/entrypoints/js_app/js_app.js +1 -1
- package/front_end/entrypoints/js_app/js_app.json +1 -3
- package/front_end/entrypoints/main/MainImpl.ts +2 -2
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/entrypoints/ndb_app/ndb_app.js +1 -1
- package/front_end/entrypoints/node_app/node_app-meta.ts +0 -2
- package/front_end/entrypoints/node_app/node_app.js +1 -1
- package/front_end/entrypoints/node_app/node_app.json +1 -3
- package/front_end/entrypoints/node_main/node_main-meta.ts +0 -1
- package/front_end/entrypoints/shell/shell.json +1 -4
- package/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/worker_app/worker_app.js +1 -1
- package/front_end/entrypoints/worker_app/worker_app.json +1 -3
- package/front_end/generated/InspectorBackendCommands.js +21 -1
- package/front_end/generated/protocol-mapping.d.ts +32 -1
- package/front_end/generated/protocol-proxy-api.d.ts +36 -2
- package/front_end/generated/protocol.d.ts +120 -7
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +5 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -9
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -11
- package/front_end/models/formatter/SourceFormatter.ts +0 -15
- package/front_end/models/persistence/persistence-meta.ts +0 -1
- package/front_end/panels/accessibility/accessibility-meta.ts +0 -1
- package/front_end/panels/animation/animation-meta.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
- package/front_end/panels/application/BackForwardCacheStrings.ts +3 -1
- package/front_end/panels/application/BackForwardCacheView.ts +26 -26
- package/front_end/panels/application/application-meta.ts +0 -1
- package/front_end/panels/application/components/stackTraceRow.css +8 -0
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +1 -2
- package/front_end/panels/changes/changes-meta.ts +0 -1
- package/front_end/panels/console/ConsolePinPane.ts +2 -6
- package/front_end/panels/console/ConsoleViewMessage.ts +8 -1
- package/front_end/panels/console/console-meta.ts +0 -1
- package/front_end/panels/console_counters/console_counters-meta.ts +0 -1
- package/front_end/panels/coverage/coverage-meta.ts +0 -1
- package/front_end/panels/css_overview/css_overview-meta.ts +0 -1
- package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -1
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +96 -66
- package/front_end/panels/elements/AccessibilityTreeView.ts +76 -125
- package/front_end/panels/elements/ElementsPanel.ts +6 -7
- package/front_end/panels/elements/elements-meta.ts +0 -1
- package/front_end/panels/emulation/emulation-meta.ts +0 -1
- package/front_end/panels/help/help-meta.ts +0 -1
- package/front_end/panels/input/input-meta.ts +0 -1
- package/front_end/panels/issues/issues-meta.ts +0 -1
- package/front_end/panels/js_profiler/js_profiler-meta.ts +0 -4
- package/front_end/panels/layers/layers-meta.ts +0 -4
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -1
- package/front_end/panels/lighthouse/module.json +0 -3
- package/front_end/panels/media/media-meta.ts +0 -1
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +0 -1
- package/front_end/panels/network/network-meta.ts +1 -2
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +0 -1
- package/front_end/panels/profiler/CPUProfileView.ts +10 -3
- package/front_end/panels/profiler/profiler-meta.ts +0 -3
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +0 -1
- package/front_end/panels/screencast/screencast-meta.ts +0 -4
- package/front_end/panels/security/security-meta.ts +0 -1
- package/front_end/panels/sensors/sensors-meta.ts +0 -1
- package/front_end/panels/settings/emulation/emulation-meta.ts +0 -1
- package/front_end/panels/settings/settings-meta.ts +0 -1
- package/front_end/panels/sources/Plugin.ts +0 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +23 -49
- package/front_end/panels/sources/sources-meta.ts +2 -6
- package/front_end/panels/timeline/timeline-meta.ts +2 -9
- package/front_end/panels/web_audio/web_audio-meta.ts +0 -1
- package/front_end/panels/webauthn/webauthn-meta.ts +0 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/ui/components/docs/component_docs.ts +14 -0
- package/front_end/ui/components/docs/create_breadcrumbs.ts +1 -1
- package/front_end/ui/components/docs/toggle_dark_mode.ts +1 -0
- package/front_end/ui/components/docs/toggle_fonts.ts +2 -0
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -1
- package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +71 -8
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +8 -6
- package/front_end/ui/legacy/Dialog.ts +8 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +1 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngle.css +4 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -4
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -3
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -3
- package/front_end/ui/legacy/components/source_frame/FontView.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +2 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +6 -6
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +5 -2
- package/front_end/ui/legacy/textButton.css +5 -4
- 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/check_gn.js +0 -35
- package/scripts/eslint_rules/lib/es_modules_import.js +15 -24
- package/scripts/eslint_rules/tests/es_modules_import_test.js +8 -16
- package/front_end/emulated_devices/module.json +0 -4
- package/front_end/panels/js_profiler/module.json +0 -5
- package/front_end/panels/layers/module.json +0 -4
- package/front_end/panels/profiler/module.json +0 -3
- package/front_end/panels/screencast/module.json +0 -3
- package/front_end/panels/timeline/module.json +0 -5
- package/front_end/ui/legacy/components/source_frame/messagesPopover.css +0 -32
- package/front_end/ui/legacy/components/source_frame/module.json +0 -11
|
@@ -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
|
/**
|
|
@@ -17,67 +17,67 @@ import backForwardCacheViewStyles from './backForwardCacheView.css.js';
|
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
20
|
-
* @description Title text in
|
|
20
|
+
* @description Title text in back/forward cache view of the Application panel
|
|
21
21
|
*/
|
|
22
22
|
mainFrame: 'Main Frame',
|
|
23
23
|
/**
|
|
24
|
-
* @description Title text in
|
|
24
|
+
* @description Title text in back/forward cache view of the Application panel
|
|
25
25
|
*/
|
|
26
|
-
backForwardCacheTitle: 'Back
|
|
26
|
+
backForwardCacheTitle: 'Back/forward cache',
|
|
27
27
|
/**
|
|
28
28
|
* @description Status text for the status of the main frame
|
|
29
29
|
*/
|
|
30
30
|
unavailable: 'unavailable',
|
|
31
31
|
/**
|
|
32
|
-
* @description Entry name text in the
|
|
32
|
+
* @description Entry name text in the back/forward cache view of the Application panel
|
|
33
33
|
*/
|
|
34
34
|
url: 'URL',
|
|
35
35
|
/**
|
|
36
|
-
* @description Entry name text in the
|
|
36
|
+
* @description Entry name text in the back/forward cache view of the Application panel
|
|
37
37
|
*/
|
|
38
|
-
bfcacheStatus: 'Back
|
|
38
|
+
bfcacheStatus: 'Back/forward cache Status',
|
|
39
39
|
/**
|
|
40
|
-
* @description Status text for the status of the
|
|
40
|
+
* @description Status text for the status of the back/forward cache status
|
|
41
41
|
*/
|
|
42
42
|
unknown: 'unknown',
|
|
43
43
|
/**
|
|
44
|
-
* @description Status text for the status of the
|
|
45
|
-
* the
|
|
44
|
+
* @description Status text for the status of the back/forward cache status indicating that
|
|
45
|
+
* the back/forward cache was not used and a normal navigation occured instead.
|
|
46
46
|
*/
|
|
47
|
-
normalNavigation: 'Normal navigation (Not restored from
|
|
47
|
+
normalNavigation: 'Normal navigation (Not restored from back/forward cache)',
|
|
48
48
|
/**
|
|
49
|
-
* @description Status text for the status of the
|
|
50
|
-
* the
|
|
49
|
+
* @description Status text for the status of the back/forward cache status indicating that
|
|
50
|
+
* the back/forward cache was used to restore the page instead of reloading it.
|
|
51
51
|
*/
|
|
52
|
-
restoredFromBFCache: 'Restored from
|
|
52
|
+
restoredFromBFCache: 'Restored from back/forward cache',
|
|
53
53
|
/**
|
|
54
54
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
55
|
-
*
|
|
56
|
-
* page eligible for
|
|
55
|
+
* back/forward cache. These reasons are actionable i.e. they can be cleaned up to make the
|
|
56
|
+
* page eligible for back/forward cache.
|
|
57
57
|
*/
|
|
58
58
|
pageSupportNeeded: 'Actionable',
|
|
59
59
|
/**
|
|
60
60
|
* @description Explanation for actionable items which prevent the page from being eligible
|
|
61
|
-
* for
|
|
61
|
+
* for back/forward cache.
|
|
62
62
|
*/
|
|
63
63
|
pageSupportNeededExplanation:
|
|
64
|
-
'These reasons are actionable i.e. they can be cleaned up to make the page eligible for
|
|
64
|
+
'These reasons are actionable i.e. they can be cleaned up to make the page eligible for back/forward cache.',
|
|
65
65
|
/**
|
|
66
66
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
67
|
-
*
|
|
68
|
-
* cleaned up by developers to make the page eligible for
|
|
67
|
+
* back/forward cache. These reasons are circumstantial / not actionable i.e. they cannot be
|
|
68
|
+
* cleaned up by developers to make the page eligible for back/forward cache.
|
|
69
69
|
*/
|
|
70
70
|
circumstantial: 'Not Actionable',
|
|
71
71
|
/**
|
|
72
72
|
* @description Explanation for circumstantial/non-actionable items which prevent the page from being eligible
|
|
73
|
-
* for
|
|
73
|
+
* for back/forward cache.
|
|
74
74
|
*/
|
|
75
75
|
circumstantialExplanation:
|
|
76
76
|
'These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page.',
|
|
77
77
|
/**
|
|
78
78
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
79
|
-
*
|
|
80
|
-
* of chrome they will not prevent
|
|
79
|
+
* back/forward cache. These reasons are pending support by chrome i.e. in a future version
|
|
80
|
+
* of chrome they will not prevent back/forward cache usage anymore.
|
|
81
81
|
*/
|
|
82
82
|
supportPending: 'Pending Support',
|
|
83
83
|
/**
|
|
@@ -86,10 +86,10 @@ const UIStrings = {
|
|
|
86
86
|
runTest: 'Run Test',
|
|
87
87
|
/**
|
|
88
88
|
* @description Explanation for 'pending support' items which prevent the page from being eligible
|
|
89
|
-
* for
|
|
89
|
+
* for back/forward cache.
|
|
90
90
|
*/
|
|
91
91
|
supportPendingExplanation:
|
|
92
|
-
'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for
|
|
92
|
+
'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back/forward cache in a future version of Chrome.',
|
|
93
93
|
};
|
|
94
94
|
const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheView.ts', UIStrings);
|
|
95
95
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -168,9 +168,9 @@ export class BackForwardCacheView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
168
168
|
|
|
169
169
|
// We can know whether the current page can use BFCache
|
|
170
170
|
// as the browser navigates to another unrelated page and goes back to the current page.
|
|
171
|
-
// We chose "chrome://
|
|
171
|
+
// We chose "chrome://terms" because it must be cross-site.
|
|
172
172
|
// Ideally, We want to have our own testing page like "chrome: //bfcache-test".
|
|
173
|
-
resourceTreeModel.navigate('chrome://
|
|
173
|
+
resourceTreeModel.navigate('chrome://terms');
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
10
9
|
import type * as Resources from './application.js';
|
|
11
10
|
|
|
12
11
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
6
6
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
|
+
import type * as Sources from '../sources/sources.js';
|
|
7
8
|
|
|
8
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
9
9
|
import type * as BrowserDebugger from './browser_debugger.js';
|
|
10
|
-
import type * as Sources from '../sources/sources.js';
|
|
11
10
|
|
|
12
11
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
13
12
|
const UIStrings = {
|
|
@@ -7,7 +7,6 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
7
7
|
import * as WorkspaceDiff from '../../models/workspace_diff/workspace_diff.js';
|
|
8
8
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
11
10
|
import type * as Changes from './changes.js';
|
|
12
11
|
|
|
13
12
|
let loadedChangesModule: (typeof Changes|undefined);
|
|
@@ -164,8 +164,6 @@ export class ConsolePinPane extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
let consolePinNumber = 0;
|
|
168
|
-
|
|
169
167
|
export class ConsolePin {
|
|
170
168
|
private readonly pinElement: Element;
|
|
171
169
|
private readonly pinPreview: HTMLElement;
|
|
@@ -175,11 +173,9 @@ export class ConsolePin {
|
|
|
175
173
|
private committedExpression: string;
|
|
176
174
|
private hovered: boolean;
|
|
177
175
|
private lastNode: SDK.RemoteObject.RemoteObject|null;
|
|
178
|
-
private consolePinNumber: number;
|
|
179
176
|
private deletePinIcon: UI.UIUtils.DevToolsCloseButton;
|
|
180
177
|
|
|
181
178
|
constructor(expression: string, private readonly pinPane: ConsolePinPane, private readonly focusOut: () => void) {
|
|
182
|
-
this.consolePinNumber = ++consolePinNumber;
|
|
183
179
|
this.deletePinIcon = document.createElement('div', {is: 'dt-close-button'}) as UI.UIUtils.DevToolsCloseButton;
|
|
184
180
|
this.deletePinIcon.gray = true;
|
|
185
181
|
this.deletePinIcon.classList.add('close-button');
|
|
@@ -325,8 +321,8 @@ export class ConsolePin {
|
|
|
325
321
|
const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
326
322
|
const preprocessedExpression = ObjectUI.JavaScriptREPL.JavaScriptREPL.preprocessExpression(text);
|
|
327
323
|
const {preview, result} = await ObjectUI.JavaScriptREPL.JavaScriptREPL.evaluateAndBuildPreview(
|
|
328
|
-
|
|
329
|
-
|
|
324
|
+
preprocessedExpression, throwOnSideEffect, false /* replMode */, timeout, !isEditing /* allowErrors */,
|
|
325
|
+
'console', true /* awaitPromise */);
|
|
330
326
|
if (this.lastResult && this.lastExecutionContext) {
|
|
331
327
|
this.lastExecutionContext.runtimeModel.releaseEvaluationResult(this.lastResult);
|
|
332
328
|
}
|
|
@@ -50,9 +50,12 @@ import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
|
50
50
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
51
51
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
52
52
|
import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
|
|
53
|
+
// eslint-disable-next-line rulesdir/es_modules_import
|
|
54
|
+
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
53
55
|
import type {Chrome} from '../../../extension-api/ExtensionAPI.js'; // eslint-disable-line rulesdir/es_modules_import
|
|
54
56
|
|
|
55
57
|
import type {ConsoleViewportElement} from './ConsoleViewport.js';
|
|
58
|
+
import consoleViewStyles from './consoleView.css.js';
|
|
56
59
|
|
|
57
60
|
const UIStrings = {
|
|
58
61
|
/**
|
|
@@ -2067,7 +2070,11 @@ export class ConsoleTableMessageView extends ConsoleViewMessage {
|
|
|
2067
2070
|
const tableElement = formattedResult.createChild('div', 'console-message-formatted-table');
|
|
2068
2071
|
const dataGridContainer = tableElement.createChild('span');
|
|
2069
2072
|
tableElement.appendChild(this.formatParameter(actualTable, true, false));
|
|
2070
|
-
dataGridContainer.
|
|
2073
|
+
const shadowRoot = dataGridContainer.attachShadow({mode: 'open'});
|
|
2074
|
+
const dataGridWidget = this.dataGrid.asWidget();
|
|
2075
|
+
dataGridWidget.markAsRoot();
|
|
2076
|
+
dataGridWidget.show(shadowRoot as unknown as Element);
|
|
2077
|
+
dataGridWidget.registerCSSFiles([consoleViewStyles, objectValueStyles]);
|
|
2071
2078
|
formattedMessage.appendChild(formattedResult);
|
|
2072
2079
|
this.dataGrid.renderInline();
|
|
2073
2080
|
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
9
8
|
import type * as Console from './console.js';
|
|
10
9
|
|
|
11
10
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
6
6
|
import * as Root from '../../core/root/root.js';
|
|
7
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
10
9
|
import type * as DeveloperResources from './developer_resources.js';
|
|
11
10
|
|
|
12
11
|
const UIStrings = {
|
|
@@ -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;
|
|
@@ -99,3 +125,7 @@ export function accessibilityNodeRenderer(node: AXTreeNode): LitHtml.TemplateRes
|
|
|
99
125
|
const ignored = sdkNode.ignored();
|
|
100
126
|
return LitHtml.html`<${tag} .data=${{name, role, ignored} as Data}></${tag}>`;
|
|
101
127
|
}
|
|
128
|
+
|
|
129
|
+
export function getNodeId(node: SDK.AccessibilityModel.AccessibilityNode): string {
|
|
130
|
+
return node.getFrameId() + '#' + node.id();
|
|
131
|
+
}
|