chrome-devtools-frontend 1.0.1587572 → 1.0.1588580
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/front_end/core/sdk/DOMModel.ts +3 -0
- package/front_end/core/sdk/PreloadingModel.ts +15 -6
- package/front_end/core/sdk/ScopeTreeCache.ts +4 -0
- package/front_end/generated/Deprecation.ts +21 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -3
- package/front_end/generated/SupportedCSSProperties.js +46 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +49 -0
- package/front_end/models/ai_assistance/AiConversation.ts +5 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +16 -4
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +7 -1
- package/front_end/models/computed_style/ComputedStyleModel.ts +2 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -16
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +15 -23
- package/front_end/panels/ai_assistance/components/ChatInput.ts +36 -31
- package/front_end/panels/ai_assistance/components/chatInput.css +6 -9
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +3 -5
- package/front_end/panels/application/preloading/PreloadingView.ts +18 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +3 -3
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +11 -3
- package/front_end/panels/common/DOMLinkifier.ts +6 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -3
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +27 -18
- package/front_end/panels/elements/ElementsPanel.ts +12 -4
- package/front_end/panels/elements/PropertiesWidget.ts +91 -52
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -12
- package/front_end/panels/elements/StylesSidebarPane.ts +51 -8
- package/front_end/panels/elements/elementsPanel.css +6 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +4 -0
- package/front_end/panels/network/NetworkItemView.ts +6 -45
- package/front_end/panels/network/RequestHeadersView.ts +237 -318
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/legacy/Toolbar.ts +37 -5
- package/front_end/ui/legacy/UIUtils.ts +35 -5
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +32 -28
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +31 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://chromium.googlesource.com/chromium/src
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: c3aaee8e909f41cc5fa17a5d5cd3d5c7074895d0
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -40,6 +40,10 @@ const UIStrings = {
|
|
|
40
40
|
* @description Placeholder for filter bars that shows before the user types in a filter keyword.
|
|
41
41
|
*/
|
|
42
42
|
filter: 'Filter',
|
|
43
|
+
/**
|
|
44
|
+
* @description Tooltip shown when the user hovers over the regex icon to toggle regular-expression filtering.
|
|
45
|
+
*/
|
|
46
|
+
useRegularExpression: 'Use regular expression',
|
|
43
47
|
} as const;
|
|
44
48
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/Toolbar.ts', UIStrings);
|
|
45
49
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -693,7 +697,6 @@ export namespace ToolbarButton {
|
|
|
693
697
|
export class ToolbarInput extends ToolbarItem<ToolbarInput.EventTypes> {
|
|
694
698
|
private prompt: TextPrompt;
|
|
695
699
|
private readonly proxyElement: Element;
|
|
696
|
-
|
|
697
700
|
constructor(
|
|
698
701
|
placeholder: string, accessiblePlaceholder?: string, growFactor?: number, shrinkFactor?: number, tooltip?: string,
|
|
699
702
|
completions?: ((arg0: string, arg1: string, arg2?: boolean|undefined) => Promise<Suggestion[]>),
|
|
@@ -759,6 +762,10 @@ export class ToolbarInput extends ToolbarItem<ToolbarInput.EventTypes> {
|
|
|
759
762
|
this.updateEmptyStyles();
|
|
760
763
|
}
|
|
761
764
|
|
|
765
|
+
protected insertTrailingElement(element: Element): void {
|
|
766
|
+
this.element.appendChild(element);
|
|
767
|
+
}
|
|
768
|
+
|
|
762
769
|
override applyEnabledState(enabled: boolean): void {
|
|
763
770
|
if (enabled) {
|
|
764
771
|
this.element.classList.remove('disabled');
|
|
@@ -818,7 +825,8 @@ export class ToolbarFilter extends ToolbarInput {
|
|
|
818
825
|
constructor(
|
|
819
826
|
filterBy?: Common.UIString.LocalizedString, growFactor?: number, shrinkFactor?: number, tooltip?: string,
|
|
820
827
|
completions?: ((arg0: string, arg1: string, arg2?: boolean|undefined) => Promise<Suggestion[]>),
|
|
821
|
-
dynamicCompletions?: boolean, jslogContext?: string, element?: HTMLElement
|
|
828
|
+
dynamicCompletions?: boolean, jslogContext?: string, element?: HTMLElement, showRegexToggle?: boolean,
|
|
829
|
+
onRegexToggle?: () => void) {
|
|
822
830
|
const filterPlaceholder = filterBy ? filterBy : i18nString(UIStrings.filter);
|
|
823
831
|
super(
|
|
824
832
|
filterPlaceholder, filterPlaceholder, growFactor, shrinkFactor, tooltip, completions, dynamicCompletions,
|
|
@@ -827,17 +835,36 @@ export class ToolbarFilter extends ToolbarInput {
|
|
|
827
835
|
const filterIcon = createIcon('filter');
|
|
828
836
|
this.element.prepend(filterIcon);
|
|
829
837
|
this.element.classList.add('toolbar-filter');
|
|
838
|
+
|
|
839
|
+
if (showRegexToggle) {
|
|
840
|
+
const regexIconName = 'regular-expression';
|
|
841
|
+
const regexButton = new Buttons.Button.Button();
|
|
842
|
+
regexButton.data = {
|
|
843
|
+
variant: Buttons.Button.Variant.ICON_TOGGLE,
|
|
844
|
+
size: Buttons.Button.Size.SMALL,
|
|
845
|
+
iconName: regexIconName,
|
|
846
|
+
toggledIconName: regexIconName,
|
|
847
|
+
toggleType: Buttons.Button.ToggleType.PRIMARY,
|
|
848
|
+
toggled: false,
|
|
849
|
+
title: i18nString(UIStrings.useRegularExpression),
|
|
850
|
+
jslogContext: regexIconName,
|
|
851
|
+
};
|
|
852
|
+
ARIAUtils.setLabel(regexButton, i18nString(UIStrings.useRegularExpression));
|
|
853
|
+
regexButton.addEventListener('click', () => {
|
|
854
|
+
onRegexToggle?.();
|
|
855
|
+
});
|
|
856
|
+
this.insertTrailingElement(regexButton);
|
|
857
|
+
}
|
|
830
858
|
}
|
|
831
859
|
}
|
|
832
860
|
|
|
833
861
|
export class ToolbarInputElement extends HTMLElement {
|
|
834
|
-
static observedAttributes = ['value', 'disabled'];
|
|
862
|
+
static observedAttributes = ['value', 'disabled', 'regex'];
|
|
835
863
|
|
|
836
864
|
item?: ToolbarInput;
|
|
837
865
|
datalist: HTMLDataListElement|null = null;
|
|
838
866
|
#value: string|undefined = undefined;
|
|
839
867
|
#disabled = false;
|
|
840
|
-
|
|
841
868
|
connectedCallback(): void {
|
|
842
869
|
if (this.item) {
|
|
843
870
|
return;
|
|
@@ -855,7 +882,8 @@ export class ToolbarInputElement extends HTMLElement {
|
|
|
855
882
|
this.item = new ToolbarFilter(
|
|
856
883
|
placeholder as Platform.UIString.LocalizedString, /* growFactor=*/ undefined,
|
|
857
884
|
/* shrinkFactor=*/ undefined, tooltip, this.datalist ? this.#onAutocomplete.bind(this) : undefined,
|
|
858
|
-
/* dynamicCompletions=*/ undefined, jslogContext || 'filter', this)
|
|
885
|
+
/* dynamicCompletions=*/ undefined, jslogContext || 'filter', this, this.hasAttribute('regex'),
|
|
886
|
+
this.#onRegexToggle.bind(this));
|
|
859
887
|
} else {
|
|
860
888
|
this.item = new ToolbarInput(
|
|
861
889
|
placeholder, accessiblePlaceholder, /* growFactor=*/ undefined,
|
|
@@ -880,6 +908,10 @@ export class ToolbarInputElement extends HTMLElement {
|
|
|
880
908
|
this.item?.focus();
|
|
881
909
|
}
|
|
882
910
|
|
|
911
|
+
#onRegexToggle(): void {
|
|
912
|
+
this.dispatchEvent(new CustomEvent('regextoggle'));
|
|
913
|
+
}
|
|
914
|
+
|
|
883
915
|
async #onAutocomplete(expression: string, prefix: string, force?: boolean): Promise<Suggestion[]> {
|
|
884
916
|
if (!prefix && !force && expression || !this.datalist) {
|
|
885
917
|
return [];
|
|
@@ -2034,8 +2034,8 @@ export class InterceptBindingDirective extends Lit.Directive.Directive {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
|
|
2036
2036
|
/* eslint-disable-next-line @typescript-eslint/no-unsafe-function-type */
|
|
2037
|
-
render(
|
|
2038
|
-
return
|
|
2037
|
+
render(listener: Function): Function {
|
|
2038
|
+
return listener;
|
|
2039
2039
|
}
|
|
2040
2040
|
|
|
2041
2041
|
static setEventListeners(templateElement: Element, renderedElement: Element): void {
|
|
@@ -2092,7 +2092,17 @@ export class HTMLElementWithLightDOMTemplate extends HTMLElement {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
|
|
2094
2094
|
private static patchLitTemplate(template: Lit.LitTemplate): void {
|
|
2095
|
-
const
|
|
2095
|
+
const interceptingWrapper = Lit.Directive.directive(InterceptBindingDirective);
|
|
2096
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2097
|
+
const patchingWrapper = <Args extends any[], R>(fn: (...args: Args) => R): ((...args: Args) => R) => {
|
|
2098
|
+
return function(this: unknown, ...args: Args): R {
|
|
2099
|
+
const result = fn.apply(this, args);
|
|
2100
|
+
if (isLitTemplate(result)) {
|
|
2101
|
+
HTMLElementWithLightDOMTemplate.patchLitTemplate(result);
|
|
2102
|
+
}
|
|
2103
|
+
return result;
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2096
2106
|
if (template === Lit.nothing) {
|
|
2097
2107
|
return;
|
|
2098
2108
|
}
|
|
@@ -2104,10 +2114,19 @@ export class HTMLElementWithLightDOMTemplate extends HTMLElement {
|
|
|
2104
2114
|
value['_$litType$'] === 1);
|
|
2105
2115
|
}
|
|
2106
2116
|
|
|
2117
|
+
function isLitDirective(value: unknown): value is {values: unknown[]} {
|
|
2118
|
+
return Boolean(typeof value === 'object' && value && '_$litDirective$' in value && 'values' in value);
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2122
|
+
function isCallable(value: unknown): value is(...args: any[]) => any {
|
|
2123
|
+
return typeof value === 'function';
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2107
2126
|
function patchValue(value: unknown): unknown {
|
|
2108
|
-
if (
|
|
2127
|
+
if (isCallable(value)) {
|
|
2109
2128
|
try {
|
|
2110
|
-
return
|
|
2129
|
+
return interceptingWrapper(value);
|
|
2111
2130
|
} catch {
|
|
2112
2131
|
return value;
|
|
2113
2132
|
}
|
|
@@ -2116,6 +2135,17 @@ export class HTMLElementWithLightDOMTemplate extends HTMLElement {
|
|
|
2116
2135
|
HTMLElementWithLightDOMTemplate.patchLitTemplate(value);
|
|
2117
2136
|
return value;
|
|
2118
2137
|
}
|
|
2138
|
+
if (isLitDirective(value)) {
|
|
2139
|
+
for (let i = 0; i < value.values.length; i++) {
|
|
2140
|
+
const subvalue = value.values[i];
|
|
2141
|
+
if (isCallable(subvalue)) {
|
|
2142
|
+
value.values[i] = patchingWrapper(subvalue);
|
|
2143
|
+
} else {
|
|
2144
|
+
value.values[i] = patchValue(subvalue);
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
return value;
|
|
2148
|
+
}
|
|
2119
2149
|
if (Array.isArray(value) || value instanceof Iterator) {
|
|
2120
2150
|
return value.map(patchValue);
|
|
2121
2151
|
}
|
|
@@ -53,45 +53,45 @@ export class ClickEvent extends Event {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export class ColorSwatch extends HTMLElement {
|
|
56
|
-
readonly
|
|
57
|
-
|
|
56
|
+
private readonly shadow = this.attachShadow({mode: 'open'});
|
|
57
|
+
private tooltip: string = i18nString(UIStrings.shiftclickToChangeColorFormat);
|
|
58
58
|
#color: Common.Color.Color|null = null;
|
|
59
|
-
|
|
59
|
+
private readonly = false;
|
|
60
60
|
|
|
61
61
|
constructor(tooltip?: string) {
|
|
62
62
|
super();
|
|
63
63
|
if (tooltip) {
|
|
64
|
-
this
|
|
64
|
+
this.tooltip = tooltip;
|
|
65
65
|
}
|
|
66
66
|
this.tabIndex = -1;
|
|
67
|
-
this.addEventListener('keydown', e => this
|
|
67
|
+
this.addEventListener('keydown', e => this.onActivate(e));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
static isColorSwatch(element: Element): element is ColorSwatch {
|
|
71
71
|
return element.localName === 'devtools-color-swatch';
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
set readonly(readonly: boolean) {
|
|
79
|
-
if (this.#readonly === readonly) {
|
|
74
|
+
setReadonly(readonly: boolean): void {
|
|
75
|
+
if (this.readonly === readonly) {
|
|
80
76
|
return;
|
|
81
77
|
}
|
|
82
78
|
|
|
83
|
-
this
|
|
79
|
+
this.readonly = readonly;
|
|
84
80
|
if (this.#color) {
|
|
85
|
-
this.
|
|
81
|
+
this.renderColor(this.#color);
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
|
|
85
|
+
set color(color: Common.Color.Color) {
|
|
86
|
+
this.renderColor(color);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
89
|
get color(): Common.Color.Color|null {
|
|
90
90
|
return this.#color;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
get anchorBox(): AnchorBox|null {
|
|
94
|
-
const swatch = this
|
|
94
|
+
const swatch = this.shadow.querySelector('.color-swatch');
|
|
95
95
|
return swatch ? swatch.boxInWindow() : null;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -103,12 +103,12 @@ export class ColorSwatch extends HTMLElement {
|
|
|
103
103
|
* Render this swatch given a color object or text to be parsed as a color.
|
|
104
104
|
* @param color The color object or string to use for this swatch.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
renderColor(color: Common.Color.Color): void {
|
|
107
107
|
this.#color = color;
|
|
108
108
|
|
|
109
109
|
const colorSwatchClasses = Lit.Directives.classMap({
|
|
110
110
|
'color-swatch': true,
|
|
111
|
-
readonly: this
|
|
111
|
+
readonly: this.readonly,
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
@@ -120,20 +120,19 @@ export class ColorSwatch extends HTMLElement {
|
|
|
120
120
|
Lit.render(
|
|
121
121
|
html`<style>${colorSwatchStyles}</style><span
|
|
122
122
|
class=${colorSwatchClasses}
|
|
123
|
-
title=${this
|
|
123
|
+
title=${this.tooltip}><span
|
|
124
124
|
class="color-swatch-inner"
|
|
125
125
|
style="background-color: ${color.asString()};"
|
|
126
126
|
jslog=${VisualLogging.showStyleEditor('color').track({click: true})}
|
|
127
|
-
@click=${this
|
|
128
|
-
@mousedown=${this
|
|
129
|
-
@dblclick=${this
|
|
130
|
-
this
|
|
127
|
+
@click=${this.onActivate}
|
|
128
|
+
@mousedown=${this.consume}
|
|
129
|
+
@dblclick=${this.consume}></span></span>`,
|
|
130
|
+
this.shadow, {host: this});
|
|
131
131
|
// clang-format on
|
|
132
|
-
this.dispatchEvent(new ColorChangedEvent(color));
|
|
133
132
|
}
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
if (this
|
|
134
|
+
private onActivate(e: KeyboardEvent|MouseEvent): void {
|
|
135
|
+
if (this.readonly) {
|
|
137
136
|
return;
|
|
138
137
|
}
|
|
139
138
|
|
|
@@ -144,19 +143,24 @@ export class ColorSwatch extends HTMLElement {
|
|
|
144
143
|
|
|
145
144
|
if (e.shiftKey) {
|
|
146
145
|
e.stopPropagation();
|
|
147
|
-
this
|
|
146
|
+
this.showFormatPicker(e);
|
|
148
147
|
return;
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
this.dispatchEvent(new ClickEvent());
|
|
152
|
-
this
|
|
151
|
+
this.consume(e);
|
|
153
152
|
}
|
|
154
153
|
|
|
155
|
-
|
|
154
|
+
private consume(e: Event): void {
|
|
156
155
|
e.stopPropagation();
|
|
157
156
|
}
|
|
158
157
|
|
|
159
|
-
|
|
158
|
+
setColor(color: Common.Color.Color): void {
|
|
159
|
+
this.renderColor(color);
|
|
160
|
+
this.dispatchEvent(new ColorChangedEvent(color));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
private showFormatPicker(e: Event): void {
|
|
160
164
|
if (!this.#color) {
|
|
161
165
|
return;
|
|
162
166
|
}
|
|
@@ -150,12 +150,14 @@ interface NodeChildren {
|
|
|
150
150
|
|
|
151
151
|
abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrapper<ObjectTreeNodeBase.EventTypes> {
|
|
152
152
|
#children?: NodeChildren;
|
|
153
|
+
protected filter: {includeNullOrUndefinedValues: boolean, regex: RegExp|null}|null = null;
|
|
153
154
|
protected extraProperties: ObjectTreeNode[] = [];
|
|
154
155
|
expanded = false;
|
|
155
156
|
constructor(
|
|
156
157
|
readonly parent?: ObjectTreeNodeBase,
|
|
157
158
|
readonly propertiesMode: ObjectPropertiesMode = ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED) {
|
|
158
159
|
super();
|
|
160
|
+
this.filter = parent?.filter ?? null;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
// Performs a pre-order tree traversal over the populated children. If any children need to be populated, callers must
|
|
@@ -189,6 +191,15 @@ abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrapper<Obj
|
|
|
189
191
|
}
|
|
190
192
|
}
|
|
191
193
|
|
|
194
|
+
setFilter(filter: {includeNullOrUndefinedValues: boolean, regex: RegExp|null}|null): void {
|
|
195
|
+
this.filter = filter;
|
|
196
|
+
this.dispatchEventToListeners(ObjectTreeNodeBase.Events.FILTER_CHANGED);
|
|
197
|
+
this.#walk().forEach(c => {
|
|
198
|
+
c.filter = filter;
|
|
199
|
+
c.dispatchEventToListeners(ObjectTreeNodeBase.Events.FILTER_CHANGED);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
192
203
|
abstract get object(): SDK.RemoteObject.RemoteObject|undefined;
|
|
193
204
|
|
|
194
205
|
removeChildren(): void {
|
|
@@ -222,9 +233,13 @@ abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrapper<Obj
|
|
|
222
233
|
}
|
|
223
234
|
|
|
224
235
|
async populateChildrenIfNeeded(): Promise<NodeChildren> {
|
|
225
|
-
if (this.#children) {
|
|
226
|
-
|
|
236
|
+
if (!this.#children) {
|
|
237
|
+
this.#children = await this.populateChildrenIfNeededImpl();
|
|
227
238
|
}
|
|
239
|
+
return this.#children;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
protected async populateChildrenIfNeededImpl(): Promise<NodeChildren> {
|
|
228
243
|
const object = this.object;
|
|
229
244
|
if (!object) {
|
|
230
245
|
return {};
|
|
@@ -315,10 +330,12 @@ namespace ObjectTreeNodeBase {
|
|
|
315
330
|
export const enum Events {
|
|
316
331
|
VALUE_CHANGED = 'value-changed',
|
|
317
332
|
CHILDREN_CHANGED = 'children-changed',
|
|
333
|
+
FILTER_CHANGED = 'filter-changed',
|
|
318
334
|
}
|
|
319
335
|
export interface EventTypes {
|
|
320
336
|
[Events.VALUE_CHANGED]: void;
|
|
321
337
|
[Events.CHILDREN_CHANGED]: void;
|
|
338
|
+
[Events.FILTER_CHANGED]: void;
|
|
322
339
|
}
|
|
323
340
|
}
|
|
324
341
|
|
|
@@ -348,10 +365,7 @@ class ArrayGroupTreeNode extends ObjectTreeNodeBase {
|
|
|
348
365
|
this.#range = range;
|
|
349
366
|
}
|
|
350
367
|
|
|
351
|
-
override async
|
|
352
|
-
if (this.children) {
|
|
353
|
-
return this.children;
|
|
354
|
-
}
|
|
368
|
+
override async populateChildrenIfNeededImpl(): Promise<NodeChildren> {
|
|
355
369
|
if (this.#range.count > ArrayGroupingTreeElement.bucketThreshold) {
|
|
356
370
|
const ranges = await arrayRangeGroups(this.object, this.#range.fromIndex, this.#range.toIndex);
|
|
357
371
|
const arrayRanges = ranges?.ranges.map(
|
|
@@ -405,6 +419,10 @@ export class ObjectTreeNode extends ObjectTreeNodeBase {
|
|
|
405
419
|
return this.property.value;
|
|
406
420
|
}
|
|
407
421
|
|
|
422
|
+
get isFiltered(): boolean {
|
|
423
|
+
return Boolean(this.filter && !this.property.match(this.filter));
|
|
424
|
+
}
|
|
425
|
+
|
|
408
426
|
get name(): string {
|
|
409
427
|
return this.property.name;
|
|
410
428
|
}
|
|
@@ -1274,8 +1292,10 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1274
1292
|
|
|
1275
1293
|
this.#widget = new ObjectPropertyWidget();
|
|
1276
1294
|
this.property = property;
|
|
1295
|
+
this.hidden = property.isFiltered;
|
|
1277
1296
|
this.property.addEventListener(ObjectTreeNodeBase.Events.VALUE_CHANGED, this.#updateValue, this);
|
|
1278
1297
|
this.property.addEventListener(ObjectTreeNodeBase.Events.CHILDREN_CHANGED, this.#updateChildren, this);
|
|
1298
|
+
this.property.addEventListener(ObjectTreeNodeBase.Events.FILTER_CHANGED, this.#updateFilter, this);
|
|
1279
1299
|
this.toggleOnClick = true;
|
|
1280
1300
|
this.linkifier = linkifier;
|
|
1281
1301
|
this.maxNumPropertiesToShow = InitialVisibleChildrenLimit;
|
|
@@ -1355,6 +1375,7 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1355
1375
|
revertHighlightChanges(): void {
|
|
1356
1376
|
this.#widget.revertHighlightChanges();
|
|
1357
1377
|
}
|
|
1378
|
+
|
|
1358
1379
|
setSearchRegex(regex: RegExp, additionalCssClassName?: string): boolean {
|
|
1359
1380
|
return this.#widget.setSearchRegex(regex, additionalCssClassName);
|
|
1360
1381
|
}
|
|
@@ -1457,6 +1478,10 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1457
1478
|
void this.onpopulate();
|
|
1458
1479
|
}
|
|
1459
1480
|
|
|
1481
|
+
#updateFilter(): void {
|
|
1482
|
+
this.hidden = this.property.isFiltered;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1460
1485
|
getContextMenu(event: Event): UI.ContextMenu.ContextMenu {
|
|
1461
1486
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
1462
1487
|
contextMenu.appendApplicableItems(this);
|
|
@@ -765,6 +765,7 @@ export const knownContextValues = new Set([
|
|
|
765
765
|
'clear-palette',
|
|
766
766
|
'clear-replace-input',
|
|
767
767
|
'clear-search-input',
|
|
768
|
+
'clear-speculative-loads',
|
|
768
769
|
'clear-storage',
|
|
769
770
|
'clear-storage-cache-storage',
|
|
770
771
|
'clear-storage-cookies',
|
|
@@ -825,6 +826,8 @@ export const knownContextValues = new Set([
|
|
|
825
826
|
'column-rule-edge-start-inset',
|
|
826
827
|
'column-rule-edge-start-outset',
|
|
827
828
|
'column-rule-inset',
|
|
829
|
+
'column-rule-inset-end',
|
|
830
|
+
'column-rule-inset-start',
|
|
828
831
|
'column-rule-interior-end-inset',
|
|
829
832
|
'column-rule-interior-end-outset',
|
|
830
833
|
'column-rule-interior-inset',
|
|
@@ -3250,6 +3253,8 @@ export const knownContextValues = new Set([
|
|
|
3250
3253
|
'row-rule-edge-start-inset',
|
|
3251
3254
|
'row-rule-edge-start-outset',
|
|
3252
3255
|
'row-rule-inset',
|
|
3256
|
+
'row-rule-inset-end',
|
|
3257
|
+
'row-rule-inset-start',
|
|
3253
3258
|
'row-rule-interior-end-inset',
|
|
3254
3259
|
'row-rule-interior-end-outset',
|
|
3255
3260
|
'row-rule-interior-inset',
|
|
@@ -3272,6 +3277,8 @@ export const knownContextValues = new Set([
|
|
|
3272
3277
|
'rule-color',
|
|
3273
3278
|
'rule-edge-inset',
|
|
3274
3279
|
'rule-inset',
|
|
3280
|
+
'rule-inset-end',
|
|
3281
|
+
'rule-inset-start',
|
|
3275
3282
|
'rule-interior-inset',
|
|
3276
3283
|
'rule-outset',
|
|
3277
3284
|
'rule-overlap',
|
package/package.json
CHANGED