chrome-devtools-frontend 1.0.1592129 → 1.0.1593518
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/Images/src/tab-move.svg +1 -0
- package/front_end/application_tokens.css +4 -4
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/root/ExperimentNames.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/SupportedCSSProperties.js +2 -2
- package/front_end/generated/protocol-mapping.d.ts +13 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +75 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +24 -1
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +320 -26
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgentOverlay.ts +87 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +79 -48
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +16 -2
- package/front_end/models/computed_style/ComputedStyleModel.ts +40 -6
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +5 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +39 -7
- package/front_end/panels/ai_assistance/README.md +61 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +141 -27
- package/front_end/panels/ai_assistance/components/ChatView.ts +5 -1
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +55 -1
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +19 -7
- package/front_end/panels/ai_assistance/components/chatMessage.css +30 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +12 -7
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +194 -134
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +1 -1
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -0
- package/front_end/panels/application/StorageItemsToolbar.ts +25 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +4 -2
- package/front_end/panels/application/cookieItemsView.css +28 -26
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +161 -154
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +1 -0
- package/front_end/panels/browser_debugger/domBreakpointsSidebarPane.css +58 -36
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -1
- package/front_end/panels/console/consoleView.css +7 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +16 -26
- package/front_end/panels/elements/ElementsPanel.ts +26 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
- package/front_end/panels/elements/LayoutPane.ts +8 -7
- package/front_end/panels/elements/StandaloneStylesContainer.ts +254 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +33 -0
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +148 -1
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +4 -0
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -1
- package/front_end/panels/elements/components/computedStyleProperty.css +1 -1
- package/front_end/panels/elements/elements-meta.ts +3 -5
- package/front_end/panels/elements/elements.ts +2 -0
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +6 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +2 -1
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/StepEditor.ts +3 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -1
- package/front_end/panels/sources/components/HeadersView.ts +2 -2
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -1
- package/front_end/panels/timeline/components/metricCard.css +0 -4
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +6 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +7 -12
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +13 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +6 -2
- package/front_end/ui/components/tree_outline/treeOutline.css +5 -0
- package/front_end/ui/legacy/ListControl.ts +5 -3
- package/front_end/ui/legacy/ListWidget.ts +1 -1
- package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +44 -24
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -2
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +31 -0
- package/front_end/ui/visual_logging/Debugging.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
|
@@ -385,6 +385,9 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
385
385
|
const matchedCascade = await this.#computedStyleModel.fetchMatchedCascade();
|
|
386
386
|
this.#computedStyleWidget.nodeStyle = computedStyle;
|
|
387
387
|
this.#computedStyleWidget.matchedStyles = matchedCascade;
|
|
388
|
+
if (matchedCascade) {
|
|
389
|
+
this.#computedStyleWidget.propertyTraces = this.#computedStyleModel.computePropertyTraces(matchedCascade);
|
|
390
|
+
}
|
|
388
391
|
}
|
|
389
392
|
|
|
390
393
|
private handleElementExpanded(): void {
|
|
@@ -1224,6 +1227,10 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
1224
1227
|
this.splitWidget.setSidebarWidget(this.sidebarPaneView.tabbedPane());
|
|
1225
1228
|
}
|
|
1226
1229
|
|
|
1230
|
+
revealComputedStylesPane(): void {
|
|
1231
|
+
this.sidebarPaneView?.tabbedPane().selectTab(SidebarPaneTabId.COMPUTED);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1227
1234
|
private updateSidebarPosition(): void {
|
|
1228
1235
|
if (this.sidebarPaneView?.tabbedPane().shouldHideOnDetach()) {
|
|
1229
1236
|
return;
|
|
@@ -1471,11 +1478,23 @@ export class ContextMenuProvider implements
|
|
|
1471
1478
|
}
|
|
1472
1479
|
}
|
|
1473
1480
|
|
|
1474
|
-
|
|
1475
|
-
|
|
1481
|
+
/**
|
|
1482
|
+
* Wraps around the Node so we can pass it into the DOMNodeRevealer but
|
|
1483
|
+
* distinguish that we want to reveal the computed styles panel.
|
|
1484
|
+
*/
|
|
1485
|
+
export class NodeComputedStyles {
|
|
1486
|
+
readonly node: SDK.DOMModel.DOMNode;
|
|
1487
|
+
constructor(node: SDK.DOMModel.DOMNode) {
|
|
1488
|
+
this.node = node;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export class DOMNodeRevealer implements
|
|
1493
|
+
Common.Revealer.Revealer<SDK.DOMModel.DOMNode|SDK.DOMModel.DeferredDOMNode|SDK.RemoteObject.RemoteObject|
|
|
1494
|
+
SDK.DOMModel.AdoptedStyleSheet|NodeComputedStyles> {
|
|
1476
1495
|
reveal(
|
|
1477
1496
|
node: SDK.DOMModel.DOMNode|SDK.DOMModel.DeferredDOMNode|SDK.RemoteObject.RemoteObject|
|
|
1478
|
-
SDK.DOMModel.AdoptedStyleSheet,
|
|
1497
|
+
SDK.DOMModel.AdoptedStyleSheet|NodeComputedStyles,
|
|
1479
1498
|
omitFocus?: boolean): Promise<void> {
|
|
1480
1499
|
const panel = ElementsPanel.instance();
|
|
1481
1500
|
panel.pendingNodeReveal = true;
|
|
@@ -1501,6 +1520,10 @@ export class DOMNodeRevealer implements Common.Revealer.Revealer<
|
|
|
1501
1520
|
onNodeResolved((node));
|
|
1502
1521
|
} else if (node instanceof SDK.DOMModel.DeferredDOMNode) {
|
|
1503
1522
|
(node).resolve(checkDeferredDOMNodeThenReveal);
|
|
1523
|
+
} else if (node instanceof NodeComputedStyles) {
|
|
1524
|
+
const elements = ElementsPanel.instance();
|
|
1525
|
+
elements.revealComputedStylesPane();
|
|
1526
|
+
onNodeResolved(node.node);
|
|
1504
1527
|
} else {
|
|
1505
1528
|
const domModel = node.runtimeModel().target().model(SDK.DOMModel.DOMModel);
|
|
1506
1529
|
if (domModel) {
|
|
@@ -1120,6 +1120,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1120
1120
|
this.listItemElement.setAttribute(
|
|
1121
1121
|
'jslog', `${VisualLogging.treeItem().parent('elementsTreeOutline').track({
|
|
1122
1122
|
keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Backspace|Delete|Enter|Space|Home|End',
|
|
1123
|
+
resize: true,
|
|
1123
1124
|
drag: true,
|
|
1124
1125
|
click: true,
|
|
1125
1126
|
})}`);
|
|
@@ -228,26 +228,27 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
228
228
|
event.preventDefault();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
+
// clang-format off
|
|
231
232
|
const renderElement = (element: LayoutElement): Lit.LitTemplate => html`<div
|
|
232
233
|
class="element"
|
|
233
|
-
jslog=${VisualLogging.item()}>
|
|
234
|
+
jslog=${VisualLogging.item().track({resize: true})}>
|
|
234
235
|
<devtools-checkbox
|
|
235
236
|
data-element="true"
|
|
236
237
|
class="checkbox-label"
|
|
237
238
|
.checked=${element.enabled}
|
|
238
239
|
@change=${(e: Event) => input.onElementToggle(element, e)}
|
|
239
|
-
jslog=${VisualLogging.toggle().track({
|
|
240
|
-
click: true
|
|
241
|
-
})}>
|
|
240
|
+
jslog=${VisualLogging.toggle().track({click: true, resize: true })}>
|
|
242
241
|
<span
|
|
243
242
|
class="node-text-container"
|
|
244
243
|
data-label="true"
|
|
245
244
|
@mouseenter=${(e: MouseEvent) => input.onMouseEnter(element, e)}
|
|
246
245
|
@mouseleave=${(e: MouseEvent) => input.onMouseLeave(element, e)}>
|
|
247
246
|
<devtools-node-text .data=${{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
nodeId: element.domId,
|
|
248
|
+
nodeTitle: element.name,
|
|
249
|
+
nodeClasses: element.domClasses
|
|
250
|
+
}}>
|
|
251
|
+
</devtools-node-text>
|
|
251
252
|
</span>
|
|
252
253
|
</devtools-checkbox>
|
|
253
254
|
<label
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
6
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
|
+
import * as ComputedStyle from '../../models/computed_style/computed_style.js';
|
|
8
|
+
import type * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
9
|
+
import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
10
|
+
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
11
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
13
|
+
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
14
|
+
|
|
15
|
+
import * as ElementsComponents from './components/components.js';
|
|
16
|
+
import {StylePropertiesSection} from './StylePropertiesSection.js';
|
|
17
|
+
import type {StylePropertyTreeElement} from './StylePropertyTreeElement.js';
|
|
18
|
+
import type {StylesContainer} from './StylesContainer.js';
|
|
19
|
+
import stylesSidebarPaneStyles from './stylesSidebarPane.css.js';
|
|
20
|
+
import {WebCustomData} from './WebCustomData.js';
|
|
21
|
+
|
|
22
|
+
interface ViewInput {
|
|
23
|
+
sections: StylePropertiesSection[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type View = (input: ViewInput, output_: undefined, target: HTMLElement) => void;
|
|
27
|
+
|
|
28
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
29
|
+
render(
|
|
30
|
+
html`
|
|
31
|
+
<style>${stylesSidebarPaneStyles}</style>
|
|
32
|
+
<div class="style-panes-wrapper" jslog=${VisualLogging.section('standalone-styles').track({
|
|
33
|
+
resize: true
|
|
34
|
+
})}>
|
|
35
|
+
<div class="styles-pane">
|
|
36
|
+
${input.sections.map(section => section.element)}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
`,
|
|
40
|
+
target);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export class StandaloneStylesContainer extends UI.Widget.VBox implements StylesContainer {
|
|
44
|
+
activeCSSAngle: InlineEditor.CSSAngle.CSSAngle|null = null;
|
|
45
|
+
isEditingStyle = false;
|
|
46
|
+
readonly sectionByElement = new WeakMap<Node, StylePropertiesSection>();
|
|
47
|
+
// TODO: Reference the MAX_LINK_LENGTH from StylesSidebarPane at a later stage, when we have a reference to it.
|
|
48
|
+
readonly linkifier: Components.Linkifier.Linkifier =
|
|
49
|
+
new Components.Linkifier.Linkifier(23, /* useLinkDecorator */ true);
|
|
50
|
+
|
|
51
|
+
#webCustomData: WebCustomData|undefined;
|
|
52
|
+
#userOperation = false;
|
|
53
|
+
#sections: StylePropertiesSection[] = [];
|
|
54
|
+
#swatchPopoverHelper = new InlineEditor.SwatchPopoverHelper.SwatchPopoverHelper();
|
|
55
|
+
#computedStyleModelInternal = new ComputedStyle.ComputedStyleModel.ComputedStyleModel();
|
|
56
|
+
#view: View;
|
|
57
|
+
|
|
58
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
59
|
+
super(element, {useShadowDom: true});
|
|
60
|
+
this.#view = view;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
get userOperation(): boolean {
|
|
64
|
+
return this.#userOperation;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get webCustomData(): WebCustomData|undefined {
|
|
68
|
+
if (!this.#webCustomData &&
|
|
69
|
+
Common.Settings.Settings.instance().moduleSetting('show-css-property-documentation-on-hover').get()) {
|
|
70
|
+
this.#webCustomData = WebCustomData.create();
|
|
71
|
+
}
|
|
72
|
+
return this.#webCustomData;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async #updateSections(): Promise<void> {
|
|
76
|
+
const node = this.node();
|
|
77
|
+
if (!node) {
|
|
78
|
+
this.#sections = [];
|
|
79
|
+
this.requestUpdate();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const cssModel = node.domModel().cssModel();
|
|
84
|
+
const matchedStyles = await cssModel.cachedMatchedCascadeForNode(node);
|
|
85
|
+
const parentNodeId = matchedStyles?.getParentLayoutNodeId();
|
|
86
|
+
|
|
87
|
+
const [parentStyles, computedStyles, extraStyles] = await Promise.all([
|
|
88
|
+
parentNodeId ? cssModel.getComputedStyle(parentNodeId) : null, cssModel.getComputedStyle(node.id),
|
|
89
|
+
cssModel.getComputedStyleExtraFields(node.id)
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
if (!matchedStyles) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const newSections: StylePropertiesSection[] = [];
|
|
97
|
+
let sectionIdx = 0;
|
|
98
|
+
for (const style of matchedStyles.nodeStyles()) {
|
|
99
|
+
const section = new StylePropertiesSection(
|
|
100
|
+
this, matchedStyles, style, sectionIdx++, computedStyles, parentStyles, extraStyles);
|
|
101
|
+
newSections.push(section);
|
|
102
|
+
this.sectionByElement.set(section.element, section);
|
|
103
|
+
}
|
|
104
|
+
this.#sections = newSections;
|
|
105
|
+
this.swatchPopoverHelper().reposition();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
override async performUpdate(): Promise<void> {
|
|
109
|
+
if (this.isEditingStyle || this.#userOperation) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
await this.#updateSections();
|
|
114
|
+
|
|
115
|
+
const viewInput: ViewInput = {
|
|
116
|
+
sections: this.#sections,
|
|
117
|
+
};
|
|
118
|
+
this.#view(viewInput, undefined, this.contentElement);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
swatchPopoverHelper(): InlineEditor.SwatchPopoverHelper.SwatchPopoverHelper {
|
|
122
|
+
return this.#swatchPopoverHelper;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// TODO: Refactor StylesContainer to use getter for node(), so that we can have a `node` setter here: set node().
|
|
126
|
+
set domNode(node: SDK.DOMModel.DOMNode|null) {
|
|
127
|
+
if (this.#computedStyleModelInternal.node === node) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
this.#computedStyleModelInternal.node = node;
|
|
131
|
+
this.requestUpdate();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
node(): SDK.DOMModel.DOMNode|null {
|
|
135
|
+
return this.#computedStyleModelInternal.node;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
cssModel(): SDK.CSSModel.CSSModel|null {
|
|
139
|
+
return this.#computedStyleModelInternal.cssModel();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
computedStyleModel(): ComputedStyle.ComputedStyleModel.ComputedStyleModel {
|
|
143
|
+
return this.#computedStyleModelInternal;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
setActiveProperty(_treeElement: StylePropertyTreeElement|null): void {
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
refreshUpdate(editedSection: StylePropertiesSection, editedTreeElement?: StylePropertyTreeElement): void {
|
|
150
|
+
if (editedTreeElement) {
|
|
151
|
+
for (const section of this.#sections) {
|
|
152
|
+
section.updateVarFunctions(editedTreeElement);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (this.isEditingStyle) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
for (const section of this.#sections) {
|
|
161
|
+
section.update(section === editedSection);
|
|
162
|
+
}
|
|
163
|
+
this.swatchPopoverHelper().reposition();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
filterRegex(): RegExp|null {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
setEditingStyle(editing: boolean): void {
|
|
171
|
+
this.isEditingStyle = editing;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
setUserOperation(userOperation: boolean): void {
|
|
175
|
+
this.#userOperation = userOperation;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
forceUpdate(): void {
|
|
179
|
+
this.hideAllPopovers();
|
|
180
|
+
this.requestUpdate();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
hideAllPopovers(): void {
|
|
184
|
+
this.#swatchPopoverHelper.hide();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
allSections(): StylePropertiesSection[] {
|
|
188
|
+
return this.#sections;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
getVariablePopoverContents(
|
|
192
|
+
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, variableName: string,
|
|
193
|
+
computedValue: string|null): ElementsComponents.CSSVariableValueView.CSSVariableValueView {
|
|
194
|
+
const registration = matchedStyles.getRegisteredProperty(variableName);
|
|
195
|
+
return new ElementsComponents.CSSVariableValueView.CSSVariableValueView({
|
|
196
|
+
variableName,
|
|
197
|
+
value: computedValue ?? undefined,
|
|
198
|
+
// TODO: provide a goToDefinition to jump to the StylesSidebarPane
|
|
199
|
+
details: registration ? {registration, goToDefinition: () => {}} : undefined,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
getVariableParserError(_matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, _variableName: string):
|
|
204
|
+
ElementsComponents.CSSVariableValueView.CSSVariableParserError|null {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
jumpToFunctionDefinition(_functionName: string): void {
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
continueEditingElement(_sectionIndex: number, _propertyIndex: number): void {
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
revealProperty(_cssProperty: SDK.CSSProperty.CSSProperty): void {
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
resetFocus(): void {
|
|
218
|
+
const firstVisibleSection = this.#sections[0]?.findCurrentOrNextVisible(true);
|
|
219
|
+
if (firstVisibleSection) {
|
|
220
|
+
firstVisibleSection.element.tabIndex = this.hasFocus() ? -1 : 0;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
removeSection(_section: StylePropertiesSection): void {
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
focusedSectionIndex(): number {
|
|
228
|
+
return this.#sections.findIndex(section => section.element.hasFocus());
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
addBlankSection(
|
|
232
|
+
_insertAfterSection: StylePropertiesSection, _styleSheetHeader: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader,
|
|
233
|
+
_ruleLocation: TextUtils.TextRange.TextRange): void {
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
jumpToProperty(_propertyName: string, _sectionName?: string, _blockName?: string): boolean {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
jumpToSectionBlock(_section: string): void {
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
jumpToFontPaletteDefinition(_paletteName: string): void {
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
jumpToDeclaration(_valueSource: SDK.CSSMatchedStyles.CSSValueSource): void {
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
addStyleUpdateListener(_listener: () => void): void {
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
removeStyleUpdateListener(_listener: () => void): void {
|
|
253
|
+
}
|
|
254
|
+
}
|
|
@@ -3543,6 +3543,39 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3543
3543
|
return event.target === this.expandElement;
|
|
3544
3544
|
}
|
|
3545
3545
|
}
|
|
3546
|
+
|
|
3547
|
+
export class GhostStylePropertyTreeElement extends StylePropertyTreeElement {
|
|
3548
|
+
constructor(
|
|
3549
|
+
stylesContainer: StylesContainer, section: StylePropertiesSection,
|
|
3550
|
+
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, property: SDK.CSSProperty.CSSProperty) {
|
|
3551
|
+
super({
|
|
3552
|
+
stylesContainer,
|
|
3553
|
+
section,
|
|
3554
|
+
matchedStyles,
|
|
3555
|
+
property,
|
|
3556
|
+
isShorthand: false,
|
|
3557
|
+
inherited: false,
|
|
3558
|
+
overloaded: false,
|
|
3559
|
+
newProperty: false,
|
|
3560
|
+
});
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
override onattach(): void {
|
|
3564
|
+
this.listItemElement.classList.add('ghost-row');
|
|
3565
|
+
this.updateTitle();
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
override updateTitle(): void {
|
|
3569
|
+
this.listItemElement.removeChildren();
|
|
3570
|
+
this.nameElement = Renderer.renderNameElement(this.name);
|
|
3571
|
+
this.listItemElement.appendChild(this.nameElement);
|
|
3572
|
+
this.listItemElement.createChild('span', 'styles-name-value-separator').textContent = ': ';
|
|
3573
|
+
this.valueElement = this.listItemElement.createChild('span');
|
|
3574
|
+
this.valueElement.textContent = this.value;
|
|
3575
|
+
this.listItemElement.createChild('span', 'styles-semicolon').textContent = ';';
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3546
3579
|
export interface Context {
|
|
3547
3580
|
expanded: boolean;
|
|
3548
3581
|
hasChildren: boolean;
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
|
|
9
|
-
import
|
|
10
|
+
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
11
|
+
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
10
12
|
|
|
11
13
|
export class StylesAiCodeCompletionProvider {
|
|
12
14
|
#aidaClient: Host.AidaClient.AidaClient = new Host.AidaClient.AidaClient();
|
|
@@ -16,6 +18,11 @@ export class StylesAiCodeCompletionProvider {
|
|
|
16
18
|
|
|
17
19
|
#boundOnUpdateAiCodeCompletionState = this.#updateAiCodeCompletionState.bind(this);
|
|
18
20
|
|
|
21
|
+
#debouncedRequestAidaSuggestion =
|
|
22
|
+
Common.Debouncer.debounce((prefix: string, suffix: string, cursorPositionAtRequest: number) => {
|
|
23
|
+
void this.#requestAidaSuggestion(prefix, suffix, cursorPositionAtRequest);
|
|
24
|
+
}, TextEditor.AiCodeCompletionProvider.AIDA_REQUEST_DEBOUNCE_TIMEOUT_MS);
|
|
25
|
+
|
|
19
26
|
private constructor(aiCodeCompletionConfig: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig) {
|
|
20
27
|
const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
|
|
21
28
|
if (!AiCodeCompletion.AiCodeCompletion.AiCodeCompletion.isAiCodeCompletionStylesEnabled(devtoolsLocale.locale)) {
|
|
@@ -66,4 +73,144 @@ export class StylesAiCodeCompletionProvider {
|
|
|
66
73
|
this.#cleanupAiCodeCompletion();
|
|
67
74
|
}
|
|
68
75
|
}
|
|
76
|
+
|
|
77
|
+
async triggerAiCodeCompletion(
|
|
78
|
+
text: string, cursorPosition: number, isEditingName: boolean, cssProperty: SDK.CSSProperty.CSSProperty,
|
|
79
|
+
cssModel: SDK.CSSModel.CSSModel): Promise<void> {
|
|
80
|
+
const styleSheetId = cssProperty.ownerStyle.styleSheetId;
|
|
81
|
+
if (!styleSheetId) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const header = cssModel.styleSheetHeaderForId(styleSheetId);
|
|
86
|
+
if (!header) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const contentData = await header.requestContentData();
|
|
91
|
+
if (TextUtils.ContentData.ContentData.isError(contentData)) {
|
|
92
|
+
AiCodeCompletion.debugLog('Error while fetching content from stylesheet', contentData.error);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const content = contentData.text;
|
|
97
|
+
const propertyRange = cssProperty.range;
|
|
98
|
+
if (!content || !propertyRange) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const contentText = new TextUtils.Text.Text(content);
|
|
103
|
+
const propertyStartOffset = contentText.offsetFromPosition(propertyRange.startLine, propertyRange.startColumn);
|
|
104
|
+
const propertyEndOffset = contentText.offsetFromPosition(propertyRange.endLine, propertyRange.endColumn);
|
|
105
|
+
let prefix = content.substring(0, propertyStartOffset);
|
|
106
|
+
if (!isEditingName) {
|
|
107
|
+
const nameRange = cssProperty.nameRange();
|
|
108
|
+
if (nameRange) {
|
|
109
|
+
const nameEndOffset = contentText.offsetFromPosition(nameRange.endLine, nameRange.endColumn);
|
|
110
|
+
prefix = prefix + content.substring(propertyStartOffset, nameEndOffset) + ': ';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
prefix = prefix + text;
|
|
114
|
+
const suffix = content.substring(propertyEndOffset);
|
|
115
|
+
// TODO(b/476098133): Consider adjusting cursor position
|
|
116
|
+
this.#debouncedRequestAidaSuggestion(prefix, suffix, cursorPosition);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async #requestAidaSuggestion(prefix: string, suffix: string, cursorPositionAtRequest: number): Promise<void> {
|
|
120
|
+
if (!this.#aiCodeCompletion) {
|
|
121
|
+
AiCodeCompletion.debugLog('Ai Code Completion is not initialized');
|
|
122
|
+
this.#aiCodeCompletionConfig?.onResponseReceived();
|
|
123
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionError);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const startTime = performance.now();
|
|
128
|
+
this.#aiCodeCompletionConfig?.onRequestTriggered();
|
|
129
|
+
// Registering AiCodeCompletionRequestTriggered metric even if the request is served from cache
|
|
130
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionRequestTriggered);
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
const completionResponse = await this.#aiCodeCompletion.completeCode(
|
|
134
|
+
prefix, suffix, cursorPositionAtRequest, Host.AidaClient.AidaInferenceLanguage.CSS);
|
|
135
|
+
this.#aiCodeCompletionConfig?.onResponseReceived();
|
|
136
|
+
if (!completionResponse) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const {response, fromCache} = completionResponse;
|
|
141
|
+
if (!response) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const sampleResponse = await this.#generateSampleForRequest(response, prefix, suffix);
|
|
146
|
+
if (!sampleResponse) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (fromCache) {
|
|
150
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionResponseServedFromCache);
|
|
151
|
+
}
|
|
152
|
+
this.#aiCodeCompletionConfig?.setAiAutoCompletion?.({
|
|
153
|
+
text: sampleResponse.suggestionText,
|
|
154
|
+
from: cursorPositionAtRequest,
|
|
155
|
+
rpcGlobalId: sampleResponse.rpcGlobalId,
|
|
156
|
+
sampleId: sampleResponse.sampleId,
|
|
157
|
+
startTime,
|
|
158
|
+
clearCachedRequest: this.clearCache.bind(this),
|
|
159
|
+
onImpression: this.#aiCodeCompletion?.registerUserImpression.bind(this.#aiCodeCompletion),
|
|
160
|
+
});
|
|
161
|
+
} catch (e) {
|
|
162
|
+
AiCodeCompletion.debugLog('Error while fetching code completion suggestions from AIDA', e);
|
|
163
|
+
this.#aiCodeCompletionConfig?.onResponseReceived();
|
|
164
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionError);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
async #generateSampleForRequest(response: Host.AidaClient.CompletionResponse, prefix: string, suffix?: string):
|
|
169
|
+
Promise<{
|
|
170
|
+
suggestionText: string,
|
|
171
|
+
citations: Host.AidaClient.Citation[],
|
|
172
|
+
rpcGlobalId?: Host.AidaClient.RpcGlobalId,
|
|
173
|
+
sampleId?: number,
|
|
174
|
+
}|null> {
|
|
175
|
+
const suggestionSample = this.#pickSampleFromResponse(response);
|
|
176
|
+
if (!suggestionSample) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const shouldBlock =
|
|
181
|
+
suggestionSample.attributionMetadata?.attributionAction === Host.AidaClient.RecitationAction.BLOCK;
|
|
182
|
+
if (shouldBlock) {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const suggestionText = TextEditor.AiCodeCompletionProvider.AiCodeCompletionProvider.trimSuggestionOverlap(
|
|
187
|
+
suggestionSample.generationString, suffix);
|
|
188
|
+
if (suggestionText.length === 0) {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
suggestionText,
|
|
194
|
+
sampleId: suggestionSample.sampleId,
|
|
195
|
+
citations: suggestionSample.attributionMetadata?.citations ?? [],
|
|
196
|
+
rpcGlobalId: response.metadata.rpcGlobalId,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#pickSampleFromResponse(response: Host.AidaClient.CompletionResponse): Host.AidaClient.GenerationSample|null {
|
|
201
|
+
if (!response.generatedSamples.length) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const completionHint = this.#aiCodeCompletionConfig?.getCompletionHint?.();
|
|
206
|
+
if (!completionHint) {
|
|
207
|
+
return response.generatedSamples[0];
|
|
208
|
+
}
|
|
209
|
+
return response.generatedSamples.find(sample => sample.generationString.startsWith(completionHint)) ??
|
|
210
|
+
response.generatedSamples[0];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
clearCache(): void {
|
|
214
|
+
this.#aiCodeCompletion?.clearCachedRequest();
|
|
215
|
+
}
|
|
69
216
|
}
|
|
@@ -24,6 +24,10 @@ export class ComputedStyleTrace extends HTMLElement {
|
|
|
24
24
|
#onNavigateToSource: ((event?: Event) => void) = () => {};
|
|
25
25
|
#ruleOriginNode?: Node;
|
|
26
26
|
|
|
27
|
+
connectedCallback(): void {
|
|
28
|
+
this.#render();
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
set data(data: ComputedStyleTraceData) {
|
|
28
32
|
this.#selector = data.selector;
|
|
29
33
|
this.#active = data.active;
|
|
@@ -303,7 +303,7 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
303
303
|
data-crumb="true"
|
|
304
304
|
>
|
|
305
305
|
<a href="#" draggable=false class="crumb-link"
|
|
306
|
-
jslog=${VisualLogging.item().track({click:true})}
|
|
306
|
+
jslog=${VisualLogging.item().track({click:true, resize:true})}
|
|
307
307
|
@click=${this.#onCrumbClick(crumb.node)}
|
|
308
308
|
@mousemove=${this.#onCrumbMouseMove(crumb.node)}
|
|
309
309
|
@mouseleave=${this.#onCrumbMouseLeave(crumb.node)}
|
|
@@ -194,7 +194,8 @@ export class StylePropertyEditor extends HTMLElement {
|
|
|
194
194
|
return html`
|
|
195
195
|
<button title=${title}
|
|
196
196
|
class=${classes}
|
|
197
|
-
jslog=${
|
|
197
|
+
jslog=${
|
|
198
|
+
VisualLogging.item().track({click: true, resize: true}).context(`${propertyName}-${propertyValue}`)}
|
|
198
199
|
@click=${() => this.#onButtonClick(propertyName, propertyValue, selected)}>
|
|
199
200
|
<devtools-icon style=${transform} name=${iconInfo.iconName}>
|
|
200
201
|
</devtools-icon>
|
|
@@ -8,7 +8,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
10
|
|
|
11
|
-
import
|
|
11
|
+
import * as Elements from './elements.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/**
|
|
@@ -614,10 +614,8 @@ UI.ViewManager.registerLocationResolver({
|
|
|
614
614
|
Common.Revealer.registerRevealer({
|
|
615
615
|
contextTypes() {
|
|
616
616
|
return [
|
|
617
|
-
SDK.DOMModel.DOMNode,
|
|
618
|
-
|
|
619
|
-
SDK.RemoteObject.RemoteObject,
|
|
620
|
-
SDK.DOMModel.AdoptedStyleSheet,
|
|
617
|
+
SDK.DOMModel.DOMNode, SDK.DOMModel.DeferredDOMNode, SDK.RemoteObject.RemoteObject, SDK.DOMModel.AdoptedStyleSheet,
|
|
618
|
+
Elements.ElementsPanel.NodeComputedStyles
|
|
621
619
|
];
|
|
622
620
|
},
|
|
623
621
|
destination: Common.Revealer.RevealerDestination.ELEMENTS_PANEL,
|
|
@@ -54,6 +54,7 @@ import * as NodeStackTraceWidget from './NodeStackTraceWidget.js';
|
|
|
54
54
|
import * as PlatformFontsWidget from './PlatformFontsWidget.js';
|
|
55
55
|
import * as PropertiesWidget from './PropertiesWidget.js';
|
|
56
56
|
import * as PropertyRenderer from './PropertyRenderer.js';
|
|
57
|
+
import * as StandaloneStylesContainer from './StandaloneStylesContainer.js';
|
|
57
58
|
import * as StyleEditorWidget from './StyleEditorWidget.js';
|
|
58
59
|
import * as StylePropertiesSection from './StylePropertiesSection.js';
|
|
59
60
|
import * as StylePropertyHighlighter from './StylePropertyHighlighter.js';
|
|
@@ -90,6 +91,7 @@ export {
|
|
|
90
91
|
PlatformFontsWidget,
|
|
91
92
|
PropertiesWidget,
|
|
92
93
|
PropertyRenderer,
|
|
94
|
+
StandaloneStylesContainer,
|
|
93
95
|
StyleEditorWidget,
|
|
94
96
|
StylePropertiesSection,
|
|
95
97
|
StylePropertyHighlighter,
|
|
@@ -197,7 +197,7 @@ export class LighthouseReportRenderer {
|
|
|
197
197
|
continue;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
auditEl.setAttribute('jslog', `${VisualLogging.item(`lighthouse.audit.${id}`)}`);
|
|
200
|
+
auditEl.setAttribute('jslog', `${VisualLogging.item(`lighthouse.audit.${id}`).track({resize: true})}`);
|
|
201
201
|
|
|
202
202
|
let state: string|undefined;
|
|
203
203
|
for (const className of auditEl.classList) {
|
|
@@ -60,7 +60,7 @@ function renderEndiannessSetting(
|
|
|
60
60
|
data-endianness="true" @change=${(e: Event) => onEndiannessChanged((e.target as HTMLSelectElement).value as Endianness)}>
|
|
61
61
|
${[Endianness.LITTLE, Endianness.BIG].map(endianness => {
|
|
62
62
|
return html`<option value=${endianness} .selected=${currentEndiannes === endianness}
|
|
63
|
-
jslog=${VisualLogging.item(Platform.StringUtilities.toKebabCase(endianness)).track({click: true})}>${
|
|
63
|
+
jslog=${VisualLogging.item(Platform.StringUtilities.toKebabCase(endianness)).track({click: true, resize: true})}>${
|
|
64
64
|
i18n.i18n.lockedString(endianness)}</option>`;
|
|
65
65
|
})}
|
|
66
66
|
</select>
|