chrome-devtools-frontend 1.0.928589 → 1.0.929998
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/config/gni/devtools_grd_files.gni +7 -2
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/preview_feature_video_thumbnail.svg +92 -0
- package/front_end/Images/whatsnew.avif +0 -0
- package/front_end/core/common/CharacterIdMap.ts +12 -12
- package/front_end/core/common/Color.ts +71 -71
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/Progress.ts +45 -45
- package/front_end/core/common/ResolverBase.ts +8 -8
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +17 -16
- package/front_end/core/common/Settings.ts +84 -66
- package/front_end/core/common/SimpleHistoryManager.ts +33 -33
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/common/Throttler.ts +44 -40
- package/front_end/core/common/Trie.ts +42 -42
- package/front_end/core/common/WasmDisassembly.ts +11 -11
- package/front_end/core/common/Worker.ts +9 -9
- package/front_end/core/host/InspectorFrontendHost.ts +13 -13
- package/front_end/core/host/UserMetrics.ts +12 -13
- package/front_end/core/i18n/locales/en-US.json +53 -20
- package/front_end/core/i18n/locales/en-XL.json +53 -20
- package/front_end/core/platform/keyboard-utilities.ts +6 -0
- package/front_end/core/sdk/sdk-meta.ts +5 -0
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +14 -5
- package/front_end/entrypoints/main/main-meta.ts +4 -0
- package/front_end/models/issues_manager/IssuesManager.ts +2 -2
- package/front_end/panels/application/BackForwardCacheView.ts +19 -31
- package/front_end/panels/application/components/OriginTrialTreeView.ts +16 -0
- package/front_end/panels/console/console-meta.ts +6 -0
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +9 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +171 -0
- package/front_end/panels/css_overview/components/components.ts +9 -0
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +134 -0
- package/front_end/panels/css_overview/css_overview-meta.ts +2 -1
- package/front_end/panels/css_overview/css_overview.ts +0 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -0
- package/front_end/panels/elements/components/LayoutPane.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +1 -0
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -0
- package/front_end/panels/help/ReleaseNoteText.ts +29 -0
- package/front_end/panels/help/help-meta.ts +1 -0
- package/front_end/panels/issues/IssueKindView.ts +36 -0
- package/front_end/panels/issues/IssueView.ts +19 -4
- package/front_end/panels/issues/IssuesPane.ts +2 -3
- package/front_end/panels/issues/components/HideIssuesMenu.ts +11 -40
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +11 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +23 -4
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +1 -1
- package/front_end/ui/components/helpers/get-stylesheet.ts +4 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +21 -19
- package/front_end/ui/components/text_prompt/textPrompt.css +20 -9
- package/front_end/ui/legacy/Infobar.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +4 -2
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +17 -7
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -6
- package/front_end/ui/legacy/tabbedPane.css +9 -0
- package/package.json +1 -1
- package/scripts/javascript_natives/index.js +31 -25
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +0 -55
- package/front_end/panels/css_overview/cssOverviewStartView.css +0 -29
|
@@ -274,6 +274,14 @@ export class UserAgentClientHintsForm extends HTMLElement {
|
|
|
274
274
|
this.dispatchEvent(new ClientHintsChangeEvent());
|
|
275
275
|
this.brandsModifiedAriaMessage = i18nString(UIStrings.deletedBrand);
|
|
276
276
|
this.render();
|
|
277
|
+
|
|
278
|
+
// after deleting a brand row, focus on next Brand input if available,
|
|
279
|
+
// otherwise focus on the "Add Brand" button
|
|
280
|
+
let nextFocusElement = this.shadowRoot?.getElementById(`brand-${index + 1}-input`);
|
|
281
|
+
if (!nextFocusElement) {
|
|
282
|
+
nextFocusElement = this.shadowRoot?.getElementById('add-brand-button');
|
|
283
|
+
}
|
|
284
|
+
(nextFocusElement as HTMLElement)?.focus();
|
|
277
285
|
};
|
|
278
286
|
|
|
279
287
|
private handleAddBrandClick = (): void => {
|
|
@@ -455,6 +463,7 @@ export class UserAgentClientHintsForm extends HTMLElement {
|
|
|
455
463
|
type="text"
|
|
456
464
|
@input="${handleBrandBrowserChange}"
|
|
457
465
|
.value="${brand}"
|
|
466
|
+
id="brand-${index + 1}-input"
|
|
458
467
|
placeholder="${i18nString(UIStrings.brandName)}"
|
|
459
468
|
aria-label="${i18nString(UIStrings.brandNameAriaLabel, {
|
|
460
469
|
PH1: index + 1,
|
|
@@ -495,6 +504,8 @@ export class UserAgentClientHintsForm extends HTMLElement {
|
|
|
495
504
|
class="add-container full-row"
|
|
496
505
|
role="button"
|
|
497
506
|
tabindex="0"
|
|
507
|
+
id="add-brand-button"
|
|
508
|
+
aria-label="${i18nString(UIStrings.addBrand)}"
|
|
498
509
|
@click="${this.handleAddBrandClick}"
|
|
499
510
|
@keypress="${this.handleAddBrandKeyPress}"
|
|
500
511
|
>
|
|
@@ -178,7 +178,8 @@ export class DebuggerPlugin extends Plugin {
|
|
|
178
178
|
private readonly boundGutterClick:
|
|
179
179
|
(arg0: Common.EventTarget.EventTargetEvent<SourceFrame.SourcesTextEditor.GutterClickEventData>) => void;
|
|
180
180
|
private readonly breakpointDecorations: Set<BreakpointDecoration>;
|
|
181
|
-
private readonly decorationByBreakpoint:
|
|
181
|
+
private readonly decorationByBreakpoint:
|
|
182
|
+
Map<Bindings.BreakpointManager.Breakpoint, Map<string, BreakpointDecoration>>;
|
|
182
183
|
private readonly possibleBreakpointsRequested: Set<number>;
|
|
183
184
|
private scriptFileForDebuggerModel:
|
|
184
185
|
Map<SDK.DebuggerModel.DebuggerModel, Bindings.ResourceScriptMapping.ResourceScriptFile>;
|
|
@@ -1585,7 +1586,14 @@ export class DebuggerPlugin extends Plugin {
|
|
|
1585
1586
|
decoration.element.addEventListener('contextmenu', this.inlineBreakpointContextMenu.bind(this, decoration), true);
|
|
1586
1587
|
this.breakpointDecorations.add(decoration);
|
|
1587
1588
|
}
|
|
1588
|
-
|
|
1589
|
+
|
|
1590
|
+
let uiLocationsForBreakpoint = this.decorationByBreakpoint.get(breakpoint);
|
|
1591
|
+
if (!uiLocationsForBreakpoint) {
|
|
1592
|
+
uiLocationsForBreakpoint = new Map();
|
|
1593
|
+
this.decorationByBreakpoint.set(breakpoint, uiLocationsForBreakpoint);
|
|
1594
|
+
}
|
|
1595
|
+
uiLocationsForBreakpoint.set(uiLocation.id(), decoration);
|
|
1596
|
+
|
|
1589
1597
|
this.updateBreakpointDecoration(decoration);
|
|
1590
1598
|
if (breakpoint.enabled() && !lineDecorations.length) {
|
|
1591
1599
|
this.possibleBreakpointsRequested.add(editorLocation.lineNumber);
|
|
@@ -1645,11 +1653,22 @@ export class DebuggerPlugin extends Plugin {
|
|
|
1645
1653
|
return;
|
|
1646
1654
|
}
|
|
1647
1655
|
const {breakpoint, uiLocation} = event.data;
|
|
1648
|
-
|
|
1656
|
+
|
|
1657
|
+
const uiLocationsForBreakpoint = this.decorationByBreakpoint.get(breakpoint);
|
|
1658
|
+
if (!uiLocationsForBreakpoint) {
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
const decoration = uiLocationsForBreakpoint.get(uiLocation.id());
|
|
1663
|
+
uiLocationsForBreakpoint.delete(uiLocation.id());
|
|
1664
|
+
|
|
1665
|
+
if (uiLocationsForBreakpoint.size === 0) {
|
|
1666
|
+
this.decorationByBreakpoint.delete(breakpoint);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1649
1669
|
if (!decoration) {
|
|
1650
1670
|
return;
|
|
1651
1671
|
}
|
|
1652
|
-
this.decorationByBreakpoint.delete(breakpoint);
|
|
1653
1672
|
|
|
1654
1673
|
const editorLocation = this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber);
|
|
1655
1674
|
decoration.breakpoint = null;
|
|
@@ -123,7 +123,7 @@ export class FilteredUISourceCodeListProvider extends QuickOpen.FilteredListWidg
|
|
|
123
123
|
const fileNameIndex = fullDisplayName.lastIndexOf('/');
|
|
124
124
|
|
|
125
125
|
titleElement.textContent = uiSourceCode.displayName() + (this.queryLineNumberAndColumnNumber || '');
|
|
126
|
-
this.renderSubtitleElement(subtitleElement, fullDisplayName);
|
|
126
|
+
this.renderSubtitleElement(subtitleElement, fullDisplayName.substring(0, fileNameIndex + 1));
|
|
127
127
|
/** @type {!HTMLElement} */ UI.Tooltip.Tooltip.install((subtitleElement as HTMLElement), fullDisplayName);
|
|
128
128
|
const ranges = [];
|
|
129
129
|
for (let i = 0; i < indexes.length; ++i) {
|
|
@@ -53,4 +53,8 @@ export const CSS_RESOURCES_TO_LOAD_INTO_RUNTIME = [
|
|
|
53
53
|
'ui/legacy/suggestBox.css',
|
|
54
54
|
'ui/legacy/treeoutline.css',
|
|
55
55
|
'ui/legacy/softContextMenu.css',
|
|
56
|
+
'ui/legacy/splitWidget.css',
|
|
57
|
+
'ui/legacy/components/source_frame/jsonView.css',
|
|
58
|
+
'ui/legacy/searchableView.css',
|
|
59
|
+
'ui/legacy/toolbar.css',
|
|
56
60
|
];
|
|
@@ -54,12 +54,12 @@ export class TextPrompt extends HTMLElement {
|
|
|
54
54
|
this.input().focus();
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
private input():
|
|
58
|
-
const inputElement = this.shadow.querySelector('
|
|
57
|
+
private input(): HTMLInputElement {
|
|
58
|
+
const inputElement = this.shadow.querySelector<HTMLInputElement>('input');
|
|
59
59
|
if (!inputElement) {
|
|
60
60
|
throw new Error('Expected an input element!');
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return inputElement;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
moveCaretToEndOfInput(): void {
|
|
@@ -67,6 +67,7 @@ export class TextPrompt extends HTMLElement {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
onInput(): void {
|
|
70
|
+
this.suggestion().textContent = this.text();
|
|
70
71
|
this.dispatchEvent(new PromptInputEvent(this.text().trim()));
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -87,15 +88,7 @@ export class TextPrompt extends HTMLElement {
|
|
|
87
88
|
if (endIndex < startIndex) {
|
|
88
89
|
endIndex = startIndex;
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
-
const range = document.createRange();
|
|
92
|
-
range.setStart(inputBox, startIndex);
|
|
93
|
-
range.setEnd(inputBox, endIndex);
|
|
94
|
-
const selection = window.getSelection();
|
|
95
|
-
if (selection) {
|
|
96
|
-
selection.removeAllRanges();
|
|
97
|
-
selection.addRange(range);
|
|
98
|
-
}
|
|
91
|
+
this.input().setSelectionRange(startIndex, endIndex);
|
|
99
92
|
}
|
|
100
93
|
|
|
101
94
|
setPrefix(prefix: string): void {
|
|
@@ -109,24 +102,33 @@ export class TextPrompt extends HTMLElement {
|
|
|
109
102
|
}
|
|
110
103
|
|
|
111
104
|
setText(text: string): void {
|
|
112
|
-
this.input().
|
|
105
|
+
this.input().value = text;
|
|
106
|
+
this.suggestion().textContent = this.text();
|
|
107
|
+
|
|
113
108
|
if (this.input().hasFocus()) {
|
|
114
109
|
this.moveCaretToEndOfInput();
|
|
115
110
|
this.input().scrollIntoView();
|
|
116
111
|
}
|
|
117
112
|
}
|
|
118
113
|
|
|
114
|
+
private suggestion(): HTMLSpanElement {
|
|
115
|
+
const suggestionElement = this.shadow.querySelector<HTMLSpanElement>('.suggestion');
|
|
116
|
+
if (!suggestionElement) {
|
|
117
|
+
throw new Error('Expected an suggestion element!');
|
|
118
|
+
}
|
|
119
|
+
return suggestionElement;
|
|
120
|
+
}
|
|
121
|
+
|
|
119
122
|
private text(): string {
|
|
120
|
-
return this.input().
|
|
123
|
+
return this.input().value || '';
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
private render(): void {
|
|
124
127
|
const output = LitHtml.html`
|
|
125
|
-
<span class="prefix">${this.prefixText}</span>
|
|
126
|
-
<input aria-label=${this.ariaLabelText}
|
|
127
|
-
|
|
128
|
-
this.
|
|
129
|
-
</input>`;
|
|
128
|
+
<span class="prefix">${this.prefixText} </span>
|
|
129
|
+
<span class="text-prompt-input"><input aria-label=${this.ariaLabelText} spellcheck="false" @input=${
|
|
130
|
+
this.onInput} @keydown=${this.onKeyDown}/><span class='suggestion' suggestion="${
|
|
131
|
+
this.suggestionText}"></span></span>`;
|
|
130
132
|
LitHtml.render(output, this.shadow, {host: this});
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -7,27 +7,38 @@
|
|
|
7
7
|
:host {
|
|
8
8
|
white-space: pre;
|
|
9
9
|
overflow: hidden;
|
|
10
|
-
display:
|
|
10
|
+
display: flex;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.prefix {
|
|
14
|
+
flex: none;
|
|
14
15
|
color: var(--color-primary);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
input {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
outline: none;
|
|
18
|
+
.text-prompt-input {
|
|
19
|
+
flex: auto;
|
|
20
|
+
position: relative;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.text-prompt-input {
|
|
23
|
+
.text-prompt-input input {
|
|
24
|
+
width: 100%;
|
|
24
25
|
border: none;
|
|
25
26
|
outline: none;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
position: absolute;
|
|
28
|
+
left: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.text-prompt-input .suggestion {
|
|
35
|
+
color: transparent;
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: 0;
|
|
38
|
+
z-index: 1;
|
|
28
39
|
}
|
|
29
40
|
|
|
30
|
-
.text-prompt-input::after {
|
|
41
|
+
.text-prompt-input .suggestion::after {
|
|
31
42
|
content: attr(suggestion);
|
|
32
43
|
color: var(--color-background-highlight);
|
|
33
44
|
}
|
|
@@ -103,6 +103,7 @@ export class Infobar {
|
|
|
103
103
|
this.closeContainer = this.mainRow.createChild('div', 'infobar-close-container');
|
|
104
104
|
this.toggleElement = createTextButton(
|
|
105
105
|
i18nString(UIStrings.learnMore), this.onToggleDetails.bind(this), 'link-style devtools-link hidden');
|
|
106
|
+
this.toggleElement.setAttribute('role', 'link');
|
|
106
107
|
this.closeContainer.appendChild(this.toggleElement);
|
|
107
108
|
this.closeButton = this.closeContainer.createChild('div', 'close-button', 'dt-close-button');
|
|
108
109
|
// @ts-ignore This is a custom element defined in UIUitls.js that has a `setTabbable` that TS doesn't
|
|
@@ -54,6 +54,7 @@ export class CSSLength extends HTMLElement {
|
|
|
54
54
|
private onUnitChange(event: Event): void {
|
|
55
55
|
this.length.unit = (event.target as HTMLInputElement).value as LengthUnit;
|
|
56
56
|
this.dispatchEvent(new ValueChangedEvent(`${this.length.value}${this.length.unit}`));
|
|
57
|
+
this.dispatchEvent(new DraggingFinishedEvent());
|
|
57
58
|
this.render();
|
|
58
59
|
}
|
|
59
60
|
|
|
@@ -81,15 +82,16 @@ export class CSSLength extends HTMLElement {
|
|
|
81
82
|
if (targetDocument) {
|
|
82
83
|
targetDocument.addEventListener('mousemove', this.onDraggingValue, {capture: true});
|
|
83
84
|
targetDocument.addEventListener('mouseup', (event: MouseEvent) => {
|
|
85
|
+
targetDocument.removeEventListener('mousemove', this.onDraggingValue, {capture: true});
|
|
86
|
+
|
|
84
87
|
if (!this.isDraggingValue) {
|
|
85
88
|
return;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
event.preventDefault();
|
|
89
92
|
event.stopPropagation();
|
|
90
|
-
targetDocument.removeEventListener('mousemove', this.onDraggingValue, {capture: true});
|
|
91
93
|
this.isDraggingValue = false;
|
|
92
|
-
this.dispatchEvent(new
|
|
94
|
+
this.dispatchEvent(new DraggingFinishedEvent());
|
|
93
95
|
}, {once: true, capture: true});
|
|
94
96
|
}
|
|
95
97
|
}
|
|
@@ -84,6 +84,7 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
84
84
|
this.itemElementsContainer.classList.add('container');
|
|
85
85
|
this.bottomElementsContainer.appendChild(this.itemElementsContainer);
|
|
86
86
|
this.itemElementsContainer.addEventListener('click', this.onClick.bind(this), false);
|
|
87
|
+
this.itemElementsContainer.addEventListener('mouseover', this.onMouseOver.bind(this), false);
|
|
87
88
|
UI.ARIAUtils.markAsListBox(this.itemElementsContainer);
|
|
88
89
|
UI.ARIAUtils.setControls(this.inputBoxElement, this.itemElementsContainer);
|
|
89
90
|
UI.ARIAUtils.setAutocomplete(this.inputBoxElement, UI.ARIAUtils.AutocompleteInteractionModel.list);
|
|
@@ -232,10 +233,11 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
232
233
|
this.refreshListWithCurrentResult = undefined;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
|
-
private onEnter(
|
|
236
|
+
private onEnter(event: Event): void {
|
|
236
237
|
if (!this.provider) {
|
|
237
238
|
return;
|
|
238
239
|
}
|
|
240
|
+
event.preventDefault();
|
|
239
241
|
const selectedIndexInProvider = this.provider.itemCount() ? this.list.selectedItem() : null;
|
|
240
242
|
|
|
241
243
|
this.selectItem(selectedIndexInProvider);
|
|
@@ -305,6 +307,14 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
305
307
|
}
|
|
306
308
|
}
|
|
307
309
|
|
|
310
|
+
private onMouseOver(event: Event): void {
|
|
311
|
+
const item = this.list.itemForNode((event.target as Node | null));
|
|
312
|
+
if (item === null) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
this.list.selectItem(item);
|
|
316
|
+
}
|
|
317
|
+
|
|
308
318
|
setQuery(query: string): void {
|
|
309
319
|
this.query = query;
|
|
310
320
|
this.inputBoxElement.focus();
|
|
@@ -488,22 +498,22 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
488
498
|
private onKeyDown(keyboardEvent: KeyboardEvent): void {
|
|
489
499
|
let handled = false;
|
|
490
500
|
switch (keyboardEvent.key) {
|
|
491
|
-
case
|
|
501
|
+
case Platform.KeyboardUtilities.ENTER_KEY:
|
|
492
502
|
this.onEnter(keyboardEvent);
|
|
493
503
|
return;
|
|
494
|
-
case
|
|
504
|
+
case Platform.KeyboardUtilities.TAB_KEY:
|
|
495
505
|
handled = this.tabKeyPressed();
|
|
496
506
|
break;
|
|
497
|
-
case
|
|
507
|
+
case Platform.KeyboardUtilities.ArrowKey.UP:
|
|
498
508
|
handled = this.list.selectPreviousItem(true, false);
|
|
499
509
|
break;
|
|
500
|
-
case
|
|
510
|
+
case Platform.KeyboardUtilities.ArrowKey.DOWN:
|
|
501
511
|
handled = this.list.selectNextItem(true, false);
|
|
502
512
|
break;
|
|
503
|
-
case
|
|
513
|
+
case Platform.KeyboardUtilities.PageKey.UP:
|
|
504
514
|
handled = this.list.selectItemPreviousPage(false);
|
|
505
515
|
break;
|
|
506
|
-
case
|
|
516
|
+
case Platform.KeyboardUtilities.PageKey.DOWN:
|
|
507
517
|
handled = this.list.selectItemNextPage(false);
|
|
508
518
|
break;
|
|
509
519
|
}
|
|
@@ -68,23 +68,23 @@ export class QuickOpenImpl {
|
|
|
68
68
|
|
|
69
69
|
private async queryChanged(query: string): Promise<void> {
|
|
70
70
|
const prefix = this.prefixes.find(prefix => query.startsWith(prefix));
|
|
71
|
-
if (typeof prefix !== 'string'
|
|
72
|
-
if (query !== prefix && this.filteredListWidget) {
|
|
73
|
-
this.filteredListWidget.setCommandSuggestion('');
|
|
74
|
-
}
|
|
71
|
+
if (typeof prefix !== 'string') {
|
|
75
72
|
return;
|
|
76
73
|
}
|
|
77
74
|
|
|
78
|
-
this.prefix = prefix;
|
|
79
75
|
if (!this.filteredListWidget) {
|
|
80
76
|
return;
|
|
81
77
|
}
|
|
82
78
|
this.filteredListWidget.setPrefix(prefix);
|
|
83
79
|
const titlePrefixFunction = this.providers.get(prefix)?.titlePrefix;
|
|
84
80
|
this.filteredListWidget.setCommandPrefix(titlePrefixFunction ? titlePrefixFunction() : '');
|
|
85
|
-
const titleSuggestionFunction = this.providers.get(prefix)?.titleSuggestion;
|
|
81
|
+
const titleSuggestionFunction = (query === prefix) && this.providers.get(prefix)?.titleSuggestion;
|
|
86
82
|
this.filteredListWidget.setCommandSuggestion(titleSuggestionFunction ? titleSuggestionFunction() : '');
|
|
87
83
|
|
|
84
|
+
if (this.prefix === prefix) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.prefix = prefix;
|
|
88
88
|
this.filteredListWidget.setProvider(null);
|
|
89
89
|
const providerFunction = this.providers.get(prefix)?.provider;
|
|
90
90
|
if (!providerFunction) {
|
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
/**
|
|
155
155
|
* In light-mode we have a blue border to show the active pane, and we don't change the background color. In dark mode we do not show the border, so we instead change the background color.
|
|
156
156
|
*/
|
|
157
|
+
/* stylelint-disable no-descending-specificity */
|
|
157
158
|
.-theme-with-dark-background .tabbed-pane-header-tab.selected,
|
|
158
159
|
:host-context(.-theme-with-dark-background) .tabbed-pane-header-tab.selected {
|
|
159
160
|
--override-tabbed-dark-mode-bg-color: rgb(0 0 0);
|
|
@@ -161,6 +162,12 @@
|
|
|
161
162
|
background-color: var(--override-tabbed-dark-mode-bg-color);
|
|
162
163
|
}
|
|
163
164
|
|
|
165
|
+
.-theme-with-dark-background .tabbed-pane-header-tab.selected,
|
|
166
|
+
:host-context(.-theme-with-dark-background) .tabbed-pane-header-tab.selected:focus {
|
|
167
|
+
background-color: var(--color-background-elevation-0);
|
|
168
|
+
}
|
|
169
|
+
/* stylelint-enable no-descending-specificity */
|
|
170
|
+
|
|
164
171
|
.tabbed-pane-header-tab.dragging {
|
|
165
172
|
--override-dragging-box-shadow-color: rgb(0 0 0 / 37%);
|
|
166
173
|
|
|
@@ -265,6 +272,7 @@
|
|
|
265
272
|
cursor: pointer !important; /* stylelint-disable-line declaration-no-important */
|
|
266
273
|
}
|
|
267
274
|
|
|
275
|
+
/* stylelint-disable no-descending-specificity */
|
|
268
276
|
.tabbed-pane-shadow.vertical-tab-layout .tabbed-pane-header-tab.selected {
|
|
269
277
|
--override-vertical-tab-selected-border-color: #666;
|
|
270
278
|
|
|
@@ -278,6 +286,7 @@
|
|
|
278
286
|
:host-context(.-theme-with-dark-background) .tabbed-pane-shadow.vertical-tab-layout .tabbed-pane-header-tab.selected {
|
|
279
287
|
--override-vertical-tab-selected-border-color: rgb(153 153 153);
|
|
280
288
|
}
|
|
289
|
+
/* stylelint-enable no-descending-specificity */
|
|
281
290
|
|
|
282
291
|
.tabbed-pane-tab-slider {
|
|
283
292
|
height: 2px;
|
package/package.json
CHANGED
|
@@ -51,28 +51,33 @@ function parseTSFunction(func, node) {
|
|
|
51
51
|
storeMethod(node.name.text, func.name.escapedText, args);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
// Assume the DevTools front-end repository is at
|
|
55
|
+
// `devtools/devtools-frontend`, where `devtools` is on the same level
|
|
56
|
+
// as `chromium`. This matches `scripts/npm_test.js`.
|
|
57
|
+
glob(
|
|
58
|
+
'../../../../chromium/src/third_party/blink/renderer/+(core|modules)/**/*.idl', {cwd: process.env.PWD},
|
|
59
|
+
function(er, files) {
|
|
60
|
+
for (const file of files) {
|
|
61
|
+
if (file.includes('testing')) {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const data = fs.readFileSync(path.join(process.env.PWD, file), 'utf8');
|
|
65
|
+
const lines = data.split('\n');
|
|
66
|
+
const newLines = [];
|
|
67
|
+
for (const line of lines) {
|
|
68
|
+
if (!line.includes(' attribute ')) {
|
|
69
|
+
newLines.push(line);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
try {
|
|
74
|
+
WebIDL2.parse(newLines.join('\n')).forEach(walk);
|
|
75
|
+
} catch (e) {
|
|
76
|
+
// console.error(file);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
WebIDL2
|
|
80
|
+
.parse(`
|
|
76
81
|
namespace console {
|
|
77
82
|
void assert(optional boolean condition = false, any... data);
|
|
78
83
|
void clear();
|
|
@@ -96,8 +101,8 @@ glob('../../../../blink/renderer/+(core|modules)/**/*.idl', {cwd: process.env.PW
|
|
|
96
101
|
void warn(any... data);
|
|
97
102
|
};
|
|
98
103
|
`).forEach(walk);
|
|
99
|
-
|
|
100
|
-
});
|
|
104
|
+
postProcess();
|
|
105
|
+
});
|
|
101
106
|
|
|
102
107
|
function walk(thing, parent) {
|
|
103
108
|
if (thing.type === 'interface') {
|
|
@@ -215,11 +220,12 @@ function postProcess() {
|
|
|
215
220
|
}
|
|
216
221
|
|
|
217
222
|
fs.writeFileSync(
|
|
218
|
-
path.join(__dirname, '..', '..', 'front_end', 'javascript_metadata', 'NativeFunctions.js'),
|
|
223
|
+
path.join(__dirname, '..', '..', 'front_end', 'models', 'javascript_metadata', 'NativeFunctions.js'),
|
|
219
224
|
`// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
220
225
|
// Use of this source code is governed by a BSD-style license that can be
|
|
221
226
|
// found in the LICENSE file.
|
|
222
227
|
// Generated from ${path.relative(path.join(__dirname, '..', '..'), __filename)}
|
|
223
|
-
|
|
228
|
+
|
|
229
|
+
export const NativeFunctions = ${JSON.stringify(functions, null, 2)};
|
|
224
230
|
`);
|
|
225
231
|
}
|
|
@@ -1,55 +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
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
-
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
|
-
|
|
8
|
-
import cssOverviewStartViewStyles from './cssOverviewStartView.css.js';
|
|
9
|
-
|
|
10
|
-
import type {OverviewController} from './CSSOverviewController.js';
|
|
11
|
-
import {Events} from './CSSOverviewController.js';
|
|
12
|
-
|
|
13
|
-
const UIStrings = {
|
|
14
|
-
/**
|
|
15
|
-
*@description Label for the capture button in the CSS Overview Panel
|
|
16
|
-
*/
|
|
17
|
-
captureOverview: 'Capture overview',
|
|
18
|
-
/**
|
|
19
|
-
*@description Title of the CSS Overview Panel
|
|
20
|
-
*/
|
|
21
|
-
cssOverview: 'CSS Overview',
|
|
22
|
-
};
|
|
23
|
-
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewStartView.ts', UIStrings);
|
|
24
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
|
-
export class CSSOverviewStartView extends UI.Widget.Widget {
|
|
26
|
-
private readonly controller: OverviewController;
|
|
27
|
-
constructor(controller: OverviewController) {
|
|
28
|
-
super();
|
|
29
|
-
|
|
30
|
-
this.controller = controller;
|
|
31
|
-
this.render();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private render(): void {
|
|
35
|
-
const startButton = UI.UIUtils.createTextButton(
|
|
36
|
-
i18nString(UIStrings.captureOverview),
|
|
37
|
-
() => this.controller.dispatchEventToListeners(Events.RequestOverviewStart), '', true /* primary */);
|
|
38
|
-
|
|
39
|
-
this.setDefaultFocusedElement(startButton);
|
|
40
|
-
|
|
41
|
-
const fragment = UI.Fragment.Fragment.build`
|
|
42
|
-
<div class="vbox overview-start-view">
|
|
43
|
-
<h1>${i18nString(UIStrings.cssOverview)}</h1>
|
|
44
|
-
<div>${startButton}</div>
|
|
45
|
-
</div>
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
this.contentElement.appendChild(fragment.element());
|
|
49
|
-
this.contentElement.style.overflow = 'auto';
|
|
50
|
-
}
|
|
51
|
-
wasShown(): void {
|
|
52
|
-
super.wasShown();
|
|
53
|
-
this.registerCSSFiles([cssOverviewStartViewStyles]);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2019 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
|
-
.overview-start-view {
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
padding: 16px;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
align-items: center;
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.overview-start-view h1 {
|
|
16
|
-
font-size: 16px;
|
|
17
|
-
text-align: center;
|
|
18
|
-
font-weight: normal;
|
|
19
|
-
margin: 0;
|
|
20
|
-
padding: 8px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.overview-start-view div {
|
|
24
|
-
font-size: 12px;
|
|
25
|
-
text-align: center;
|
|
26
|
-
font-weight: normal;
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding-bottom: 44px;
|
|
29
|
-
}
|