chrome-devtools-frontend 1.0.1587905 → 1.0.1589336
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/docs/ui_engineering.md +2 -2
- package/front_end/core/common/AppProvider.ts +1 -2
- package/front_end/core/common/Color.ts +19 -20
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/Progress.ts +5 -5
- package/front_end/core/common/Settings.ts +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -11
- package/front_end/core/host/UserMetrics.ts +1 -1
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +38 -0
- package/front_end/core/sdk/CSSRule.ts +4 -9
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/CookieModel.ts +0 -1
- package/front_end/core/sdk/DOMModel.ts +42 -6
- package/front_end/core/sdk/EmulationModel.ts +3 -3
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +11 -6
- package/front_end/core/sdk/PerformanceMetricsModel.ts +2 -2
- package/front_end/core/sdk/PreloadingModel.ts +15 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -6
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/SourceMapManager.ts +1 -2
- package/front_end/entrypoint_template.html +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +6 -16
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -2
- package/front_end/entrypoints/main/main-meta.ts +0 -3
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- 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 +50 -0
- package/front_end/models/ai_assistance/AiConversation.ts +20 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +7 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +28 -26
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -5
- package/front_end/models/computed_style/ComputedStyleModel.ts +2 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -3
- package/front_end/models/emulation/EmulatedDevices.ts +0 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/har/Log.ts +2 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -21
- package/front_end/models/logs/NetworkLog.ts +0 -2
- package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -1
- package/front_end/models/text_utils/TextUtils.ts +0 -9
- package/front_end/models/trace/LanternComputationData.ts +1 -6
- package/front_end/models/trace/helpers/Trace.ts +1 -4
- package/front_end/models/trace/lantern/types/Lantern.ts +6 -6
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -6
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +15 -26
- package/front_end/panels/application/BackgroundServiceView.ts +0 -2
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +0 -1
- package/front_end/panels/application/IndexedDBViews.ts +19 -23
- package/front_end/panels/application/OriginTrialTreeView.ts +3 -3
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- 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 +3 -4
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +76 -19
- package/front_end/panels/common/aiCodeGenerationTeaser.css +11 -0
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +4 -0
- 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 +32 -32
- package/front_end/panels/elements/ElementsPanel.ts +12 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -1
- package/front_end/panels/elements/ImagePreviewPopover.ts +0 -2
- package/front_end/panels/elements/MarkerDecorator.ts +0 -2
- package/front_end/panels/elements/PropertiesWidget.ts +62 -61
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -20
- package/front_end/panels/elements/StylesSidebarPane.ts +25 -90
- package/front_end/panels/elements/elementsPanel.css +6 -2
- package/front_end/panels/emulation/emulation-meta.ts +0 -2
- package/front_end/panels/event_listeners/EventListenersUtils.ts +0 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +0 -5
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -3
- package/front_end/panels/media/EventDisplayTable.ts +0 -2
- package/front_end/panels/media/PlayerMessagesView.ts +4 -6
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +18 -6
- package/front_end/panels/network/EventSourceMessagesView.ts +0 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +0 -2
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +3 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +113 -128
- package/front_end/panels/network/RequestInitiatorView.ts +74 -69
- package/front_end/panels/network/RequestPayloadView.ts +6 -3
- package/front_end/panels/network/ResourceChunkView.ts +0 -2
- package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -1
- package/front_end/panels/network/network-meta.ts +0 -2
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -9
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -2
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -12
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +14 -1
- package/front_end/panels/profiler/ProfileView.ts +0 -35
- package/front_end/panels/profiler/profiler-meta.ts +0 -1
- package/front_end/panels/recorder/components/StepView.ts +0 -1
- package/front_end/panels/screencast/ScreencastView.ts +2 -2
- package/front_end/panels/search/SearchResultsPane.ts +3 -2
- package/front_end/panels/security/SecurityPanel.ts +0 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +27 -9
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -2
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +2 -2
- package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +0 -3
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +6 -0
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -5
- package/front_end/panels/sources/sources-meta.ts +0 -9
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -2
- package/front_end/panels/timeline/TimelinePanel.ts +0 -7
- package/front_end/panels/timeline/TimelineTreeView.ts +8 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +11 -3
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -1
- package/front_end/panels/timeline/utils/Treemap.ts +0 -4
- package/front_end/panels/whats_new/whats_new-meta.ts +0 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +1 -2
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -12
- package/front_end/ui/components/icon_button/IconButton.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +4 -0
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +11 -6
- package/front_end/ui/legacy/ContextMenu.ts +1 -17
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/Fragment.ts +2 -4
- package/front_end/ui/legacy/SoftContextMenu.ts +1 -15
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +16 -9
- package/front_end/ui/legacy/UIUtils.ts +1 -4
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -3
- 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/legacy/components/quick_open/CommandMenu.ts +0 -2
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +0 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -2
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -224,13 +224,7 @@ export class SoftContextMenu {
|
|
|
224
224
|
if (item.tooltip) {
|
|
225
225
|
Tooltip.install(menuItemElement, item.tooltip);
|
|
226
226
|
}
|
|
227
|
-
const detailsForElement: ElementMenuDetails = {
|
|
228
|
-
actionId: undefined,
|
|
229
|
-
isSeparator: undefined,
|
|
230
|
-
customElement: undefined,
|
|
231
|
-
subItems: undefined,
|
|
232
|
-
subMenuTimer: undefined,
|
|
233
|
-
};
|
|
227
|
+
const detailsForElement: ElementMenuDetails = {};
|
|
234
228
|
|
|
235
229
|
// Only add a jslog context if the item has a label. Menu items without a
|
|
236
230
|
// label are containers for custom elements, which are responsible for adding
|
|
@@ -309,10 +303,6 @@ export class SoftContextMenu {
|
|
|
309
303
|
ARIAUtils.markAsMenuItemSubMenu(menuItemElement);
|
|
310
304
|
this.detailsForElementMap.set(menuItemElement, {
|
|
311
305
|
subItems: item.subItems,
|
|
312
|
-
actionId: undefined,
|
|
313
|
-
isSeparator: undefined,
|
|
314
|
-
customElement: undefined,
|
|
315
|
-
subMenuTimer: undefined,
|
|
316
306
|
});
|
|
317
307
|
|
|
318
308
|
// If the menu contains a checkbox, add checkbox space in front of the label to align the items
|
|
@@ -344,11 +334,7 @@ export class SoftContextMenu {
|
|
|
344
334
|
const separatorElement = document.createElement('div');
|
|
345
335
|
separatorElement.classList.add('soft-context-menu-separator');
|
|
346
336
|
this.detailsForElementMap.set(separatorElement, {
|
|
347
|
-
subItems: undefined,
|
|
348
|
-
actionId: undefined,
|
|
349
337
|
isSeparator: true,
|
|
350
|
-
customElement: undefined,
|
|
351
|
-
subMenuTimer: undefined,
|
|
352
338
|
});
|
|
353
339
|
separatorElement.createChild('div', 'separator-line');
|
|
354
340
|
return separatorElement;
|
|
@@ -303,7 +303,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
303
303
|
this.hideTabElement(tab);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
const eventData: EventData = {
|
|
306
|
+
const eventData: EventData = {tabId: id, view: tab.view, isUserGesture: userGesture};
|
|
307
307
|
this.dispatchEventToListeners(Events.TabClosed, eventData);
|
|
308
308
|
return true;
|
|
309
309
|
}
|
|
@@ -1026,7 +1026,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
1026
1026
|
}
|
|
1027
1027
|
this.#tabs.splice(index, 0, tab);
|
|
1028
1028
|
|
|
1029
|
-
const eventData: EventData = {
|
|
1029
|
+
const eventData: EventData = {tabId: tab.id, view: tab.view};
|
|
1030
1030
|
this.dispatchEventToListeners(Events.TabOrderChanged, eventData);
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
@@ -1648,11 +1648,18 @@ function removeNode(node: TreeElement): void {
|
|
|
1648
1648
|
* <ul role="group">
|
|
1649
1649
|
* Node with subtree
|
|
1650
1650
|
* <li role="treeitem" jslog-context="context">
|
|
1651
|
-
* <ul role="group"
|
|
1651
|
+
* <ul role="group">
|
|
1652
1652
|
* <li role="treeitem">Tree Node Text in collapsed subtree</li>
|
|
1653
1653
|
* <li role="treeitem">Tree Node Text in collapsed subtree</li>
|
|
1654
1654
|
* </ul>
|
|
1655
1655
|
* </li>
|
|
1656
|
+
* <li role="treeitem" open>
|
|
1657
|
+
* Tree Node Text in expanded subtree
|
|
1658
|
+
* <ul role="group">
|
|
1659
|
+
* <li role="treeitem">Tree Node Text in expanded subtree</li>
|
|
1660
|
+
* <li role="treeitem">Tree Node Text in expanded subtree</li>
|
|
1661
|
+
* </ul>
|
|
1662
|
+
* </li>
|
|
1656
1663
|
* <li selected role="treeitem">Tree Node Text in a selected-by-default node</li>
|
|
1657
1664
|
* </ul>
|
|
1658
1665
|
* </li>
|
|
@@ -1662,8 +1669,8 @@ function removeNode(node: TreeElement): void {
|
|
|
1662
1669
|
*
|
|
1663
1670
|
* ```
|
|
1664
1671
|
* where a <li role="treeitem"> element defines a tree node and its contents (the <li> is the `config element` for this
|
|
1665
|
-
* tree node). If a tree node contains a <ul role="group">, that defines a subtree under that tree node. The `
|
|
1666
|
-
* attribute on the <
|
|
1672
|
+
* tree node). If a tree node contains a <ul role="group">, that defines a subtree under that tree node. The `open`
|
|
1673
|
+
* attribute on the <li> defines whether that subtree should render as expanded. Note that node expanding/collapsing do
|
|
1667
1674
|
* not reflect this state back to the attribute on the config element, those state changes are rather sent out as
|
|
1668
1675
|
* `expand` events on the config element.
|
|
1669
1676
|
*
|
|
@@ -1674,7 +1681,7 @@ function removeNode(node: TreeElement): void {
|
|
|
1674
1681
|
* - `selected`: Whether the tree node should be rendered as selected.
|
|
1675
1682
|
* - `jslog-context`: The jslog context for the tree element.
|
|
1676
1683
|
* - `aria-*`: All aria attributes defined on the config element are cloned over.
|
|
1677
|
-
* - `
|
|
1684
|
+
* - `open`: On the <li>, declares whether the subtree should be rendererd as expanded or collapsed.
|
|
1678
1685
|
*
|
|
1679
1686
|
* ## Event Handling ##
|
|
1680
1687
|
*
|
|
@@ -1735,7 +1742,7 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1735
1742
|
if (subtreeRoot.role !== 'group' || !subtreeRoot.parentElement) {
|
|
1736
1743
|
return null;
|
|
1737
1744
|
}
|
|
1738
|
-
const expanded =
|
|
1745
|
+
const expanded = hasBooleanAttribute(subtreeRoot.parentElement, 'open');
|
|
1739
1746
|
const treeElement = TreeViewTreeElement.get(subtreeRoot.parentElement);
|
|
1740
1747
|
return treeElement ? {expanded, treeElement} : null;
|
|
1741
1748
|
}
|
|
@@ -1756,11 +1763,11 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1756
1763
|
if (node === treeNode && attributeName === 'selected' && hasBooleanAttribute(treeNode, 'selected')) {
|
|
1757
1764
|
treeElement.revealAndSelect(true);
|
|
1758
1765
|
}
|
|
1759
|
-
if (
|
|
1760
|
-
if (hasBooleanAttribute(
|
|
1761
|
-
treeElement.collapse();
|
|
1762
|
-
} else {
|
|
1766
|
+
if (node === treeNode && attributeName === 'open') {
|
|
1767
|
+
if (hasBooleanAttribute(treeNode, 'open')) {
|
|
1763
1768
|
treeElement.expand();
|
|
1769
|
+
} else {
|
|
1770
|
+
treeElement.collapse();
|
|
1764
1771
|
}
|
|
1765
1772
|
}
|
|
1766
1773
|
}
|
|
@@ -1808,10 +1808,7 @@ function focusChanged(event: Event): void {
|
|
|
1808
1808
|
export function createShadowRootWithCoreStyles(element: Element, options: {
|
|
1809
1809
|
cssFile?: CSSInJS[]|CSSInJS,
|
|
1810
1810
|
delegatesFocus?: boolean,
|
|
1811
|
-
} = {
|
|
1812
|
-
delegatesFocus: undefined,
|
|
1813
|
-
cssFile: undefined,
|
|
1814
|
-
}): ShadowRoot {
|
|
1811
|
+
} = {}): ShadowRoot {
|
|
1815
1812
|
const {cssFile, delegatesFocus} = options;
|
|
1816
1813
|
|
|
1817
1814
|
const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});
|
|
@@ -876,8 +876,12 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
|
876
876
|
|
|
877
877
|
private loadPalettes(): void {
|
|
878
878
|
this.palettes.set(MaterialPalette.title, MaterialPalette);
|
|
879
|
-
const defaultCustomPalette:
|
|
880
|
-
|
|
879
|
+
const defaultCustomPalette: Palette = {
|
|
880
|
+
title: 'Custom',
|
|
881
|
+
colors: [],
|
|
882
|
+
colorNames: [],
|
|
883
|
+
mutable: true,
|
|
884
|
+
};
|
|
881
885
|
this.customPaletteSetting =
|
|
882
886
|
Common.Settings.Settings.instance().createSetting('custom-color-palette', defaultCustomPalette);
|
|
883
887
|
const customPalette = this.customPaletteSetting.get();
|
|
@@ -1538,7 +1542,6 @@ export class PaletteGenerator {
|
|
|
1538
1542
|
colors: [...paletteColors.keys()].sort(hueComparator),
|
|
1539
1543
|
colorNames: [],
|
|
1540
1544
|
mutable: false,
|
|
1541
|
-
matchUserFormat: undefined,
|
|
1542
1545
|
});
|
|
1543
1546
|
}
|
|
1544
1547
|
|
|
@@ -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);
|
|
@@ -156,7 +156,6 @@ export class CommandMenu {
|
|
|
156
156
|
jslogContext: action.id(),
|
|
157
157
|
executeHandler: action.execute.bind(action),
|
|
158
158
|
userActionCode,
|
|
159
|
-
availableHandler: undefined,
|
|
160
159
|
isPanelOrDrawer: panelOrDrawer,
|
|
161
160
|
});
|
|
162
161
|
}
|
|
@@ -191,7 +190,6 @@ export class CommandMenu {
|
|
|
191
190
|
jslogContext: id,
|
|
192
191
|
executeHandler,
|
|
193
192
|
userActionCode,
|
|
194
|
-
availableHandler: undefined,
|
|
195
193
|
isPanelOrDrawer: panelOrDrawer,
|
|
196
194
|
featurePromotionId,
|
|
197
195
|
});
|
|
@@ -111,11 +111,9 @@ UI.ActionRegistration.registerActionExtension({
|
|
|
111
111
|
UI.ContextMenu.registerItem({
|
|
112
112
|
location: UI.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,
|
|
113
113
|
actionId: 'quick-open.show-command-menu',
|
|
114
|
-
order: undefined,
|
|
115
114
|
});
|
|
116
115
|
|
|
117
116
|
UI.ContextMenu.registerItem({
|
|
118
117
|
location: UI.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,
|
|
119
118
|
actionId: 'quick-open.show',
|
|
120
|
-
order: undefined,
|
|
121
119
|
});
|
|
@@ -144,12 +144,13 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
144
144
|
return html`
|
|
145
145
|
<li role="treeitem"
|
|
146
146
|
?selected=${input.jumpToNextSearchResult?.node === node}
|
|
147
|
-
@expand=${onExpand}
|
|
147
|
+
@expand=${onExpand}
|
|
148
|
+
?open=${node.expanded || input.jumpToNextSearchResult?.node === node}>
|
|
148
149
|
<devtools-highlight ranges=${highlights} current-range=${selected}>
|
|
149
150
|
${htmlView(node)}
|
|
150
151
|
</devtools-highlight>
|
|
151
152
|
${node.children().length ? html`
|
|
152
|
-
<ul role="group"
|
|
153
|
+
<ul role="group">
|
|
153
154
|
${populateSubtrees || input.search ? subtree(node) : Lit.nothing}
|
|
154
155
|
</ul>` : Lit.nothing}
|
|
155
156
|
</li>`;
|
|
@@ -76,11 +76,11 @@ export class ImagePreview {
|
|
|
76
76
|
originalImageURL: Platform.DevToolsPath.UrlString,
|
|
77
77
|
showDimensions: boolean,
|
|
78
78
|
options: {
|
|
79
|
-
precomputedFeatures: (PrecomputedFeatures|undefined),
|
|
80
|
-
imageAltText: (string|undefined),
|
|
81
79
|
align: Align,
|
|
80
|
+
precomputedFeatures?: PrecomputedFeatures,
|
|
81
|
+
imageAltText?: string,
|
|
82
82
|
hideFileData?: boolean,
|
|
83
|
-
}
|
|
83
|
+
} = {align: Align.CENTER},
|
|
84
84
|
): Promise<HTMLDivElement|null> {
|
|
85
85
|
const {precomputedFeatures, imageAltText, align} = options;
|
|
86
86
|
|
|
@@ -358,6 +358,7 @@ export const knownContextValues = new Set([
|
|
|
358
358
|
'ai-code-generation-teaser.show-disclaimer-info-tooltip',
|
|
359
359
|
'ai-code-generation-upgrade-dialog.continue',
|
|
360
360
|
'ai-code-generation-upgrade-dialog.manage-in-settings',
|
|
361
|
+
'ai-code-generation-used',
|
|
361
362
|
'ai-explorer',
|
|
362
363
|
'ai_assistance',
|
|
363
364
|
'align-content',
|
|
@@ -765,6 +766,7 @@ export const knownContextValues = new Set([
|
|
|
765
766
|
'clear-palette',
|
|
766
767
|
'clear-replace-input',
|
|
767
768
|
'clear-search-input',
|
|
769
|
+
'clear-speculative-loads',
|
|
768
770
|
'clear-storage',
|
|
769
771
|
'clear-storage-cache-storage',
|
|
770
772
|
'clear-storage-cookies',
|
|
@@ -825,6 +827,8 @@ export const knownContextValues = new Set([
|
|
|
825
827
|
'column-rule-edge-start-inset',
|
|
826
828
|
'column-rule-edge-start-outset',
|
|
827
829
|
'column-rule-inset',
|
|
830
|
+
'column-rule-inset-end',
|
|
831
|
+
'column-rule-inset-start',
|
|
828
832
|
'column-rule-interior-end-inset',
|
|
829
833
|
'column-rule-interior-end-outset',
|
|
830
834
|
'column-rule-interior-inset',
|
|
@@ -3250,6 +3254,8 @@ export const knownContextValues = new Set([
|
|
|
3250
3254
|
'row-rule-edge-start-inset',
|
|
3251
3255
|
'row-rule-edge-start-outset',
|
|
3252
3256
|
'row-rule-inset',
|
|
3257
|
+
'row-rule-inset-end',
|
|
3258
|
+
'row-rule-inset-start',
|
|
3253
3259
|
'row-rule-interior-end-inset',
|
|
3254
3260
|
'row-rule-interior-end-outset',
|
|
3255
3261
|
'row-rule-interior-inset',
|
|
@@ -3272,6 +3278,8 @@ export const knownContextValues = new Set([
|
|
|
3272
3278
|
'rule-color',
|
|
3273
3279
|
'rule-edge-inset',
|
|
3274
3280
|
'rule-inset',
|
|
3281
|
+
'rule-inset-end',
|
|
3282
|
+
'rule-inset-start',
|
|
3275
3283
|
'rule-interior-inset',
|
|
3276
3284
|
'rule-outset',
|
|
3277
3285
|
'rule-overlap',
|
package/package.json
CHANGED