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
|
@@ -1217,7 +1217,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1217
1217
|
onExpand: () => this.expand(),
|
|
1218
1218
|
|
|
1219
1219
|
containerAdornerActive: this.#containerAdornerActive,
|
|
1220
|
-
showAdAdorner: this.nodeInternal.
|
|
1220
|
+
showAdAdorner: this.nodeInternal.isAdRelatedNode(),
|
|
1221
1221
|
showContainerAdorner: Boolean(this.#layout?.containerType) && !this.isClosingTag(),
|
|
1222
1222
|
containerType: this.#layout?.containerType,
|
|
1223
1223
|
showFlexAdorner: Boolean(this.#layout?.isFlex) && !this.isClosingTag(),
|
|
@@ -1509,6 +1509,8 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1509
1509
|
SDK.DOMModel.DOMNodeEvents.TOP_LAYER_INDEX_CHANGED, this.onTopLayerIndexChanged, this);
|
|
1510
1510
|
this.nodeInternal.addEventListener(
|
|
1511
1511
|
SDK.DOMModel.DOMNodeEvents.SCROLLABLE_FLAG_UPDATED, this.#onScrollableFlagUpdated, this);
|
|
1512
|
+
this.nodeInternal.addEventListener(
|
|
1513
|
+
SDK.DOMModel.DOMNodeEvents.AD_RELATED_STATE_UPDATED, this.#onAdRelatedStateUpdated, this);
|
|
1512
1514
|
this.nodeInternal.addEventListener(
|
|
1513
1515
|
SDK.DOMModel.DOMNodeEvents.CONTAINER_QUERY_OVERLAY_STATE_CHANGED,
|
|
1514
1516
|
this.#onPersistentContainerQueryOverlayStateChanged, this);
|
|
@@ -1592,6 +1594,8 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1592
1594
|
SDK.DOMModel.DOMNodeEvents.TOP_LAYER_INDEX_CHANGED, this.onTopLayerIndexChanged, this);
|
|
1593
1595
|
this.nodeInternal.removeEventListener(
|
|
1594
1596
|
SDK.DOMModel.DOMNodeEvents.SCROLLABLE_FLAG_UPDATED, this.#onScrollableFlagUpdated, this);
|
|
1597
|
+
this.nodeInternal.removeEventListener(
|
|
1598
|
+
SDK.DOMModel.DOMNodeEvents.AD_RELATED_STATE_UPDATED, this.#onAdRelatedStateUpdated, this);
|
|
1595
1599
|
this.nodeInternal.removeEventListener(
|
|
1596
1600
|
SDK.DOMModel.DOMNodeEvents.CONTAINER_QUERY_OVERLAY_STATE_CHANGED,
|
|
1597
1601
|
this.#onPersistentContainerQueryOverlayStateChanged, this);
|
|
@@ -1609,6 +1613,10 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1609
1613
|
void this.#updateAdorners();
|
|
1610
1614
|
}
|
|
1611
1615
|
|
|
1616
|
+
#onAdRelatedStateUpdated(): void {
|
|
1617
|
+
void this.#updateAdorners();
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1612
1620
|
#onPersistentContainerQueryOverlayStateChanged(event: Common.EventTarget.EventTargetEvent<{enabled: boolean}>): void {
|
|
1613
1621
|
this.#containerAdornerActive = event.data.enabled;
|
|
1614
1622
|
this.performUpdate();
|
|
@@ -38,7 +38,6 @@ export class ImagePreviewPopover {
|
|
|
38
38
|
}
|
|
39
39
|
return {
|
|
40
40
|
box: link.boxInWindow(),
|
|
41
|
-
hide: undefined,
|
|
42
41
|
show: async (popover: UI.GlassPane.GlassPane) => {
|
|
43
42
|
const node = this.getDOMNode((link));
|
|
44
43
|
if (!node) {
|
|
@@ -46,7 +45,6 @@ export class ImagePreviewPopover {
|
|
|
46
45
|
}
|
|
47
46
|
const precomputedFeatures = await Components.ImagePreview.ImagePreview.loadDimensionsForNode(node);
|
|
48
47
|
const preview = await Components.ImagePreview.ImagePreview.build(href, true, {
|
|
49
|
-
imageAltText: undefined,
|
|
50
48
|
precomputedFeatures,
|
|
51
49
|
align: Components.ImagePreview.Align.CENTER,
|
|
52
50
|
});
|
|
@@ -75,8 +75,9 @@ interface PropertiesWidgetInput {
|
|
|
75
75
|
onFilterChanged: (e: CustomEvent<string>) => void;
|
|
76
76
|
onRegexToggled: () => void;
|
|
77
77
|
isRegex: boolean;
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;
|
|
79
|
+
objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null;
|
|
80
|
+
allChildrenFiltered: boolean;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
type View = (input: PropertiesWidgetInput, output: object, target: HTMLElement) => void;
|
|
@@ -99,10 +100,10 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
99
100
|
</devtools-checkbox>
|
|
100
101
|
</devtools-toolbar>
|
|
101
102
|
</div>
|
|
102
|
-
${input.
|
|
103
|
+
${input.objectTree && input.allChildrenFiltered ? html`
|
|
103
104
|
<div class="gray-info-message">${i18nString(UIStrings.noMatchingProperty)}</div>
|
|
104
105
|
` : nothing}
|
|
105
|
-
${input.
|
|
106
|
+
${input.treeOutline.element}
|
|
106
107
|
</div>`, target);
|
|
107
108
|
// clang-format on
|
|
108
109
|
};
|
|
@@ -111,13 +112,13 @@ const getShowAllPropertiesSetting = (): Common.Settings.Setting<boolean> =>
|
|
|
111
112
|
Common.Settings.Settings.instance().createSetting('show-all-properties', /* defaultValue */ false);
|
|
112
113
|
|
|
113
114
|
export class PropertiesWidget extends UI.Widget.VBox {
|
|
114
|
-
private node: SDK.DOMModel.DOMNode|null;
|
|
115
115
|
private readonly showAllPropertiesSetting: Common.Settings.Setting<boolean>;
|
|
116
116
|
private filterRegex: RegExp|null = null;
|
|
117
117
|
private readonly treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;
|
|
118
|
-
|
|
118
|
+
#lastRequestedNode: SDK.DOMModel.DOMNode|null = null;
|
|
119
119
|
readonly #view: View;
|
|
120
|
-
#
|
|
120
|
+
#pendingNodeUpdate = true;
|
|
121
|
+
#objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null = null;
|
|
121
122
|
#isRegex = false;
|
|
122
123
|
#filterText = '';
|
|
123
124
|
|
|
@@ -126,7 +127,7 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
126
127
|
this.registerRequiredCSS(propertiesWidgetStyles);
|
|
127
128
|
|
|
128
129
|
this.showAllPropertiesSetting = getShowAllPropertiesSetting();
|
|
129
|
-
this.showAllPropertiesSetting.addChangeListener(this.
|
|
130
|
+
this.showAllPropertiesSetting.addChangeListener(this.onFilterChanged.bind(this));
|
|
130
131
|
|
|
131
132
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
132
133
|
SDK.DOMModel.DOMModel, SDK.DOMModel.Events.AttrModified, this.onNodeChange, this, {scoped: true});
|
|
@@ -137,7 +138,6 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
137
138
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
138
139
|
SDK.DOMModel.DOMModel, SDK.DOMModel.Events.ChildNodeCountUpdated, this.onNodeChange, this, {scoped: true});
|
|
139
140
|
UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, this.setNode, this);
|
|
140
|
-
this.node = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
141
141
|
|
|
142
142
|
this.#view = view;
|
|
143
143
|
this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline({readOnly: true});
|
|
@@ -147,7 +147,7 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
147
147
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.DOMPropertiesExpanded);
|
|
148
148
|
});
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
this.requestUpdate();
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
#buildFilterRegex(text: string): RegExp|null {
|
|
@@ -164,80 +164,80 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
164
164
|
return new RegExp(Platform.StringUtilities.escapeForRegExp(text), 'i');
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
private onFilterChanged(event: CustomEvent<string>): void {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
private onFilterChanged(event: CustomEvent<string>|Common.EventTarget.EventTargetEvent<boolean>): void {
|
|
168
|
+
if ('detail' in event) {
|
|
169
|
+
this.#filterText = event.detail;
|
|
170
|
+
this.filterRegex = this.#buildFilterRegex(event.detail);
|
|
171
|
+
}
|
|
172
|
+
this.#updateFilter();
|
|
173
|
+
this.requestUpdate();
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
private onRegexToggled(): void {
|
|
174
177
|
this.#isRegex = !this.#isRegex;
|
|
175
178
|
this.filterRegex = this.#buildFilterRegex(this.#filterText);
|
|
176
|
-
this
|
|
177
|
-
this
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
private filterAndScheduleUpdate(): void {
|
|
181
|
-
const previousDisplay = this.#displayNoMatchingPropertyMessage;
|
|
182
|
-
this.internalFilterProperties();
|
|
183
|
-
if (previousDisplay !== this.#displayNoMatchingPropertyMessage) {
|
|
184
|
-
this.requestUpdate();
|
|
185
|
-
}
|
|
179
|
+
this.#updateFilter();
|
|
180
|
+
this.requestUpdate();
|
|
186
181
|
}
|
|
187
182
|
|
|
188
|
-
|
|
189
|
-
this.#
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
includeNullOrUndefinedValues: this.showAllPropertiesSetting.get(),
|
|
194
|
-
regex: this.filterRegex,
|
|
195
|
-
});
|
|
196
|
-
this.#displayNoMatchingPropertyMessage = this.#displayNoMatchingPropertyMessage && hidden;
|
|
197
|
-
element.hidden = hidden;
|
|
198
|
-
}
|
|
183
|
+
#updateFilter(): void {
|
|
184
|
+
this.#objectTree?.setFilter({
|
|
185
|
+
includeNullOrUndefinedValues: this.showAllPropertiesSetting.get(),
|
|
186
|
+
regex: this.filterRegex,
|
|
187
|
+
});
|
|
199
188
|
}
|
|
200
189
|
|
|
201
|
-
private setNode(
|
|
202
|
-
this
|
|
190
|
+
private setNode(): void {
|
|
191
|
+
this.#pendingNodeUpdate = true;
|
|
203
192
|
this.requestUpdate();
|
|
204
193
|
}
|
|
205
194
|
|
|
206
|
-
|
|
207
|
-
if (this
|
|
208
|
-
|
|
209
|
-
delete this.lastRequestedNode;
|
|
195
|
+
async #updateNodeIfRequired(): Promise<void> {
|
|
196
|
+
if (!this.#pendingNodeUpdate) {
|
|
197
|
+
return;
|
|
210
198
|
}
|
|
199
|
+
this.#pendingNodeUpdate = false;
|
|
200
|
+
this.#lastRequestedNode?.domModel().runtimeModel().releaseObjectGroup(OBJECT_GROUP_NAME);
|
|
201
|
+
this.#lastRequestedNode = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
211
202
|
|
|
212
|
-
if (!this
|
|
203
|
+
if (!this.#lastRequestedNode) {
|
|
204
|
+
this.#objectTree = null;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const object = await this.#lastRequestedNode.resolveToObject(OBJECT_GROUP_NAME);
|
|
208
|
+
if (!object) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
this.#objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(
|
|
213
|
+
object, ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED);
|
|
214
|
+
this.#updateFilter();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
override async performUpdate(): Promise<void> {
|
|
218
|
+
await this.#updateNodeIfRequired();
|
|
219
|
+
if (!this.#objectTree) {
|
|
213
220
|
this.treeOutline.removeChildren();
|
|
214
|
-
this.#displayNoMatchingPropertyMessage = false;
|
|
215
221
|
} else {
|
|
216
|
-
this.lastRequestedNode = this.node;
|
|
217
|
-
const object = await this.node.resolveToObject(OBJECT_GROUP_NAME);
|
|
218
|
-
if (!object) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
222
|
const treeElement = this.treeOutline.rootElement();
|
|
223
223
|
treeElement.removeChildren();
|
|
224
|
-
const root = new ObjectUI.ObjectPropertiesSection.ObjectTree(
|
|
225
|
-
object, ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED);
|
|
226
224
|
ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement.populateWithProperties(
|
|
227
|
-
treeElement, await
|
|
228
|
-
|
|
225
|
+
treeElement, await this.#objectTree.populateChildrenIfNeeded(), true /* skipProto */,
|
|
226
|
+
true /* skipGettersAndSetters */);
|
|
229
227
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
const allChildrenFiltered =
|
|
229
|
+
!(this.#objectTree?.children?.accessors?.some(c => !c.isFiltered) ||
|
|
230
|
+
this.#objectTree?.children?.arrayRanges?.some(() => true) ||
|
|
231
|
+
this.#objectTree?.children?.internalProperties?.some(c => !c.isFiltered) ||
|
|
232
|
+
this.#objectTree?.children?.properties?.some(c => !c.isFiltered));
|
|
234
233
|
this.#view(
|
|
235
234
|
{
|
|
236
235
|
onFilterChanged: this.onFilterChanged.bind(this),
|
|
237
236
|
onRegexToggled: this.onRegexToggled.bind(this),
|
|
238
237
|
isRegex: this.#isRegex,
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
treeOutline: this.treeOutline,
|
|
239
|
+
allChildrenFiltered,
|
|
240
|
+
objectTree: this.#objectTree,
|
|
241
241
|
},
|
|
242
242
|
{}, this.contentElement);
|
|
243
243
|
}
|
|
@@ -245,14 +245,15 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
245
245
|
private onNodeChange(
|
|
246
246
|
event: Common.EventTarget.EventTargetEvent<{node: SDK.DOMModel.DOMNode, name: string}|SDK.DOMModel.DOMNode>,
|
|
247
247
|
): void {
|
|
248
|
-
if (!this
|
|
248
|
+
if (!this.#lastRequestedNode) {
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
251
|
const data = event.data;
|
|
252
252
|
const node = (data instanceof SDK.DOMModel.DOMNode ? data : data.node);
|
|
253
|
-
if (this
|
|
253
|
+
if (this.#lastRequestedNode !== node) {
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
|
+
this.#pendingNodeUpdate = true;
|
|
256
257
|
this.requestUpdate();
|
|
257
258
|
}
|
|
258
259
|
}
|
|
@@ -56,7 +56,7 @@ import * as ElementsComponents from './components/components.js';
|
|
|
56
56
|
import {ElementsPanel} from './ElementsPanel.js';
|
|
57
57
|
import stylePropertiesTreeOutlineStyles from './stylePropertiesTreeOutline.css.js';
|
|
58
58
|
import {type Context, StylePropertyTreeElement} from './StylePropertyTreeElement.js';
|
|
59
|
-
import {StylesSidebarPane} from './StylesSidebarPane.js';
|
|
59
|
+
import type {StylesSidebarPane} from './StylesSidebarPane.js';
|
|
60
60
|
|
|
61
61
|
const UIStrings = {
|
|
62
62
|
/**
|
|
@@ -1469,18 +1469,47 @@ export class StylePropertiesSection {
|
|
|
1469
1469
|
}, {jslogContext: 'copy-selector'});
|
|
1470
1470
|
|
|
1471
1471
|
contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copyRule), () => {
|
|
1472
|
-
const ruleText =
|
|
1472
|
+
const ruleText = this.formatLeadingProperties().ruleText;
|
|
1473
1473
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(ruleText);
|
|
1474
1474
|
}, {jslogContext: 'copy-rule'});
|
|
1475
1475
|
|
|
1476
1476
|
contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copyAllDeclarations), () => {
|
|
1477
|
-
const allDeclarationText =
|
|
1477
|
+
const allDeclarationText = this.formatLeadingProperties().allDeclarationText;
|
|
1478
1478
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(allDeclarationText);
|
|
1479
1479
|
}, {jslogContext: 'copy-all-declarations'});
|
|
1480
1480
|
|
|
1481
1481
|
void contextMenu.show();
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
+
formatLeadingProperties(): {
|
|
1485
|
+
allDeclarationText: string,
|
|
1486
|
+
ruleText: string,
|
|
1487
|
+
} {
|
|
1488
|
+
const selectorText = this.headerText();
|
|
1489
|
+
const indent = Common.Settings.Settings.instance().moduleSetting('text-editor-indent').get();
|
|
1490
|
+
|
|
1491
|
+
const style = this.style();
|
|
1492
|
+
const lines: string[] = [];
|
|
1493
|
+
|
|
1494
|
+
// Invalid property should also be copied.
|
|
1495
|
+
// For example: *display: inline.
|
|
1496
|
+
for (const property of style.leadingProperties()) {
|
|
1497
|
+
if (property.disabled) {
|
|
1498
|
+
lines.push(`${indent}/* ${property.name}: ${property.value}; */`);
|
|
1499
|
+
} else {
|
|
1500
|
+
lines.push(`${indent}${property.name}: ${property.value};`);
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
const allDeclarationText: string = lines.join('\n');
|
|
1505
|
+
const ruleText = `${selectorText} {\n${allDeclarationText}\n}`;
|
|
1506
|
+
|
|
1507
|
+
return {
|
|
1508
|
+
allDeclarationText,
|
|
1509
|
+
ruleText,
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1484
1513
|
private navigateToSelectorSource(index: number, focus: boolean): void {
|
|
1485
1514
|
const cssModel = this.parentPane.cssModel();
|
|
1486
1515
|
if (!cssModel) {
|
|
@@ -47,11 +47,7 @@ import {
|
|
|
47
47
|
import {StyleEditorWidget} from './StyleEditorWidget.js';
|
|
48
48
|
import type {StylePropertiesSection} from './StylePropertiesSection.js';
|
|
49
49
|
import {getCssDeclarationAsJavascriptProperty} from './StylePropertyUtils.js';
|
|
50
|
-
import {
|
|
51
|
-
CSSPropertyPrompt,
|
|
52
|
-
REGISTERED_PROPERTY_SECTION_NAME,
|
|
53
|
-
StylesSidebarPane,
|
|
54
|
-
} from './StylesSidebarPane.js';
|
|
50
|
+
import {CSSPropertyPrompt, REGISTERED_PROPERTY_SECTION_NAME, type StylesSidebarPane} from './StylesSidebarPane.js';
|
|
55
51
|
|
|
56
52
|
const {html, nothing, render, Directives: {classMap}} = Lit;
|
|
57
53
|
const ASTUtils = SDK.CSSPropertyParser.ASTUtils;
|
|
@@ -413,7 +409,7 @@ export class VariableRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
|
|
|
413
409
|
if (fromFallback) {
|
|
414
410
|
renderedFallback?.cssControls.get('color')?.forEach(
|
|
415
411
|
innerSwatch => innerSwatch.addEventListener(InlineEditor.ColorSwatch.ColorChangedEvent.eventName, ev => {
|
|
416
|
-
colorSwatch.
|
|
412
|
+
colorSwatch.setColor(ev.data.color);
|
|
417
413
|
}));
|
|
418
414
|
}
|
|
419
415
|
|
|
@@ -535,7 +531,7 @@ export class AttributeRenderer extends rendererBase(SDK.CSSPropertyParserMatcher
|
|
|
535
531
|
if (fromFallback) {
|
|
536
532
|
renderedFallback?.cssControls.get('color')?.forEach(
|
|
537
533
|
innerSwatch => innerSwatch.addEventListener(InlineEditor.ColorSwatch.ColorChangedEvent.eventName, ev => {
|
|
538
|
-
colorSwatch.
|
|
534
|
+
colorSwatch.setColor(ev.data.color);
|
|
539
535
|
}));
|
|
540
536
|
}
|
|
541
537
|
|
|
@@ -718,9 +714,9 @@ export class ColorRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.Co
|
|
|
718
714
|
return;
|
|
719
715
|
}
|
|
720
716
|
if (color.is(Common.Color.Format.HSL) || color.is(Common.Color.Format.HSLA)) {
|
|
721
|
-
swatch.
|
|
717
|
+
swatch.setColor(new Common.Color.HSL(hue, color.s, color.l, color.alpha));
|
|
722
718
|
} else if (color.is(Common.Color.Format.HWB) || color.is(Common.Color.Format.HWBA)) {
|
|
723
|
-
swatch.
|
|
719
|
+
swatch.setColor(new Common.Color.HWB(hue, color.w, color.b, color.alpha));
|
|
724
720
|
}
|
|
725
721
|
angle.updateProperty(swatch.color?.asString() ?? '');
|
|
726
722
|
});
|
|
@@ -735,9 +731,9 @@ export class ColorRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.Co
|
|
|
735
731
|
const tooltip = editable ? i18nString(UIStrings.openColorPickerS, {PH1: shiftClickMessage}) : '';
|
|
736
732
|
|
|
737
733
|
const swatch = new InlineEditor.ColorSwatch.ColorSwatch(tooltip);
|
|
738
|
-
swatch.
|
|
734
|
+
swatch.setReadonly(!editable);
|
|
739
735
|
if (color) {
|
|
740
|
-
swatch.color
|
|
736
|
+
swatch.renderColor(color);
|
|
741
737
|
}
|
|
742
738
|
|
|
743
739
|
if (this.#treeElement?.editable()) {
|
|
@@ -761,7 +757,7 @@ export class ColorRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.Co
|
|
|
761
757
|
new ColorSwatchPopoverIcon(treeElement, treeElement.parentPane().swatchPopoverHelper(), swatch);
|
|
762
758
|
swatchIcon.addEventListener(ColorSwatchPopoverIconEvents.COLOR_CHANGED, ev => {
|
|
763
759
|
valueChild.textContent = ev.data.getAuthoredText() ?? ev.data.asString();
|
|
764
|
-
swatch.
|
|
760
|
+
swatch.setColor(ev.data);
|
|
765
761
|
});
|
|
766
762
|
if (treeElement.property.name === 'color') {
|
|
767
763
|
void this.#addColorContrastInfo(swatchIcon);
|
|
@@ -838,15 +834,14 @@ export class LightDarkColorRenderer extends rendererBase(SDK.CSSPropertyParserMa
|
|
|
838
834
|
|
|
839
835
|
const activeColorSwatches = (activeColor === match.light ? lightControls : darkControls).get('color');
|
|
840
836
|
activeColorSwatches?.forEach(
|
|
841
|
-
swatch => swatch.addEventListener(
|
|
842
|
-
|
|
843
|
-
}));
|
|
837
|
+
swatch => swatch.addEventListener(
|
|
838
|
+
InlineEditor.ColorSwatch.ColorChangedEvent.eventName, ev => colorSwatch.setColor(ev.data.color)));
|
|
844
839
|
const inactiveColor = (activeColor === match.light) ? dark : light;
|
|
845
840
|
const colorText = context.matchedResult.getComputedTextRange(activeColor[0], activeColor[activeColor.length - 1]);
|
|
846
841
|
const color = colorText && Common.Color.parse(colorText);
|
|
847
842
|
inactiveColor.classList.add('inactive-value');
|
|
848
843
|
if (color) {
|
|
849
|
-
colorSwatch.color
|
|
844
|
+
colorSwatch.renderColor(color);
|
|
850
845
|
}
|
|
851
846
|
}
|
|
852
847
|
|
|
@@ -972,7 +967,7 @@ export class ColorMixRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
|
|
|
972
967
|
if (results) {
|
|
973
968
|
const color = Common.Color.parse(results[0]);
|
|
974
969
|
if (color) {
|
|
975
|
-
swatch.color
|
|
970
|
+
swatch.setColor(color.as(Common.Color.Format.HEXA));
|
|
976
971
|
return true;
|
|
977
972
|
}
|
|
978
973
|
}
|
|
@@ -2175,7 +2170,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2175
2170
|
this.listItemElement.classList.remove('implicit');
|
|
2176
2171
|
}
|
|
2177
2172
|
|
|
2178
|
-
const hasIgnorableError = !this.property.parsedOk &&
|
|
2173
|
+
const hasIgnorableError = !this.property.parsedOk && this.property.ignoreErrors();
|
|
2179
2174
|
if (hasIgnorableError) {
|
|
2180
2175
|
this.listItemElement.classList.add('has-ignorable-error');
|
|
2181
2176
|
} else {
|
|
@@ -2858,7 +2853,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2858
2853
|
}, {jslogContext: 'copy-value'});
|
|
2859
2854
|
|
|
2860
2855
|
contextMenu.headerSection().appendItem(i18nString(UIStrings.copyRule), () => {
|
|
2861
|
-
const ruleText =
|
|
2856
|
+
const ruleText = this.#parentSection.formatLeadingProperties().ruleText;
|
|
2862
2857
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(ruleText);
|
|
2863
2858
|
}, {jslogContext: 'copy-rule'});
|
|
2864
2859
|
|
|
@@ -2867,7 +2862,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2867
2862
|
{jslogContext: 'copy-css-declaration-as-js'});
|
|
2868
2863
|
|
|
2869
2864
|
contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copyAllDeclarations), () => {
|
|
2870
|
-
const allDeclarationText =
|
|
2865
|
+
const allDeclarationText = this.#parentSection.formatLeadingProperties().allDeclarationText;
|
|
2871
2866
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(allDeclarationText);
|
|
2872
2867
|
}, {jslogContext: 'copy-all-declarations'});
|
|
2873
2868
|
|
|
@@ -268,73 +268,6 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
268
268
|
this.userOperation = userOperation;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
static ignoreErrorsForProperty(property: SDK.CSSProperty.CSSProperty): boolean {
|
|
272
|
-
function hasUnknownVendorPrefix(string: string): boolean {
|
|
273
|
-
return !string.startsWith('-webkit-') && /^[-_][\w\d]+-\w/.test(string);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
const name = property.name.toLowerCase();
|
|
277
|
-
|
|
278
|
-
// IE hack.
|
|
279
|
-
if (name.charAt(0) === '_') {
|
|
280
|
-
return true;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// IE has a different format for this.
|
|
284
|
-
if (name === 'filter') {
|
|
285
|
-
return true;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
// Common IE-specific property prefix.
|
|
289
|
-
if (name.startsWith('scrollbar-')) {
|
|
290
|
-
return true;
|
|
291
|
-
}
|
|
292
|
-
if (hasUnknownVendorPrefix(name)) {
|
|
293
|
-
return true;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
const value = property.value.toLowerCase();
|
|
297
|
-
|
|
298
|
-
// IE hack.
|
|
299
|
-
if (value.endsWith('\\9')) {
|
|
300
|
-
return true;
|
|
301
|
-
}
|
|
302
|
-
if (hasUnknownVendorPrefix(value)) {
|
|
303
|
-
return true;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
return false;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
static formatLeadingProperties(section: StylePropertiesSection): {
|
|
310
|
-
allDeclarationText: string,
|
|
311
|
-
ruleText: string,
|
|
312
|
-
} {
|
|
313
|
-
const selectorText = section.headerText();
|
|
314
|
-
const indent = Common.Settings.Settings.instance().moduleSetting('text-editor-indent').get();
|
|
315
|
-
|
|
316
|
-
const style = section.style();
|
|
317
|
-
const lines: string[] = [];
|
|
318
|
-
|
|
319
|
-
// Invalid property should also be copied.
|
|
320
|
-
// For example: *display: inline.
|
|
321
|
-
for (const property of style.leadingProperties()) {
|
|
322
|
-
if (property.disabled) {
|
|
323
|
-
lines.push(`${indent}/* ${property.name}: ${property.value}; */`);
|
|
324
|
-
} else {
|
|
325
|
-
lines.push(`${indent}${property.name}: ${property.value};`);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
const allDeclarationText: string = lines.join('\n');
|
|
330
|
-
const ruleText = `${selectorText} {\n${allDeclarationText}\n}`;
|
|
331
|
-
|
|
332
|
-
return {
|
|
333
|
-
allDeclarationText,
|
|
334
|
-
ruleText,
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
|
|
338
271
|
revealProperty(cssProperty: SDK.CSSProperty.CSSProperty): void {
|
|
339
272
|
void this.decorator.highlightProperty(cssProperty);
|
|
340
273
|
this.lastRevealedProperty = cssProperty;
|
|
@@ -769,10 +702,6 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
769
702
|
return;
|
|
770
703
|
}
|
|
771
704
|
|
|
772
|
-
if (!UI.ViewManager.ViewManager.instance().isViewVisible('animations')) {
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
705
|
void this.computedStyleUpdateThrottler.schedule(async () => {
|
|
777
706
|
await this.#updateAnimatedStyles();
|
|
778
707
|
this.handledComputedStyleChangedForTest();
|
|
@@ -795,6 +724,11 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
795
724
|
#scheduleResetUpdateIfNotEditing(): void {
|
|
796
725
|
this.scheduleResetUpdateIfNotEditingCalledForTest();
|
|
797
726
|
|
|
727
|
+
// Don't schedule if editing; the edit completion will handle the update.
|
|
728
|
+
if (this.userOperation || this.isEditingStyle) {
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
|
|
798
732
|
void this.resetUpdateThrottler.schedule(async () => {
|
|
799
733
|
this.#resetUpdateIfNotEditing();
|
|
800
734
|
});
|
|
@@ -803,6 +737,13 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
803
737
|
scheduleResetUpdateIfNotEditingCalledForTest(): void {
|
|
804
738
|
}
|
|
805
739
|
|
|
740
|
+
#hasAnimatedStyles(animatedStyles: Protocol.CSS.GetAnimatedStylesForNodeResponse): boolean {
|
|
741
|
+
return Boolean(
|
|
742
|
+
animatedStyles.animationStyles?.length || animatedStyles.transitionsStyle?.cssProperties.length ||
|
|
743
|
+
animatedStyles.inherited?.some(
|
|
744
|
+
inherited => inherited.animationStyles?.length || inherited.transitionsStyle?.cssProperties.length));
|
|
745
|
+
}
|
|
746
|
+
|
|
806
747
|
async #updateAnimatedStyles(): Promise<void> {
|
|
807
748
|
if (!this.matchedStyles) {
|
|
808
749
|
return;
|
|
@@ -818,6 +759,18 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
818
759
|
return;
|
|
819
760
|
}
|
|
820
761
|
|
|
762
|
+
if (!this.#hasAnimatedStyles(animatedStyles)) {
|
|
763
|
+
// A computed style change that doesn't correspond to any animation is
|
|
764
|
+
// likely to be a change in the matched styles. In this case, we should
|
|
765
|
+
// update the matched styles.
|
|
766
|
+
this.#scheduleResetUpdateIfNotEditing();
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (!UI.ViewManager.ViewManager.instance().isViewVisible('animations')) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
|
|
821
774
|
const updateStyleSection =
|
|
822
775
|
(currentStyle: SDK.CSSStyleDeclaration.CSSStyleDeclaration|null, newStyle: Protocol.CSS.CSSStyle|null):
|
|
823
776
|
void => {
|
|
@@ -1619,7 +1572,6 @@ export class SectionBlock {
|
|
|
1619
1572
|
UI.UIUtils.createTextChild(separatorElement, i18nString(UIStrings.inheritedFromSPseudoOf, {PH1: pseudoTypeString}));
|
|
1620
1573
|
const link = PanelsCommon.DOMLinkifier.Linkifier.instance().linkify(node, {
|
|
1621
1574
|
preventKeyboardFocus: true,
|
|
1622
|
-
tooltip: undefined,
|
|
1623
1575
|
});
|
|
1624
1576
|
separatorElement.appendChild(link);
|
|
1625
1577
|
return new SectionBlock(separatorElement);
|
|
@@ -1672,7 +1624,6 @@ export class SectionBlock {
|
|
|
1672
1624
|
UI.UIUtils.createTextChild(separatorElement, i18nString(UIStrings.inheritedFroms));
|
|
1673
1625
|
const link = PanelsCommon.DOMLinkifier.Linkifier.instance().linkify(node, {
|
|
1674
1626
|
preventKeyboardFocus: true,
|
|
1675
|
-
tooltip: undefined,
|
|
1676
1627
|
});
|
|
1677
1628
|
separatorElement.appendChild(link);
|
|
1678
1629
|
return new SectionBlock(separatorElement);
|
|
@@ -1978,14 +1929,6 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
1978
1929
|
if (!this.isEditingName && !results.length && query.length > 1 && '!important'.startsWith(lowerQuery)) {
|
|
1979
1930
|
results.push({
|
|
1980
1931
|
text: '!important',
|
|
1981
|
-
title: undefined,
|
|
1982
|
-
subtitle: undefined,
|
|
1983
|
-
priority: undefined,
|
|
1984
|
-
isSecondary: undefined,
|
|
1985
|
-
subtitleRenderer: undefined,
|
|
1986
|
-
selectionRange: undefined,
|
|
1987
|
-
hideGhostText: undefined,
|
|
1988
|
-
iconElement: undefined,
|
|
1989
1932
|
});
|
|
1990
1933
|
}
|
|
1991
1934
|
const userEnteredText = query.replace('-', '');
|
|
@@ -2061,14 +2004,6 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2061
2004
|
const index = completion.toLowerCase().indexOf(lowerQuery);
|
|
2062
2005
|
const result: CompletionResult = {
|
|
2063
2006
|
text: completion,
|
|
2064
|
-
title: undefined,
|
|
2065
|
-
subtitle: undefined,
|
|
2066
|
-
priority: undefined,
|
|
2067
|
-
isSecondary: undefined,
|
|
2068
|
-
subtitleRenderer: undefined,
|
|
2069
|
-
selectionRange: undefined,
|
|
2070
|
-
hideGhostText: undefined,
|
|
2071
|
-
iconElement: undefined,
|
|
2072
2007
|
isCSSVariableColor: false,
|
|
2073
2008
|
};
|
|
2074
2009
|
if (variable) {
|
|
@@ -2097,7 +2032,7 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2097
2032
|
|
|
2098
2033
|
function colorSwatchRenderer(color: Common.Color.Color): Element {
|
|
2099
2034
|
const swatch = new InlineEditor.ColorSwatch.ColorSwatch();
|
|
2100
|
-
swatch.color
|
|
2035
|
+
swatch.renderColor(color);
|
|
2101
2036
|
swatch.style.pointerEvents = 'none';
|
|
2102
2037
|
return swatch;
|
|
2103
2038
|
}
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
.style-panes-wrapper {
|
|
42
42
|
overflow: hidden scroll;
|
|
43
43
|
background-color: var(--sys-color-cdt-base-container);
|
|
44
|
+
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
.style-panes-wrapper:not(.computed-styles-pane-wrapper) > div:not(:last-child) {
|
|
46
47
|
border-bottom: 1px solid var(--sys-color-divider);
|
|
47
|
-
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
#elements-content:not(.elements-wrap) > div {
|
|
@@ -81,3 +81,7 @@ devtools-tree-outline {
|
|
|
81
81
|
border-radius: var(--sys-shape-corner-full);
|
|
82
82
|
box-shadow: var(--sys-elevation-level1);
|
|
83
83
|
}
|
|
84
|
+
|
|
85
|
+
.computed-styles-wrapper {
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
}
|
|
@@ -188,8 +188,6 @@ UI.Toolbar.registerToolbarItem({
|
|
|
188
188
|
condition: Root.Runtime.conditions.canDock,
|
|
189
189
|
location: UI.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,
|
|
190
190
|
order: 1,
|
|
191
|
-
loadItem: undefined,
|
|
192
|
-
separator: undefined,
|
|
193
191
|
});
|
|
194
192
|
|
|
195
193
|
Common.AppProvider.registerAppProvider({
|
|
@@ -263,7 +263,6 @@ export async function frameworkEventListeners(object: SDK.RemoteObject.RemoteObj
|
|
|
263
263
|
} = {
|
|
264
264
|
eventListeners,
|
|
265
265
|
internalHandlers: internalHandlers.length ? internalHandlers : undefined,
|
|
266
|
-
errorString: undefined,
|
|
267
266
|
};
|
|
268
267
|
|
|
269
268
|
// The logic further up seems to expect that if the internalHandlers is set,
|