chrome-devtools-frontend 1.0.936663 → 1.0.937775

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 (45) hide show
  1. package/config/gni/all_devtools_files.gni +0 -15
  2. package/config/gni/devtools_grd_files.gni +0 -6
  3. package/front_end/core/platform/string-utilities.ts +23 -0
  4. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -3
  5. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +0 -3
  6. package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +3 -1
  7. package/front_end/entrypoints/main/MainImpl.ts +1 -0
  8. package/front_end/entrypoints/shell/shell.json +3 -5
  9. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +8 -1
  10. package/front_end/panels/accessibility/accessibility-meta.ts +0 -3
  11. package/front_end/panels/application/components/ReportsGrid.ts +38 -4
  12. package/front_end/panels/application/components/reportingApiGrid.css +4 -0
  13. package/front_end/panels/application/module.json +0 -1
  14. package/front_end/panels/browser_debugger/module.json +1 -2
  15. package/front_end/panels/console/console-meta.ts +1 -3
  16. package/front_end/panels/coverage/coverage-meta.ts +0 -3
  17. package/front_end/panels/css_overview/css_overview-meta.ts +0 -3
  18. package/front_end/panels/elements/StylePropertyTreeElement.ts +3 -0
  19. package/front_end/panels/elements/module.json +1 -2
  20. package/front_end/panels/event_listeners/EventListenersView.ts +2 -0
  21. package/front_end/panels/lighthouse/module.json +0 -1
  22. package/front_end/panels/media/module.json +0 -1
  23. package/front_end/panels/network/module.json +0 -1
  24. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -0
  25. package/front_end/panels/protocol_monitor/module.json +1 -2
  26. package/front_end/panels/sources/module.json +1 -3
  27. package/front_end/panels/timeline/module.json +0 -1
  28. package/front_end/ui/components/data_grid/DataGrid.ts +3 -1
  29. package/front_end/ui/components/data_grid/DataGridUtils.ts +8 -5
  30. package/front_end/ui/components/data_grid/dataGrid.css +0 -5
  31. package/front_end/ui/components/settings/settingCheckbox.css +0 -5
  32. package/front_end/ui/legacy/ListWidget.ts +2 -4
  33. package/front_end/ui/legacy/XLink.ts +3 -0
  34. package/front_end/ui/legacy/checkboxTextLabel.css +0 -4
  35. package/front_end/ui/legacy/components/perf_ui/module.json +1 -3
  36. package/front_end/ui/legacy/components/source_frame/module.json +0 -1
  37. package/front_end/ui/legacy/inspectorCommon.css +0 -4
  38. package/package.json +1 -1
  39. package/scripts/build/ninja/copy-file.js +10 -1
  40. package/scripts/build/ninja/copy-files.js +10 -1
  41. package/front_end/entrypoints/inspector_main/module.json +0 -9
  42. package/front_end/panels/accessibility/module.json +0 -7
  43. package/front_end/panels/console/module.json +0 -6
  44. package/front_end/panels/coverage/module.json +0 -6
  45. package/front_end/panels/css_overview/module.json +0 -4
