chrome-devtools-frontend 1.0.956060 → 1.0.956975

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.
Files changed (53) hide show
  1. package/config/gni/devtools_grd_files.gni +0 -2
  2. package/front_end/Images/generate-css-vars.js +2 -2
  3. package/front_end/core/common/ParsedURL.ts +35 -2
  4. package/front_end/core/common/Settings.ts +1 -1
  5. package/front_end/core/host/InspectorFrontendHost.ts +2 -1
  6. package/front_end/core/i18n/i18nImpl.ts +2 -3
  7. package/front_end/core/i18n/locales/en-US.json +6 -3
  8. package/front_end/core/i18n/locales/en-XL.json +6 -3
  9. package/front_end/core/root/Runtime.ts +0 -72
  10. package/front_end/core/root/root-legacy.ts +0 -2
  11. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +10 -0
  12. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +3 -4
  13. package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +4 -7
  14. package/front_end/entrypoints/main/MainImpl.ts +21 -13
  15. package/front_end/entrypoints/main/main-meta.ts +1 -1
  16. package/front_end/models/extensions/ExtensionServer.ts +1 -22
  17. package/front_end/models/formatter/FormatterWorkerPool.ts +2 -12
  18. package/front_end/models/formatter/ScriptFormatter.ts +3 -3
  19. package/front_end/panels/application/AppManifestView.ts +41 -0
  20. package/front_end/panels/console/ConsoleSidebar.ts +9 -9
  21. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  22. package/front_end/panels/elements/components/LayoutPane.ts +1 -1
  23. package/front_end/panels/emulation/AdvancedApp.ts +2 -2
  24. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
  25. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +19 -0
  26. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +7 -1
  27. package/front_end/third_party/acorn/acorn.ts +1 -1
  28. package/front_end/ui/legacy/ResizerWidget.ts +4 -2
  29. package/front_end/ui/legacy/SoftDropDown.ts +2 -1
  30. package/front_end/ui/legacy/TextPrompt.ts +2 -2
  31. package/front_end/ui/legacy/Treeoutline.ts +2 -1
  32. package/front_end/ui/legacy/UIUtils.ts +1 -8
  33. package/front_end/ui/legacy/ViewManager.ts +1 -1
  34. package/front_end/ui/legacy/Widget.ts +3 -2
  35. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -0
  36. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +5 -1
  37. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
  38. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +1 -2
  39. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +8 -11
  40. package/front_end/ui/legacy/softContextMenu.css +4 -1
  41. package/front_end/ui/legacy/themeColors.css +3 -1
  42. package/front_end/ui/legacy/theme_support/theme_support_impl.ts +29 -32
  43. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +3 -2
  44. package/front_end/ui/legacy/utils/inject-core-styles.ts +3 -31
  45. package/front_end/ui/legacy/utils/utils.ts +1 -5
  46. package/front_end/ui/lit-html/lit-html.ts +1 -1
  47. package/package.json +1 -1
  48. package/scripts/build/generate_css_js_files.js +2 -2
  49. package/scripts/build/ninja/generate_css.gni +3 -0
  50. package/scripts/eslint_rules/lib/no_bound_component_methods.js +116 -0
  51. package/scripts/eslint_rules/tests/no_bound_component_methods_test.js +85 -0
  52. package/front_end/ui/legacy/inspectorSyntaxHighlightDark.css +0 -270
  53. package/front_end/ui/legacy/utils/append-style.ts +0 -9
