getStyleSheets helper for components
The `getStyleSheets` helper provides an API for new components to read CSS from
the runtime cache and get back a stylesheet (or multiple in the case of theme
patching) that they can then adopt into the shadow root.
Long term we don't want to tie ourselves to this way of doing CSS, but at least
by providing an API for it we can swap out the implementation without requiring
large rewrites for any of the components we build.
Change-Id: Id72dcb449701f11a524e91742bc095721e62d0db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2339557
Commit-Queue: Jack Franklin <[email protected]>
Reviewed-by: Paul Lewis <[email protected]>
diff --git a/devtools_grd_files.gni b/devtools_grd_files.gni
index 0411d2c..5bb6952 100644
--- a/devtools_grd_files.gni
+++ b/devtools_grd_files.gni
@@ -95,6 +95,7 @@
"front_end/color_picker/color_picker_module.js",
"front_end/common/common-legacy.js",
"front_end/common/common.js",
+ "front_end/component_helpers/component_helpers.js",
"front_end/components/components-legacy.js",
"front_end/components/components.js",
"front_end/console/console-legacy.js",
@@ -376,6 +377,7 @@
"front_end/common/Trie.js",
"front_end/common/WasmDisassembly.js",
"front_end/common/Worker.js",
+ "front_end/component_helpers/get-stylesheet.js",
"front_end/components/DockController.js",
"front_end/components/ImagePreview.js",
"front_end/components/JSPresentationUtils.js",