chrome-devtools-frontend 1.0.942095 → 1.0.943709
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 -58
- package/config/gni/devtools_grd_files.gni +48 -7
- package/config/gni/devtools_image_files.gni +1 -1
- package/front_end/.eslintrc.js +11 -1
- package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
- 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/DebuggerModel.ts +4 -14
- package/front_end/core/sdk/NetworkManager.ts +3 -0
- 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 -6
- 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 -5
- 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/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +5 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +3 -1
- 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/EndpointsGrid.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -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 +1 -1
- package/front_end/panels/elements/AccessibilityTreeView.ts +4 -3
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
- package/front_end/panels/elements/elements-meta.ts +0 -1
- 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 +0 -3
- 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/LighthousePanel.ts +2 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -1
- package/front_end/panels/lighthouse/module.json +0 -6
- 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/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/docs/component_docs.ts +14 -0
- package/front_end/ui/components/docs/create_breadcrumbs.ts +1 -1
- package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
- 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 -15
- package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -2
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- 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 +11 -4
- 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 +3 -2
- 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/SoftContextMenu.ts +3 -2
- 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 +4 -3
- package/front_end/ui/legacy/UIUtils.ts +17 -14
- package/front_end/ui/legacy/ViewManager.ts +2 -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/filteredListWidget.css +2 -2
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -3
- package/front_end/ui/legacy/components/source_frame/FontView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +6 -6
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +7 -2
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
- 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/textButton.css +5 -4
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
- 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/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 -6
- package/front_end/panels/emulation/module.json +0 -11
- 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 -5
- package/front_end/panels/screencast/module.json +0 -6
- package/front_end/panels/timeline/module.json +0 -6
- package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
- package/front_end/ui/legacy/components/source_frame/messagesPopover.css +0 -32
- package/front_end/ui/legacy/components/source_frame/module.json +0 -14
- package/front_end/ui/legacy/module.json +0 -41
|
@@ -108,8 +108,9 @@
|
|
|
108
108
|
.text-button:not(:disabled):focus {
|
|
109
109
|
forced-color-adjust: none;
|
|
110
110
|
background-color: ButtonFace;
|
|
111
|
-
color:
|
|
111
|
+
color: Highlight !important; /* stylelint-disable-line declaration-no-important */
|
|
112
112
|
border-color: Highlight;
|
|
113
|
+
outline: 2px solid ButtonText;
|
|
113
114
|
box-shadow: var(--legacy-focus-ring-active-shadow);
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
.text-button:not(:disabled):active {
|
|
118
119
|
forced-color-adjust: none;
|
|
119
120
|
background-color: Highlight;
|
|
120
|
-
color: HighlightText;
|
|
121
|
+
color: HighlightText !important; /* stylelint-disable-line declaration-no-important */
|
|
121
122
|
box-shadow: var(--legacy-accent-color);
|
|
122
123
|
}
|
|
123
124
|
|
|
@@ -130,14 +131,14 @@
|
|
|
130
131
|
|
|
131
132
|
.text-button.primary-button:not(:disabled):focus {
|
|
132
133
|
background-color: Highlight;
|
|
133
|
-
color: HighlightText;
|
|
134
|
+
color: HighlightText !important; /* stylelint-disable-line declaration-no-important */
|
|
134
135
|
border-color: ButtonText;
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
.text-button.primary-button:not(:disabled):hover,
|
|
138
139
|
.text-button.primary-button:not(:disabled):active {
|
|
139
140
|
background-color: HighlightText;
|
|
140
|
-
color: Highlight;
|
|
141
|
+
color: Highlight !important; /* stylelint-disable-line declaration-no-important */
|
|
141
142
|
border-color: Highlight;
|
|
142
143
|
}
|
|
143
144
|
}
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
|
|
36
36
|
import * as Common from '../../../core/common/common.js';
|
|
37
37
|
import * as Platform from '../../../core/platform/platform.js';
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
import inspectorSyntaxHighlightStyles from '../inspectorSyntaxHighlight.css.legacy.js';
|
|
40
|
+
import inspectorSyntaxHighlightDarkStyles from '../inspectorSyntaxHighlightDark.css.legacy.js';
|
|
39
41
|
|
|
40
42
|
let themeSupportInstance: ThemeSupport;
|
|
41
43
|
|
|
@@ -112,9 +114,9 @@ export class ThemeSupport {
|
|
|
112
114
|
|
|
113
115
|
injectHighlightStyleSheets(element: Element|ShadowRoot): void {
|
|
114
116
|
this.injectingStyleSheet = true;
|
|
115
|
-
this.appendStyle(element,
|
|
117
|
+
this.appendStyle(element, inspectorSyntaxHighlightStyles);
|
|
116
118
|
if (this.themeNameInternal === 'dark') {
|
|
117
|
-
this.appendStyle(element,
|
|
119
|
+
this.appendStyle(element, inspectorSyntaxHighlightDarkStyles);
|
|
118
120
|
}
|
|
119
121
|
this.injectingStyleSheet = false;
|
|
120
122
|
}
|
|
@@ -123,13 +125,9 @@ export class ThemeSupport {
|
|
|
123
125
|
* Note: this is a duplicate of the function in ui/utils. It exists here
|
|
124
126
|
* so there is no circular dependency between ui/utils and theme_support.
|
|
125
127
|
*/
|
|
126
|
-
private appendStyle(node: Node,
|
|
127
|
-
const content = Root.Runtime.cachedResources.get(cssFile) || '';
|
|
128
|
-
if (!content) {
|
|
129
|
-
console.error(cssFile + ' not preloaded. Check module.json');
|
|
130
|
-
}
|
|
128
|
+
private appendStyle(node: Node, {cssContent}: {cssContent: string}): void {
|
|
131
129
|
const styleElement = document.createElement('style');
|
|
132
|
-
styleElement.textContent =
|
|
130
|
+
styleElement.textContent = cssContent;
|
|
133
131
|
node.appendChild(styleElement);
|
|
134
132
|
}
|
|
135
133
|
|
|
@@ -7,7 +7,7 @@ import {focusChanged} from './focus-changed.js';
|
|
|
7
7
|
import {injectCoreStyles} from './inject-core-styles.js';
|
|
8
8
|
|
|
9
9
|
interface Options {
|
|
10
|
-
cssFile?: string|CSSStyleSheet[];
|
|
10
|
+
cssFile?: string|CSSStyleSheet[]|{cssContent: string};
|
|
11
11
|
delegatesFocus?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@ export function createShadowRootWithCoreStyles(element: Element, options: Option
|
|
|
22
22
|
|
|
23
23
|
const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});
|
|
24
24
|
injectCoreStyles(shadowRoot);
|
|
25
|
-
if (typeof cssFile === 'string') {
|
|
25
|
+
if (typeof cssFile === 'string' || (cssFile !== undefined && 'cssContent' in cssFile)) {
|
|
26
26
|
appendStyle(shadowRoot, cssFile);
|
|
27
27
|
} else if (cssFile) {
|
|
28
28
|
shadowRoot.adoptedStyleSheets = cssFile;
|
|
@@ -2,14 +2,17 @@
|
|
|
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 inspectorCommonStyles from '../inspectorCommon.css.legacy.js';
|
|
6
|
+
import textButtonStyles from '../textButton.css.legacy.js';
|
|
5
7
|
import * as ThemeSupport from '../theme_support/theme_support.js';
|
|
8
|
+
import themeColorsStyles from '../themeColors.css.legacy.js';
|
|
9
|
+
|
|
6
10
|
import {appendStyle} from './append-style.js';
|
|
7
11
|
|
|
8
12
|
export function injectCoreStyles(root: Element|ShadowRoot): void {
|
|
9
|
-
|
|
10
|
-
appendStyle(root,
|
|
11
|
-
appendStyle(root,
|
|
12
|
-
appendStyle(root, 'ui/legacy/themeColors.css');
|
|
13
|
+
appendStyle(root, inspectorCommonStyles);
|
|
14
|
+
appendStyle(root, textButtonStyles);
|
|
15
|
+
appendStyle(root, themeColorsStyles);
|
|
13
16
|
|
|
14
17
|
ThemeSupport.ThemeSupport.instance().injectHighlightStyleSheets(root);
|
|
15
18
|
ThemeSupport.ThemeSupport.instance().injectCustomStyleSheets(root);
|
|
@@ -2,7 +2,7 @@
|
|
|
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 {luminance} from '../front_end/core/common/ColorUtils.js';
|
|
5
|
+
import {luminance} from '../front_end/core/common/ColorUtils.js'; // eslint-disable-line rulesdir/es_modules_import
|
|
6
6
|
|
|
7
7
|
import type {AreaBounds, Bounds, Position} from './common.js';
|
|
8
8
|
import {createChild} from './common.js';
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
29
29
|
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
30
|
|
|
31
|
-
import {rgbaToHsla} from '../front_end/core/common/ColorUtils.js';
|
|
31
|
+
import {rgbaToHsla} from '../front_end/core/common/ColorUtils.js'; // eslint-disable-line rulesdir/es_modules_import
|
|
32
32
|
|
|
33
33
|
import type {Bounds, PathCommands, Quad} from './common.js';
|
|
34
34
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
29
29
|
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
30
|
|
|
31
|
-
import {contrastRatio, contrastRatioAPCA, getAPCAThreshold, getContrastThreshold} from '../front_end/core/common/ColorUtils.js';
|
|
31
|
+
import {contrastRatio, contrastRatioAPCA, getAPCAThreshold, getContrastThreshold} from '../front_end/core/common/ColorUtils.js'; // eslint-disable-line rulesdir/es_modules_import
|
|
32
32
|
|
|
33
33
|
import type {Bounds, PathCommands, ResetData} from './common.js';
|
|
34
34
|
import {constrainNumber, createChild, createElement, createTextChild, ellipsify, Overlay} from './common.js';
|
package/package.json
CHANGED
package/scripts/check_gn.js
CHANGED
|
@@ -17,40 +17,6 @@ const gnPath = path.resolve(__dirname, '..', 'BUILD.gn');
|
|
|
17
17
|
const gnFile = fs.readFileSync(gnPath, 'utf-8');
|
|
18
18
|
const gnLines = gnFile.split('\n');
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Ensures that generated module files are in the right list in BUILD.gn.
|
|
22
|
-
* This is primarily to avoid remote modules from accidentally getting
|
|
23
|
-
* bundled with the main Chrome binary.
|
|
24
|
-
*/
|
|
25
|
-
function checkNonAutostartNonRemoteModules() {
|
|
26
|
-
const errors = [];
|
|
27
|
-
const gnVariable = 'non_autostart_non_remote_modules';
|
|
28
|
-
const lines = selectGNLines(`${gnVariable} = [`, ']');
|
|
29
|
-
if (!lines.length) {
|
|
30
|
-
return [
|
|
31
|
-
'Could not identify non-autostart non-remote modules in gn file',
|
|
32
|
-
'Please look at: ' + __filename,
|
|
33
|
-
];
|
|
34
|
-
}
|
|
35
|
-
const text = lines.join('\n');
|
|
36
|
-
const modules = manifestModules.filter(m => m.type !== 'autostart').map(m => m.name);
|
|
37
|
-
|
|
38
|
-
const missingModules = modules.filter(m => !text.includes(`${m}/${path.basename(m)}_module.js`));
|
|
39
|
-
if (missingModules.length) {
|
|
40
|
-
errors.push(`Check that you've included [${missingModules.join(', ')}] modules in: ` + gnVariable);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// e.g. "lighthouse/lighthouse_module.js" => "lighthouse"
|
|
44
|
-
const mapLineToModuleName = line => path.dirname(line.substring(1));
|
|
45
|
-
|
|
46
|
-
const extraneousModules = lines.map(mapLineToModuleName).filter(module => !modules.includes(module));
|
|
47
|
-
if (extraneousModules.length) {
|
|
48
|
-
errors.push(`Found extraneous modules [${extraneousModules.join(', ')}] in: ` + gnVariable);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return errors;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
20
|
/**
|
|
55
21
|
* Ensures that all source files (according to the various module.json files) are
|
|
56
22
|
* listed in BUILD.gn.
|
|
@@ -139,7 +105,6 @@ function selectGNLines(startLine, endLine, linesToCheck = gnLines) {
|
|
|
139
105
|
|
|
140
106
|
function main() {
|
|
141
107
|
const errors = [
|
|
142
|
-
...checkNonAutostartNonRemoteModules(),
|
|
143
108
|
...checkAllDevToolsFiles(),
|
|
144
109
|
];
|
|
145
110
|
if (errors.length) {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
const path = require('path');
|
|
12
12
|
|
|
13
13
|
const FRONT_END_DIRECTORY = path.join(__dirname, '..', '..', '..', 'front_end');
|
|
14
|
-
const UNITTESTS_DIRECTORY = path.join(__dirname, '..', '..', '..', 'test', 'unittests');
|
|
15
14
|
const INSPECTOR_OVERLAY_DIRECTORY = path.join(__dirname, '..', '..', '..', 'front_end', 'inspector_overlay');
|
|
16
15
|
const COMPONENT_DOCS_DIRECTORY = path.join(FRONT_END_DIRECTORY, 'ui', 'components', 'docs');
|
|
17
16
|
|
|
@@ -90,14 +89,21 @@ function checkStarImport(context, node, importPath, importPathForErrorMessage, i
|
|
|
90
89
|
const invalidCrossFolderUsage = !isSameFolder && !isModuleEntrypoint(exportingFileName);
|
|
91
90
|
|
|
92
91
|
if (invalidSameFolderUsage) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
// Meta files import their entrypoints and are considered separate entrypoints.
|
|
93
|
+
// Additionally, any file ending with `-entrypoint.ts` is considered an entrypoint as well.
|
|
94
|
+
// Therefore, they are allowed to import using a same-namespace star-import.
|
|
95
|
+
const importingFileIsEntrypoint =
|
|
96
|
+
importingFileName.endsWith('-entrypoint.ts') || importingFileName.endsWith('-meta.ts');
|
|
97
|
+
if (!importingFileIsEntrypoint) {
|
|
98
|
+
context.report({
|
|
99
|
+
node,
|
|
100
|
+
message:
|
|
101
|
+
'Incorrect same-namespace import: "{{importPathForErrorMessage}}". Use "import { Symbol } from \'./relative-file.js\';" instead.',
|
|
102
|
+
data: {
|
|
103
|
+
importPathForErrorMessage,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
if (invalidCrossFolderUsage) {
|
|
@@ -157,12 +163,6 @@ module.exports = {
|
|
|
157
163
|
});
|
|
158
164
|
}
|
|
159
165
|
|
|
160
|
-
const importingFileIsUnitTestFile = importingFileName.startsWith(UNITTESTS_DIRECTORY);
|
|
161
|
-
const importingFileIsComponentDocsFile = importingFileName.startsWith(COMPONENT_DOCS_DIRECTORY);
|
|
162
|
-
if (!importingFileName.startsWith(FRONT_END_DIRECTORY) && !importingFileIsUnitTestFile) {
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
166
|
if (importingFileName.startsWith(INSPECTOR_OVERLAY_DIRECTORY)) {
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
@@ -173,15 +173,6 @@ module.exports = {
|
|
|
173
173
|
|
|
174
174
|
const exportingFileName = path.resolve(path.dirname(importingFileName), importPath);
|
|
175
175
|
|
|
176
|
-
if (importPath.replace(/\\/g, '/').includes('/front_end/') && !importingFileIsUnitTestFile &&
|
|
177
|
-
!importingFileIsComponentDocsFile) {
|
|
178
|
-
context.report({
|
|
179
|
-
node,
|
|
180
|
-
message:
|
|
181
|
-
'Invalid relative import: an import should not include the "front_end" directory. If you are in a unit test, you should import from the module entrypoint.',
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
176
|
if (importPathForErrorMessage.endsWith('platform/platform.js') &&
|
|
186
177
|
nodeSpecifiersSpecialImportsOnly(node.specifiers)) {
|
|
187
178
|
/* We allow direct importing of the ls and assertNotNull utility as it's so frequently used. */
|
|
@@ -106,6 +106,14 @@ ruleTester.run('es_modules_import', rule, {
|
|
|
106
106
|
code: 'import * as ConsoleCounters from \'../console_counters/console_counters.js\';',
|
|
107
107
|
filename: 'front_end/panels/console/ConsoleView.ts',
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
code: 'import * as Elements from \'./elements.js\';',
|
|
111
|
+
filename: 'front_end/panels/elements/elements-meta.ts',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
code: 'import * as Elements from \'./elements.js\';',
|
|
115
|
+
filename: 'front_end/panels/elements/elements-entrypoint.ts',
|
|
116
|
+
},
|
|
109
117
|
// Tests are allowed to import from front_end
|
|
110
118
|
{
|
|
111
119
|
code: 'import * as UI from \'../../../front_end/ui/ui.js\';',
|
|
@@ -240,21 +248,5 @@ ruleTester.run('es_modules_import', rule, {
|
|
|
240
248
|
'Incorrect cross-namespace import: "../third_party/marked/package/lib/marked.esm.js". Use "import * as Namespace from \'../namespace/namespace.js\';" instead. If the third_party dependency does not expose a single entrypoint, update es_modules_import.js to make it exempt.'
|
|
241
249
|
}],
|
|
242
250
|
},
|
|
243
|
-
{
|
|
244
|
-
code: 'import * as Marked from \'../../front_end/third_party/marked/package/lib/marked.esm.js\';',
|
|
245
|
-
filename: 'front_end/marked/marked.js',
|
|
246
|
-
errors: [{
|
|
247
|
-
message:
|
|
248
|
-
'Invalid relative import: an import should not include the "front_end" directory. If you are in a unit test, you should import from the module entrypoint.'
|
|
249
|
-
}],
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
code: 'import * as SDK from \'../../front_end/sdk/sdk.js\';',
|
|
253
|
-
filename: 'front_end/marked/marked.js',
|
|
254
|
-
errors: [{
|
|
255
|
-
message:
|
|
256
|
-
'Invalid relative import: an import should not include the "front_end" directory. If you are in a unit test, you should import from the module entrypoint.'
|
|
257
|
-
}],
|
|
258
|
-
}
|
|
259
251
|
]
|
|
260
252
|
});
|