@@ -0,0 +1,116 @@
1
+ // Copyright 2021 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ 'use strict';
5
+
6
+ module.exports = {
7
+ meta: {
8
+ type: 'problem',
9
+ docs: {
10
+ description: 'Enforce that no methods that are used as LitHtml events are bound.',
11
+ category: 'Possible Errors',
12
+ },
13
+ fixable: 'code',
14
+ schema: [], // no options
15
+ messages: {
16
+ nonRenderBindFound:
17
+ 'Found bound method name {{ methodName }} on {{ componentName }} that was not `render`. Lit-Html binds all event handlers for you automatically so this is not required.',
18
+ },
19
+ },
20
+ create: function(context) {
21
+ function nodeIsHTMLElementClassDeclaration(node) {
22
+ return node.type === 'ClassDeclaration' && node.superClass && node.superClass.name === 'HTMLElement';
23
+ }
24
+
25
+ const classesToCheck = new Set();
26
+
27
+ // Store any method names that were passed to addEventListener.
28
+ // With the following code:
29
+ // window.addEventListener('click', this.boundOnClick)
30
+ // we would add `boundOnClick` to this set.
31
+ const addEventListenerCallPropertyNames = new Set();
32
+
33
+ function checkPropertyDeclarationForBinding(className, node) {
34
+ if (!node.value || node.value.type !== 'CallExpression') {
35
+ return;
36
+ }
37
+ if (node.value.callee.type !== 'MemberExpression') {
38
+ return;
39
+ }
40
+ if (node.value.callee.property.name !== 'bind') {
41
+ return;
42
+ }
43
+ // At this point we know it's a property of the form:
44
+ // someBoundThing = this.thing.bind(X)
45
+ // and now we want to check that the argument passed to bind is `this`.
46
+ // If the argument to bind is not `this`, we leave it be and move on.
47
+ if (node.value.arguments[0]?.type !== 'ThisExpression') {
48
+ return;
49
+ }
50
+
51
+ // At this point it's definitely of the form:
52
+ // someBoundThing = this.thing.bind(this)
53
+ // But we know that `render` may be bound for the scheduler, so if it's render we can move on
54
+ if (node.value.callee.object.property.name === 'render') {
55
+ return;
56
+ }
57
+
58
+ // Now it's an error UNLESS we found a call to
59
+ // addEventListener(x, this.#boundFoo),
60
+ // in which case it's allowed.
61
+
62
+ // Get the property name for the bound method
63
+ // #boundFoo = this.foo.bind(this);
64
+ // node.key.name === 'boundFoo';
65
+ const boundPropertyName = node.key.name;
66
+ if (addEventListenerCallPropertyNames.has(boundPropertyName)) {
67
+ return;
68
+ }
69
+
70
+ context.report({
71
+ node: node,
72
+ messageId: 'nonRenderBindFound',
73
+ data: {componentName: className, methodName: node.value.callee.object.property.name}
74
+ });
75
+ }
76
+
77
+ function checkClassForBoundMethods(classDeclarationNode) {
78
+ const classPropertyDeclarations = classDeclarationNode.body.body.filter(node => {
79
+ return node.type === 'PropertyDefinition';
80
+ });
81
+ for (const decl of classPropertyDeclarations) {
82
+ checkPropertyDeclarationForBinding(classDeclarationNode.id.name, decl);
83
+ }
84
+ }
85
+
86
+ return {
87
+ ClassDeclaration(classDeclarationNode) {
88
+ if (!nodeIsHTMLElementClassDeclaration(classDeclarationNode)) {
89
+ return;
90
+ }
91
+
92
+ classesToCheck.add(classDeclarationNode);
93
+ },
94
+ 'CallExpression[callee.type=\'MemberExpression\'][callee.property.name=\'addEventListener\']'(
95
+ callExpressionNode) {
96
+ const methodArg = callExpressionNode.arguments[1];
97
+ // Confirm that the argument is this.X, otherwise skip it
98
+ if (methodArg.type !== 'MemberExpression') {
99
+ return;
100
+ }
101
+
102
+ // Get the property from the addEventListener call
103
+ // window.addEventListener('click', this.#boundFoo)
104
+ // This will be the node representing `#boundFoo`
105
+ // and its `.name` property will be `boundFoo`
106
+ const propertyArg = methodArg.property;
107
+ addEventListenerCallPropertyNames.add(propertyArg.name);
108
+ },
109
+ 'Program:exit'() {
110
+ for (const classNode of classesToCheck) {
111
+ checkClassForBoundMethods(classNode);
112
+ }
113
+ }
114
+ };
115
+ }
116
+ };
@@ -0,0 +1,85 @@
1
+ // Copyright 2021 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ 'use strict';
5
+
6
+ const rule = require('../lib/no_bound_component_methods.js');
7
+ const ruleTester = new (require('eslint').RuleTester)({
8
+ parserOptions: {ecmaVersion: 9, sourceType: 'module'},
9
+ parser: require.resolve('@typescript-eslint/parser'),
10
+ });
11
+
12
+ ruleTester.run('no_bound_component_methods', rule, {
13
+ valid: [
14
+ {
15
+ code: `export class FeedbackButton extends SomeOtherNonElementThing {
16
+ readonly #boundClick = this.onClick.bind(this);
17
+ }`,
18
+ filename: 'front_end/components/test.ts',
19
+ },
20
+ {
21
+ code: `export class FeedbackButton extends HTMLElement {
22
+ readonly #boundRender = this.render.bind(this);
23
+ private readonly shadow = this.attachShadow({mode: 'open'});
24
+ private frame?: SDK.ResourceTreeModel.ResourceTreeFrame;
25
+ }`,
26
+ filename: 'front_end/components/test.ts',
27
+ },
28
+ {
29
+ code: `export class FeedbackButton extends HTMLElement {
30
+ readonly #boundRender = this.render.bind(this);
31
+ #globalBoundThing = this.someEvent.bind(this);
32
+ private readonly shadow = this.attachShadow({mode: 'open'});
33
+
34
+ constructor() {
35
+ window.addEventListener('click', this.#globalBoundThing);
36
+ }
37
+ }`,
38
+ filename: 'front_end/components/test.ts',
39
+ },
40
+ {
41
+ code: `export class FeedbackButton extends HTMLElement {
42
+ readonly #boundRender = this.render.bind(this);
43
+ private globalBoundThing = this.someEvent.bind(this);
44
+ private readonly shadow = this.attachShadow({mode: 'open'});
45
+
46
+ constructor() {
47
+ window.addEventListener('click', this.globalBoundThing);
48
+ }
49
+ }`,
50
+ filename: 'front_end/components/test.ts',
51
+ },
52
+ ],
53
+ invalid: [
54
+ {
55
+ code: `export class FeedbackButton extends HTMLElement {
56
+ static readonly litTagName = LitHtml.literal\`devtools-feedback-button\`;
57
+ readonly #boundRender = this.render.bind(this);
58
+ readonly #boundClick = this.onClick.bind(this);
59
+ }`,
60
+ filename: 'front_end/components/test.ts',
61
+ errors: [{messageId: 'nonRenderBindFound', data: {componentName: 'FeedbackButton', methodName: 'onClick'}}]
62
+ },
63
+ {
64
+ code: `export class FeedbackButton extends HTMLElement {
65
+ static readonly litTagName = LitHtml.literal\`devtools-feedback-button\`;
66
+ private readonly boundClick = this.onClick.bind(this);
67
+ }`,
68
+ filename: 'front_end/components/test.ts',
69
+ errors: [{messageId: 'nonRenderBindFound', data: {componentName: 'FeedbackButton', methodName: 'onClick'}}]
70
+ },
71
+ {
72
+ code: `export class FeedbackButton extends HTMLElement {
73
+ static readonly litTagName = LitHtml.literal\`devtools-feedback-button\`;
74
+ private readonly boundClick = this.onClick.bind(this);
75
+ private readonly boundFocus = this.onFocus.bind(this);
76
+
77
+ constructor() {
78
+ this.addEventListener('click', this.boundClick);
79
+ }
80
+ }`,
81
+ filename: 'front_end/components/test.ts',
82
+ errors: [{messageId: 'nonRenderBindFound', data: {componentName: 'FeedbackButton', methodName: 'onFocus'}}]
83
+ },
84
+ ]
85
+ });
@@ -1,270 +0,0 @@
1
- /*
2
- * Copyright 2015 The Chromium Authors. All rights reserved.
3
- * Use of this source code is governed by a BSD-style license that can be
4
- * found in the LICENSE file.
5
- */
6
-
7
- .cm-js-atom {
8
- color: rgb(161 247 181); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
9
- }
10
-
11
- .cm-js-attribute {
12
- color: rgb(97 148 198); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
13
- }
14
-
15
- .cm-js-builtin {
16
- color: rgb(159 180 214); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
17
- }
18
-
19
- .cm-js-comment {
20
- color: rgb(116 116 116); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
21
- }
22
-
23
- .cm-js-def {
24
- color: var(--color-token-tag);
25
- }
26
-
27
- .cm-js-keyword {
28
- color: rgb(154 127 213); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
29
- }
30
-
31
- .cm-js-link {
32
- color: rgb(159 180 214); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
33
- }
34
-
35
- .cm-js-meta {
36
- color: rgb(221 251 85); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
37
- }
38
-
39
- .cm-js-number {
40
- color: rgb(161 247 181); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
41
- }
42
-
43
- .cm-js-operator {
44
- color: rgb(210 192 87); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
45
- }
46
-
47
- .cm-js-property {
48
- color: rgb(210 192 87); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
49
- }
50
-
51
- .cm-js-string {
52
- color: rgb(242 139 84); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
53
- }
54
-
55
- .cm-js-string-2 {
56
- color: rgb(242 139 84); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
57
- }
58
-
59
- .cm-js-tag {
60
- color: var(--color-token-tag);
61
- }
62
-
63
- .cm-js-variable {
64
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
65
- }
66
-
67
- .cm-js-variable-2 {
68
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
69
- }
70
-
71
- .cm-atom {
72
- color: rgb(161 247 181); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
73
- }
74
-
75
- .cm-comment {
76
- color: rgb(116 116 116); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
77
- }
78
-
79
- .cm-variable {
80
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
81
- }
82
-
83
- .cm-keyword {
84
- color: rgb(154 127 213); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
85
- }
86
-
87
- .cm-number {
88
- color: rgb(161 247 181); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
89
- }
90
-
91
- .cm-operator {
92
- color: rgb(210 192 87); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
93
- }
94
-
95
- .cm-css-atom {
96
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
97
- }
98
-
99
- .cm-css-builtin {
100
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
101
- }
102
-
103
- .cm-css-def {
104
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
105
- }
106
-
107
- .cm-css-comment {
108
- color: rgb(116 116 116); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
109
- }
110
-
111
- .cm-css-meta {
112
- color: rgb(132 240 255); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
113
- }
114
-
115
- .cm-css-number {
116
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
117
- }
118
-
119
- .cm-css-operator {
120
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
121
- }
122
-
123
- .cm-css-property {
124
- color: rgb(132 240 255); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
125
- }
126
-
127
- .cm-css-qualifier {
128
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
129
- }
130
-
131
- .cm-css-string {
132
- color: rgb(231 194 111); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
133
- }
134
-
135
- .cm-css-string-2 {
136
- color: rgb(217 217 217); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
137
- }
138
-
139
- .cm-css-tag {
140
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
141
- }
142
-
143
- .cm-css-variable {
144
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
145
- }
146
-
147
- .cm-css-variable-2 {
148
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
149
- }
150
-
151
- .cm-xml-comment {
152
- color: rgb(137 137 137); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
153
- }
154
-
155
- .cm-xml-error {
156
- color: rgb(198 95 95); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
157
- }
158
-
159
- .cm-xml-string {
160
- color: rgb(242 151 102); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
161
- }
162
-
163
- .cm-xml-tag {
164
- color: var(--color-token-tag);
165
- }
166
-
167
- .cm-xml-attribute {
168
- color: var(--color-token-attribute);
169
- }
170
-
171
- .cm-xml-link {
172
- color: rgb(231 194 111); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
173
- }
174
-
175
- .webkit-html-attribute-name {
176
- color: var(--color-token-attribute);
177
- }
178
-
179
- .webkit-html-attribute-value {
180
- color: rgb(242 151 102); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
181
- }
182
-
183
- .webkit-html-comment {
184
- color: rgb(137 137 137); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
185
- }
186
-
187
- .webkit-html-tag {
188
- color: var(--color-token-tag);
189
- }
190
-
191
- .webkit-html-tag-name {
192
- color: var(--color-token-tag);
193
- }
194
-
195
- .webkit-html-close-tag-name {
196
- color: var(--color-token-tag);
197
- }
198
-
199
- .webkit-html-text-node {
200
- color: rgb(207 208 208); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
201
- }
202
-
203
- .webkit-html-css-node {
204
- color: rgb(207 208 208); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
205
- }
206
-
207
- .webkit-html-js-node {
208
- color: rgb(207 208 208); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
209
- }
210
-
211
- .webkit-html-pseudo-element {
212
- color: rgb(237 119 229); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
213
- }
214
-
215
- .webkit-css-property {
216
- color: var(--webkit-css-property-color, rgb(53 212 199)); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
217
- }
218
-
219
- .cm-def {
220
- color: var(--color-token-tag);
221
- }
222
-
223
- .cm-header {
224
- color: var(--color-token-tag);
225
- }
226
-
227
- .cm-variable-2 {
228
- color: #05a; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
229
- }
230
-
231
- .cm-variable-3,
232
- .cm-type {
233
- color: rgb(93 176 215); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
234
- }
235
-
236
- .cm-string {
237
- color: rgb(242 139 84); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
238
- }
239
-
240
- .cm-meta {
241
- color: rgb(221 251 85); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
242
- }
243
-
244
- .cm-qualifier {
245
- color: rgb(255 163 79); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
246
- }
247
-
248
- .cm-builtin {
249
- color: rgb(159 180 214); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
250
- }
251
-
252
- .cm-bracket {
253
- color: #997; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
254
- }
255
-
256
- .cm-tag {
257
- color: var(--color-token-tag);
258
- }
259
-
260
- .cm-attribute {
261
- color: rgb(97 148 198); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
262
- }
263
-
264
- .cm-hr {
265
- color: #999; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
266
- }
267
-
268
- .cm-link {
269
- color: rgb(159 180 214); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
270
- }
@@ -1,9 +0,0 @@
1
- // Copyright 2019 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- export function appendStyle(node: Node, {cssContent}: {cssContent: string}): void {
6
- const styleElement = document.createElement('style');
7
- styleElement.textContent = cssContent;
8
- node.appendChild(styleElement);
9
- }