@@ -13,10 +13,6 @@ all_devtools_files = [
13
13
  "front_end/entrypoints/node_app/node_app.js",
14
14
  "front_end/entrypoints/worker_app/worker_app.js",
15
15
  "front_end/legacy_test_runner/accessibility_test_runner/accessibility_test_runner.js",
16
- "front_end/panels/accessibility/accessibilityNode.css",
17
- "front_end/panels/accessibility/accessibilityProperties.css",
18
- "front_end/panels/accessibility/axBreadcrumbs.css",
19
- "front_end/panels/accessibility/module.json",
20
16
  "front_end/legacy_test_runner/application_test_runner/application_test_runner.js",
21
17
  "front_end/legacy_test_runner/bindings_test_runner/bindings_test_runner.js",
22
18
  "front_end/legacy_test_runner/application_test_runner/CacheStorageTestRunner.js",
@@ -37,16 +33,8 @@ all_devtools_files = [
37
33
  "front_end/panels/browser_debugger/module.json",
38
34
  "front_end/third_party/codemirror/codemirror.css",
39
35
  "front_end/legacy_test_runner/console_test_runner/console_test_runner.js",
40
- "front_end/panels/console/consoleContextSelector.css",
41
- "front_end/panels/console/consolePinPane.css",
42
- "front_end/panels/console/consolePrompt.css",
43
- "front_end/panels/console/consoleSidebar.css",
44
- "front_end/panels/console/consoleView.css",
45
- "front_end/panels/console/module.json",
46
36
  "front_end/legacy_test_runner/coverage_test_runner/coverage_test_runner.js",
47
- "front_end/panels/coverage/module.json",
48
37
  "front_end/legacy_test_runner/cpu_profiler_test_runner/cpu_profiler_test_runner.js",
49
- "front_end/panels/css_overview/module.json",
50
38
  "front_end/legacy_test_runner/data_grid_test_runner/data_grid_test_runner.js",
51
39
  "front_end/legacy_test_runner/device_mode_test_runner/device_mode_test_runner.js",
52
40
  "front_end/legacy_test_runner/elements_test_runner/elements_test_runner.js",
@@ -66,9 +54,6 @@ all_devtools_files = [
66
54
  "front_end/legacy_test_runner/extensions_test_runner/ExtensionsNetworkTestRunner.js",
67
55
  "front_end/legacy_test_runner/extensions_test_runner/ExtensionsTestRunner.js",
68
56
  "front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js",
69
- "front_end/entrypoints/inspector_main/module.json",
70
- "front_end/entrypoints/inspector_main/nodeIcon.css",
71
- "front_end/entrypoints/inspector_main/renderingOptions.css",
72
57
  "front_end/entrypoints/inspector/inspector.js",
73
58
  "front_end/entrypoints/inspector/inspector.json",
74
59
  "front_end/panels/js_profiler/module.json",
@@ -328,7 +328,6 @@ grd_files_release_sources = [
328
328
  "front_end/panels/accessibility/accessibility-legacy.js",
329
329
  "front_end/panels/accessibility/accessibility-meta.js",
330
330
  "front_end/panels/accessibility/accessibility.js",
331
- "front_end/panels/accessibility/accessibility_module.js",
332
331
  "front_end/panels/animation/animation-legacy.js",
333
332
  "front_end/panels/animation/animation-meta.js",
334
333
  "front_end/panels/animation/animation.js",
@@ -347,17 +346,14 @@ grd_files_release_sources = [
347
346
  "front_end/panels/console/console-legacy.js",
348
347
  "front_end/panels/console/console-meta.js",
349
348
  "front_end/panels/console/console.js",
350
- "front_end/panels/console/console_module.js",
351
349
  "front_end/panels/console_counters/console_counters-meta.js",
352
350
  "front_end/panels/console_counters/console_counters.js",
353
351
  "front_end/panels/coverage/coverage-legacy.js",
354
352
  "front_end/panels/coverage/coverage-meta.js",
355
353
  "front_end/panels/coverage/coverage.js",
356
- "front_end/panels/coverage/coverage_module.js",
357
354
  "front_end/panels/css_overview/components/components.js",
358
355
  "front_end/panels/css_overview/css_overview-meta.js",
359
356
  "front_end/panels/css_overview/css_overview.js",
360
- "front_end/panels/css_overview/css_overview_module.js",
361
357
  "front_end/panels/developer_resources/developer_resources-meta.js",
362
358
  "front_end/panels/developer_resources/developer_resources.js",
363
359
  "front_end/panels/elements/components/components.js",
@@ -518,10 +514,8 @@ grd_files_release_sources = [
518
514
  "front_end/ui/legacy/components/source_frame/source_frame-legacy.js",
519
515
  "front_end/ui/legacy/components/source_frame/source_frame-meta.js",
520
516
  "front_end/ui/legacy/components/source_frame/source_frame.js",
521
- "front_end/ui/legacy/components/source_frame/source_frame_module.js",
522
517
  "front_end/ui/legacy/components/text_editor/text_editor-legacy.js",
523
518
  "front_end/ui/legacy/components/text_editor/text_editor.js",
524
- "front_end/ui/legacy/components/text_editor/text_editor_module.js",
525
519
  "front_end/ui/legacy/components/utils/utils-legacy.js",
526
520
  "front_end/ui/legacy/components/utils/utils.js",
527
521
  "front_end/ui/legacy/legacy-legacy.js",
@@ -579,3 +579,26 @@ export const base64ToSize = function(content: string|null): number {
579
579
  }
580
580
  return size;
581
581
  };
582
+
583
+ export const SINGLE_QUOTE = '\'';
584
+ export const DOUBLE_QUOTE = '"';
585
+ const BACKSLASH = '\\';
586
+
587
+ export const findUnclosedCssQuote = function(str: string): string {
588
+ let unmatchedQuote = '';
589
+ for (let i = 0; i < str.length; ++i) {
590
+ const char = str[i];
591
+ if (char === BACKSLASH) {
592
+ i++;
593
+ continue;
594
+ }
595
+ if (char === SINGLE_QUOTE || char === DOUBLE_QUOTE) {
596
+ if (unmatchedQuote === char) {
597
+ unmatchedQuote = '';
598
+ } else if (unmatchedQuote === '') {
599
+ unmatchedQuote = char;
600
+ }
601
+ }
602
+ }
603
+ return unmatchedQuote;
604
+ };
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "modules" : [
3
3
  { "name": "panels/emulation", "type": "autostart" },
4
- { "name": "entrypoints/inspector_main", "type": "autostart" },
5
4
 
6
- { "name": "panels/accessibility" },
7
5
  { "name": "panels/lighthouse" },
8
6
  { "name": "panels/browser_debugger" },
9
- { "name": "panels/css_overview" },
10
7
  { "name": "panels/elements" },
11
8
  { "name": "emulated_devices" },
12
9
  { "name": "panels/issues" },
@@ -4,7 +4,6 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
- import * as Root from '../../core/root/root.js';
8
7
  import * as UI from '../../ui/legacy/legacy.js';
9
8
 
10
9
  const UIStrings = {
@@ -109,8 +108,6 @@ let loadedInspectorMainModule: (typeof InspectorMain|undefined);
109
108
 
110
109
  async function loadInspectorMainModule(): Promise<typeof InspectorMain> {
111
110
  if (!loadedInspectorMainModule) {
112
- // Side-effect import resources in module.json
113
- await Root.Runtime.Runtime.instance().loadModulePromise('entrypoints/inspector_main');
114
111
  loadedInspectorMainModule = await import('./inspector_main.js');
115
112
  }
116
113
  return loadedInspectorMainModule;
@@ -29,6 +29,8 @@ class LighthousePort {
29
29
  send(message: string): void {
30
30
  notifyFrontendViaWorkerMessage('sendProtocolMessage', {message});
31
31
  }
32
+ close(): void {
33
+ }
32
34
  }
33
35
 
34
36
  const port = new LighthousePort();
@@ -59,7 +61,7 @@ async function start(params: any): Promise<unknown> {
59
61
  const url = params.url;
60
62
 
61
63
  // @ts-expect-error https://github.com/GoogleChrome/lighthouse/issues/11628
62
- return self.runLighthouse(url, flags, config, connection);
64
+ return await self.runLighthouse(url, flags, config, connection);
63
65
  } catch (err) {
64
66
  return ({
65
67
  fatal: true,
@@ -337,6 +337,7 @@ export class MainImpl {
337
337
  'hideIssuesFeature',
338
338
  'bfcacheDebugging',
339
339
  'cssTypeComponentLength',
340
+ Root.Runtime.ExperimentName.SYNC_SETTINGS,
340
341
  ]);
341
342
 
342
343
  Root.Runtime.experiments.cleanUpStaleExperiments();
@@ -2,14 +2,12 @@
2
2
  "modules": [
3
3
  { "name": "entrypoints/main", "type": "autostart" },
4
4
  { "name": "ui/legacy", "type": "autostart" },
5
+ { "name": "ui/legacy/components/text_editor", "type": "autostart" },
6
+ { "name": "ui/legacy/components/source_frame", "type": "autostart" },
5
7
 
6
- { "name": "panels/console" },
7
- { "name": "panels/coverage" },
8
8
  { "name": "ui/legacy/components/perf_ui" },
9
9
  { "name": "panels/profiler" },
10
10
  { "name": "panels/protocol_monitor"},
11
- { "name": "ui/legacy/components/source_frame" },
12
- { "name": "panels/sources" },
13
- { "name": "ui/legacy/components/text_editor" }
11
+ { "name": "panels/sources" }
14
12
  ]
15
13
  }
@@ -93,6 +93,9 @@ export class AXBreadcrumbsPane extends AccessibilitySubPane {
93
93
  let parent: AXBreadcrumb|null = null;
94
94
  this.inspectedNodeBreadcrumb = null;
95
95
  for (ancestor of ancestorChain) {
96
+ if (ancestor !== axNode && ancestor.ignored() && ancestor.parentNode()) {
97
+ continue;
98
+ }
96
99
  const breadcrumb = new AXBreadcrumb(ancestor, depth, (ancestor === axNode));
97
100
  if (parent) {
98
101
  parent.appendChild(breadcrumb);
@@ -112,6 +115,10 @@ export class AXBreadcrumbsPane extends AccessibilitySubPane {
112
115
 
113
116
  function append(
114
117
  parentBreadcrumb: AXBreadcrumb, axNode: SDK.AccessibilityModel.AccessibilityNode, localDepth: number): void {
118
+ if (axNode.ignored()) {
119
+ axNode.children().map(child => append(parentBreadcrumb, child, localDepth));
120
+ return;
121
+ }
115
122
  const childBreadcrumb = new AXBreadcrumb(axNode, localDepth, false);
116
123
  parentBreadcrumb.appendChild(childBreadcrumb);
117
124
 
@@ -121,7 +128,7 @@ export class AXBreadcrumbsPane extends AccessibilitySubPane {
121
128
  }
122
129
  }
123
130
 
124
- if (this.inspectedNodeBreadcrumb) {
131
+ if (this.inspectedNodeBreadcrumb && !axNode.ignored()) {
125
132
  for (const child of axNode.children()) {
126
133
  append(this.inspectedNodeBreadcrumb, child, depth);
127
134
  if (child.backendDOMNodeId() === this.collapsingBreadcrumbId) {
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -26,8 +25,6 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
26
25
 
27
26
  async function loadAccessibilityModule(): Promise<typeof Accessibility> {
28
27
  if (!loadedAccessibilityModule) {
29
- // Side-effect import resources in module.json
30
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/accessibility');
31
28
  loadedAccessibilityModule = await import('./accessibility.js');
32
29
  }
33
30
  return loadedAccessibilityModule;
@@ -5,6 +5,7 @@
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as DataGrid from '../../../ui/components/data_grid/data_grid.js';
7
7
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
8
+ import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
8
9
  import * as LitHtml from '../../../ui/lit-html/lit-html.js';
9
10
 
10
11
  import type * as Protocol from '../../../generated/protocol.js';
@@ -24,6 +25,33 @@ export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
24
25
 
25
26
  const {render, html} = LitHtml;
26
27
 
28
+ export class ReportsGridStatusHeader extends HTMLElement {
29
+ static readonly litTagName = LitHtml.literal`devtools-resources-reports-grid-status-header`;
30
+ private readonly shadow = this.attachShadow({mode: 'open'});
31
+
32
+ connectedCallback(): void {
33
+ this.shadow.adoptedStyleSheets = [reportingApiGridStyles];
34
+ this.render();
35
+ }
36
+
37
+ private render(): void {
38
+ // Disabled until https://crbug.com/1079231 is fixed.
39
+ // clang-format off
40
+ render(html`
41
+ ${i18n.i18n.lockedString('Status')}
42
+ <x-link href="https://web.dev/reporting-api/#report-status">
43
+ <${IconButton.Icon.Icon.litTagName} class="inline-icon" .data=${{
44
+ iconName: 'help_outline',
45
+ color: 'var(--color-primary)',
46
+ width: '16px',
47
+ height: '16px',
48
+ } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
49
+ </x-link>
50
+ `, this.shadow, {host: this});
51
+ // clang-format on
52
+ }
53
+ }
54
+
27
55
  export interface ReportsGridData {
28
56
  reports: Protocol.Network.ReportingApiReport[];
29
57
  }
@@ -59,21 +87,24 @@ export class ReportsGrid extends HTMLElement {
59
87
  {
60
88
  id: 'type',
61
89
  title: i18n.i18n.lockedString('Type'),
62
- widthWeighting: 10,
90
+ widthWeighting: 20,
63
91
  hideable: false,
64
92
  visible: true,
65
93
  },
66
94
  {
67
95
  id: 'status',
68
96
  title: i18n.i18n.lockedString('Status'),
69
- widthWeighting: 10,
97
+ widthWeighting: 20,
70
98
  hideable: false,
71
99
  visible: true,
100
+ titleElement: html`
101
+ <${ReportsGridStatusHeader.litTagName}></${ReportsGridStatusHeader.litTagName}>
102
+ `,
72
103
  },
73
104
  {
74
105
  id: 'destination',
75
106
  title: i18n.i18n.lockedString('Destination'),
76
- widthWeighting: 10,
107
+ widthWeighting: 20,
77
108
  hideable: false,
78
109
  visible: true,
79
110
  },
@@ -116,7 +147,7 @@ export class ReportsGrid extends HTMLElement {
116
147
  </div>
117
148
  `}
118
149
  </div>
119
- `, this.shadow);
150
+ `, this.shadow, {host: this});
120
151
  // clang-format on
121
152
  }
122
153
 
@@ -135,10 +166,13 @@ export class ReportsGrid extends HTMLElement {
135
166
  }
136
167
  }
137
168
 
169
+ ComponentHelpers.CustomElements.defineComponent(
170
+ 'devtools-resources-reports-grid-status-header', ReportsGridStatusHeader);
138
171
  ComponentHelpers.CustomElements.defineComponent('devtools-resources-reports-grid', ReportsGrid);
139
172
 
140
173
  declare global {
141
174
  interface HTMLElementTagNameMap {
175
+ 'devtools-resources-reports-grid-status-header': ReportsGridStatusHeader;
142
176
  'devtools-resources-reports-grid': ReportsGrid;
143
177
  }
144
178
  }
@@ -33,3 +33,7 @@
33
33
  devtools-data-grid-controller {
34
34
  border: 1px solid var(--color-details-hairline);
35
35
  }
36
+
37
+ .inline-icon {
38
+ vertical-align: text-bottom;
39
+ }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy/components/source_frame",
4
3
  "ui/legacy",
5
4
  "ui/legacy/components/perf_ui",
6
5
  "panels/network",
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "panels/elements",
4
- "panels/sources",
5
- "panels/console"
4
+ "panels/sources"
6
5
  ]
7
6
  }
@@ -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 UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -118,8 +117,6 @@ let loadedConsoleModule: (typeof Console|undefined);
118
117
 
119
118
  async function loadConsoleModule(): Promise<typeof Console> {
120
119
  if (!loadedConsoleModule) {
121
- // Side-effect import resources in module.json
122
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/console');
123
120
  loadedConsoleModule = await import('./console.js');
124
121
  }
125
122
  return loadedConsoleModule;
@@ -306,6 +303,7 @@ Common.Settings.registerSettingExtension({
306
303
 
307
304
  Common.Settings.registerSettingExtension({
308
305
  category: Common.Settings.SettingCategory.CONSOLE,
306
+ storageType: Common.Settings.SettingStorageType.Synced,
309
307
  title: i18nLazyString(UIStrings.groupSimilarMessagesInConsole),
310
308
  settingName: 'consoleGroupSimilar',
311
309
  settingType: Common.Settings.SettingType.BOOLEAN,
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -38,8 +37,6 @@ let loadedCoverageModule: (typeof Coverage|undefined);
38
37
 
39
38
  async function loadCoverageModule(): Promise<typeof Coverage> {
40
39
  if (!loadedCoverageModule) {
41
- // Side-effect import resources in module.json
42
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/coverage');
43
40
  loadedCoverageModule = await import('./coverage.js');
44
41
  }
45
42
  return loadedCoverageModule;
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -27,8 +26,6 @@ let loadedCSSOverviewModule: (typeof CSSOverview|undefined);
27
26
 
28
27
  async function loadCSSOverviewModule(): Promise<typeof CSSOverview> {
29
28
  if (!loadedCSSOverviewModule) {
30
- // Side-effect import resources in module.json
31
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/css_overview');
32
29
  loadedCSSOverviewModule = await import('./css_overview.js');
33
30
  }
34
31
  return loadedCSSOverviewModule;
@@ -1440,11 +1440,14 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
1440
1440
  const currentNode = this.parentPaneInternal.node();
1441
1441
  this.parentPaneInternal.setUserOperation(true);
1442
1442
 
1443
+ styleText += Platform.StringUtilities.findUnclosedCssQuote(styleText);
1444
+
1443
1445
  // Append a ";" if the new text does not end in ";".
1444
1446
  // FIXME: this does not handle trailing comments.
1445
1447
  if (styleText.length && !/;\s*$/.test(styleText)) {
1446
1448
  styleText += ';';
1447
1449
  }
1450
+
1448
1451
  const overwriteProperty = !this.newProperty || hasBeenEditedIncrementally;
1449
1452
  let success: boolean = await this.property.setText(styleText, majorChange, overwriteProperty);
1450
1453
  // Revert to the original text if applying the new text failed
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/text_editor"
3
+ "ui/legacy"
5
4
  ]
6
5
  }
@@ -224,6 +224,8 @@ export class EventListenersView extends UI.Widget.VBox {
224
224
  if (firstVisibleChild) {
225
225
  firstVisibleChild.select(true /* omitFocus */);
226
226
  }
227
+
228
+ this.treeOutline.setFocusable(Boolean(firstVisibleChild));
227
229
  }
228
230
 
229
231
  reset(): void {
@@ -2,7 +2,6 @@
2
2
  "dependencies": [
3
3
  "panels/emulation",
4
4
  "panels/timeline",
5
- "entrypoints/inspector_main",
6
5
  "ui/legacy"
7
6
  ],
8
7
  "resources": [
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "ui/legacy/components/source_frame",
5
4
  "ui/legacy/components/perf_ui"
6
5
  ]
7
6
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy/components/perf_ui",
4
- "ui/legacy/components/source_frame",
5
4
  "ui/legacy"
6
5
  ]
7
6
  }
@@ -164,6 +164,9 @@ export class ProtocolMonitorImpl extends UI.Widget.VBox {
164
164
  widthWeighting: 1,
165
165
  visible: true,
166
166
  hideable: true,
167
+ styles: {
168
+ 'text-align': 'center',
169
+ },
167
170
  },
168
171
  {
169
172
  id: 'method',
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/source_frame"
3
+ "ui/legacy"
5
4
  ]
6
5
  }
@@ -1,7 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/source_frame",
5
- "panels/coverage"
3
+ "ui/legacy"
6
4
  ]
7
5
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "panels/coverage",
5
4
  "panels/layer_viewer",
6
5
  "ui/legacy/components/perf_ui",
7
6
  "panels/profiler"
@@ -729,6 +729,7 @@ export class DataGrid extends HTMLElement {
729
729
  const cellIsFocusableCell = anyColumnsSortable && columnIndex === tabbableCell[0] && tabbableCell[1] === 0;
730
730
 
731
731
  return LitHtml.html`<th class=${thClasses}
732
+ style=${LitHtml.Directives.ifDefined(col.styles ? LitHtml.Directives.styleMap(col.styles) : undefined)}
732
733
  data-grid-header-cell=${col.id}
733
734
  @focus=${(): void => {
734
735
  this.focusCellIfRequired([columnIndex, 0]);
@@ -749,7 +750,7 @@ export class DataGrid extends HTMLElement {
749
750
  data-row-index='0'
750
751
  data-col-index=${columnIndex}
751
752
  tabindex=${LitHtml.Directives.ifDefined(anyColumnsSortable ? (cellIsFocusableCell ? '0' : '-1') : undefined)}
752
- >${col.title}</th>`;
753
+ >${col.titleElement || col.title}</th>`;
753
754
  })}
754
755
  </tr>
755
756
  </thead>
@@ -790,6 +791,7 @@ export class DataGrid extends HTMLElement {
790
791
  const cellOutput = col.visible ? renderCellValue(cell) : null;
791
792
  return LitHtml.html`<td
792
793
  class=${cellClasses}
794
+ style=${LitHtml.Directives.ifDefined(col.styles ? LitHtml.Directives.styleMap(col.styles) : undefined)}
793
795
  tabindex=${cellIsFocusableCell ? '0' : '-1'}
794
796
  aria-colindex=${columnIndex + 1}
795
797
  title=${cell.title || String(cell.value).substr(0, 20)}
@@ -6,6 +6,10 @@ import type * as LitHtml from '../../../ui/lit-html/lit-html.js';
6
6
  import * as DataGridRenderers from './DataGridRenderers.js';
7
7
  import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
8
8
 
9
+ export interface CSSStylesObject {
10
+ readonly [name: string]: string;
11
+ }
12
+
9
13
  /**
10
14
  * A column is an object with the following properties:
11
15
  *
@@ -19,14 +23,17 @@ import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
19
23
  * Note, if you're rendering a data-grid yourself you likely shouldn't set
20
24
  * this. It's set by the `data-grid-controller`, which is the component you
21
25
  * want if your table needs to be sortable.
26
+ * - `styles`: an optional property of key-value sets of CSS properties and values.
22
27
  */
23
28
  export interface Column {
24
29
  id: string;
25
30
  title: string;
31
+ titleElement?: LitHtml.TemplateResult;
26
32
  sortable?: boolean;
27
33
  widthWeighting: number;
28
34
  hideable: boolean;
29
35
  visible: boolean;
36
+ styles?: CSSStylesObject;
30
37
  }
31
38
 
32
39
  export type CellValue = string|number|boolean|IconButton.Icon.Icon|null;
@@ -56,14 +63,10 @@ export function getStringifiedCellValues(cells: Cell[]): string {
56
63
  .toLowerCase();
57
64
  }
58
65
 
59
- export interface RowCSSStylesObject {
60
- readonly [name: string]: string;
61
- }
62
-
63
66
  export type Row = {
64
67
  cells: Cell[],
65
68
  hidden?: boolean,
66
- styles?: RowCSSStylesObject,
69
+ styles?: CSSStylesObject,
67
70
  };
68
71
 
69
72
  export const enum SortDirection {
@@ -106,11 +106,6 @@ th.firstVisibleColumn {
106
106
  padding: 0;
107
107
  }
108
108
 
109
- tr td:nth-child(1),
110
- tr th:nth-child(1) {
111
- text-align: center;
112
- }
113
-
114
109
  .filler-row.empty-table td {
115
110
  /* If the table is empty and we have no renderable rows, the filler row cell
116
111
  * needs to have some form of padding to make it have some height, else it
@@ -24,8 +24,3 @@ label {
24
24
  p {
25
25
  margin: 12px 0;
26
26
  }
27
-
28
- /* Preserve look of legacy checkboxes in dark mode */
29
- :host-context(.-theme-with-dark-background) input[type="checkbox"]:not(.-theme-preserve) {
30
- filter: invert(80%);
31
- }
@@ -283,10 +283,8 @@ export class Editor<T> {
283
283
  const buttonsRow = this.element.createChild('div', 'editor-buttons');
284
284
  this.commitButton = createTextButton('', this.commitClicked.bind(this), '', true /* primary */);
285
285
  buttonsRow.appendChild(this.commitButton);
286
- this.cancelButton = createTextButton(
287
- i18nString(UIStrings.cancelString), this.cancelClicked.bind(this), '', true /* primary */, 'mousedown');
288
- this.cancelButton.addEventListener(
289
- 'keydown', onKeyDown.bind(null, event => event.key === 'Enter', this.cancelClicked.bind(this)), false);
286
+ this.cancelButton =
287
+ createTextButton(i18nString(UIStrings.cancelString), this.cancelClicked.bind(this), '', true /* primary */);
290
288
  buttonsRow.appendChild(this.cancelButton);
291
289
 
292
290
  this.errorMessageContainer = this.element.createChild('div', 'list-widget-input-validation-error');
@@ -5,6 +5,7 @@
5
5
  import * as Host from '../../core/host/host.js';
6
6
  import * as Platform from '../../core/platform/platform.js';
7
7
  import * as ComponentHelpers from '../components/helpers/helpers.js';
8
+ import * as LitHtml from '../lit-html/lit-html.js';
8
9
 
9
10
  import * as ARIAUtils from './ARIAUtils.js';
10
11
  import type {ContextMenu, Provider} from './ContextMenu.js';
@@ -152,3 +153,5 @@ export class ContextMenuProvider implements Provider {
152
153
  }
153
154
 
154
155
  ComponentHelpers.CustomElements.defineComponent('x-link', XLink);
156
+
157
+ export const sample = LitHtml.html`<p>Hello, <x-link>world!</x-link></p>`;
@@ -60,10 +60,6 @@ input.dt-checkbox-themed:checked::after {
60
60
  background-color: var(--color-background-inverted);
61
61
  }
62
62
 
63
- :host-context(.-theme-with-dark-background) input:not(.dt-checkbox-themed) {
64
- filter: invert(80%);
65
- }
66
-
67
63
  .dt-checkbox-text {
68
64
  margin-left: 3px;
69
65
  overflow: hidden;
@@ -1,8 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/source_frame",
5
- "ui/legacy/components/text_editor"
3
+ "ui/legacy"
6
4
  ],
7
5
  "resources": [
8
6
  "chartViewport.css",
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy/components/text_editor",
4
3
  "ui/legacy"
5
4
  ],
6
5
  "resources": [
@@ -287,10 +287,6 @@ input::placeholder {
287
287
  --override-input-placeholder-color: rgb(230 230 230 / 54%);
288
288
  }
289
289
 
290
- :host-context(.-theme-with-dark-background) input[type="checkbox"]:not(.-theme-preserve) {
291
- filter: invert(80%);
292
- }
293
-
294
290
  .harmony-input:not([type]),
295
291
  .harmony-input[type=number],
296
292
  .harmony-input[type=text] {
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.936663"
58
+ "version": "1.0.937775"
59
59
  }
@@ -12,7 +12,7 @@ const destPath = path.join(process.cwd(), dest);
12
12
  // is because the file in that location might be a hardlinked file, and
13
13
  // overwriting it doesn't change the fact that it's hardlinked.
14
14
  const srcContents = fs.readFileSync(srcPath);
15
- if (fs.existsSync(destPath)) {
15
+ if (fileExists(destPath)) {
16
16
  // Check contents, return early if match
17
17
  const destContents = fs.readFileSync(destPath);
18
18
  if (srcContents.equals(destContents)) {
@@ -24,3 +24,12 @@ if (fs.existsSync(destPath)) {
24
24
  // toolchain will create a hardlink, which in turn reflects changes in
25
25
  // gen and resources/inspector back to //front_end.
26
26
  fs.writeFileSync(destPath, srcContents);
27
+
28
+ /**
29
+ * Case sensitive implementation of a file look up.
30
+ */
31
+ function fileExists(filePath) {
32
+ const dir = path.dirname(filePath);
33
+ const files = fs.readdirSync(dir);
34
+ return files.includes(path.basename(filePath));
35
+ }
@@ -13,7 +13,7 @@ for (const file of files.split(',')) {
13
13
  // is because the file in that location might be a hardlinked file, and
14
14
  // overwriting it doesn't change the fact that it's hardlinked.
15
15
  const srcContents = fs.readFileSync(srcPath);
16
- if (fs.existsSync(destPath)) {
16
+ if (fileExists(destPath)) {
17
17
  // Check contents, return early if match
18
18
  const destContents = fs.readFileSync(destPath);
19
19
  if (srcContents.equals(destContents)) {
@@ -26,3 +26,12 @@ for (const file of files.split(',')) {
26
26
  // gen and resources/inspector back to //front_end.
27
27
  fs.writeFileSync(destPath, srcContents);
28
28
  }
29
+
30
+ /**
31
+ * Case sensitive implementation of a file look up.
32
+ */
33
+ function fileExists(filePath) {
34
+ const dir = path.dirname(filePath);
35
+ const files = fs.readdirSync(dir);
36
+ return files.includes(path.basename(filePath));
37
+ }
@@ -1,9 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
- "resources": [
6
- "nodeIcon.css",
7
- "renderingOptions.css"
8
- ]
9
- }
@@ -1,7 +0,0 @@
1
- {
2
- "resources": [
3
- "accessibilityNode.css",
4
- "accessibilityProperties.css",
5
- "axBreadcrumbs.css"
6
- ]
7
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/text_editor"
5
- ]
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy/components/source_frame",
4
- "ui/legacy"
5
- ]
6
- }
@@ -1,4 +0,0 @@
1
- {
2
- "dependencies": [
3
- ]
4
- }