chrome-devtools-frontend 1.0.1682249 → 1.0.1684555
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/AUTHORS +1 -0
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -7
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -6
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +2 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +6 -4
- package/front_end/entrypoints/main/main-meta.ts +9 -51
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +12 -22
- package/front_end/generated/protocol-mapping.d.ts +9 -59
- package/front_end/generated/protocol-proxy-api.d.ts +7 -47
- package/front_end/generated/protocol.ts +105 -330
- package/front_end/models/ai_assistance/AiAgent2.ts +12 -4
- package/front_end/models/ai_assistance/AiConversation.ts +25 -7
- package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -19
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +6 -6
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +12 -6
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +1 -1
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +5 -8
- package/front_end/models/ai_assistance/tools/Tool.ts +19 -6
- package/front_end/models/issues_manager/DOMIssuesManager.ts +144 -0
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +13 -1
- package/front_end/models/issues_manager/GenericIssue.ts +14 -2
- package/front_end/models/issues_manager/IssuesManager.ts +0 -1
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/trace/Processor.ts +1 -0
- package/front_end/panels/ai_assistance/ExternalHandler.ts +89 -0
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/application/BackgroundServiceModel.ts +4 -3
- package/front_end/panels/application/IndexedDBModel.ts +0 -7
- package/front_end/panels/console/ConsoleView.ts +17 -16
- package/front_end/panels/console/ConsoleViewMessage.ts +4 -1
- package/front_end/panels/console/console-meta.ts +4 -19
- package/front_end/panels/elements/ElementIssueUtils.ts +10 -2
- package/front_end/panels/elements/ElementsPanel.ts +8 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +82 -161
- package/front_end/panels/elements/ElementsTreeOutline.ts +26 -105
- package/front_end/panels/elements/StandaloneStylesContainer.ts +5 -11
- package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -0
- package/front_end/panels/elements/StylesContainer.ts +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +174 -151
- package/front_end/panels/network/RequestPayloadView.ts +5 -2
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -32
- package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -2
- package/front_end/panels/sources/SourcesPanel.ts +6 -3
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +2 -6
- package/front_end/panels/timeline/components/CWVMetrics.ts +9 -10
- package/front_end/panels/timeline/components/DetailsView.ts +12 -16
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +13 -13
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +19 -19
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +7 -9
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +3 -3
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +13 -13
- package/front_end/panels/timeline/components/LiveMetricsView.ts +64 -64
- package/front_end/panels/timeline/components/MetricCard.ts +25 -25
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +22 -22
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +9 -9
- package/front_end/panels/timeline/components/OriginMap.ts +7 -7
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +2 -2
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +19 -20
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
- package/front_end/panels/timeline/components/TimelineSummary.ts +2 -2
- package/front_end/panels/timeline/components/Utils.ts +2 -6
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +6 -9
- package/front_end/panels/timeline/components/insights/Checklist.ts +2 -2
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +94 -0
- package/front_end/ui/comments/CommentOverlayManager.ts +16 -32
- package/front_end/ui/components/text_editor/config.ts +2 -1
- package/front_end/ui/legacy/DockController.ts +4 -1
- package/front_end/ui/legacy/InspectorView.ts +3 -1
- package/front_end/ui/legacy/KeyboardShortcut.ts +4 -7
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +6 -3
- package/front_end/ui/legacy/UIUtils.ts +10 -6
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +23 -24
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +14 -15
- package/front_end/ui/legacy/components/perf_ui/GCActionDelegate.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/NetworkPriorities.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +4 -6
- package/front_end/ui/legacy/components/source_frame/FontView.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +13 -13
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -18
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +10 -10
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +5 -2
- package/front_end/ui/settings/ConsoleSettings.ts +32 -0
- package/front_end/ui/settings/InspectorMainSettings.ts +7 -0
- package/front_end/ui/settings/MainSettings.ts +80 -0
- package/front_end/ui/settings/settings.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -39,7 +39,6 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
39
39
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
40
40
|
import * as Badges from '../../models/badges/badges.js';
|
|
41
41
|
import * as Elements from '../../models/elements/elements.js';
|
|
42
|
-
import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
43
42
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
44
43
|
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
45
44
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
@@ -176,8 +175,27 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
176
175
|
return null;
|
|
177
176
|
}
|
|
178
177
|
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
178
|
+
const listItem = UI.UIUtils.enclosingNodeOrSelfWithNodeName(hoveredNode, 'li');
|
|
179
|
+
if (!listItem) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
const treeElement =
|
|
183
|
+
UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem) as ElementsTreeElement | undefined;
|
|
184
|
+
const node = treeElement?.node();
|
|
185
|
+
if (!node) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
let issues = treeElement?.widget?.issues ?? [];
|
|
189
|
+
if (hoveredNode.classList.contains('webkit-html-attribute-name')) {
|
|
190
|
+
const attrName = hoveredNode.textContent;
|
|
191
|
+
issues = issues.filter(issue => getElementIssueDetails(issue)?.attribute === attrName);
|
|
192
|
+
} else if (hoveredNode.classList.contains('webkit-html-tag-name')) {
|
|
193
|
+
issues = issues.filter(issue => {
|
|
194
|
+
const details = getElementIssueDetails(issue);
|
|
195
|
+
return Boolean(details && !details.attribute);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
if (issues.length === 0) {
|
|
181
199
|
return null;
|
|
182
200
|
}
|
|
183
201
|
|
|
@@ -419,12 +437,15 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
419
437
|
};
|
|
420
438
|
#highlightThrottler = new Common.Throttler.Throttler(100);
|
|
421
439
|
|
|
422
|
-
constructor(
|
|
440
|
+
constructor(
|
|
441
|
+
element?: HTMLElement,
|
|
442
|
+
view: View = DEFAULT_VIEW,
|
|
443
|
+
) {
|
|
423
444
|
super(element, {
|
|
424
445
|
useShadowDom: false,
|
|
425
446
|
delegatesFocus: false,
|
|
426
447
|
});
|
|
427
|
-
this.#view = view
|
|
448
|
+
this.#view = view;
|
|
428
449
|
this.#showHTMLCommentsSetting.addChangeListener(this.#onShowHTMLCommentsChange, this);
|
|
429
450
|
if (Common.Settings.Settings.instance().moduleSetting('highlight-node-on-hover-in-overlay').get()) {
|
|
430
451
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
@@ -714,8 +735,6 @@ export class ElementsTreeOutline extends
|
|
|
714
735
|
private dragOverTreeElement?: ElementsTreeElement;
|
|
715
736
|
private updateModifiedNodesTimeout?: number;
|
|
716
737
|
#topLayerContainerByDocument = new WeakMap<SDK.DOMModel.DOMDocument, TopLayerContainer>();
|
|
717
|
-
#issuesManager?: IssuesManager.IssuesManager.IssuesManager;
|
|
718
|
-
#nodeElementToIssues = new Map<Element, IssuesManager.Issue.Issue[]>();
|
|
719
738
|
maxTreeDepth?: number;
|
|
720
739
|
enableContextMenu: boolean;
|
|
721
740
|
showComments: boolean;
|
|
@@ -731,11 +750,6 @@ export class ElementsTreeOutline extends
|
|
|
731
750
|
expandRoot?: boolean) {
|
|
732
751
|
super();
|
|
733
752
|
|
|
734
|
-
this.#issuesManager = IssuesManager.IssuesManager.IssuesManager.instance();
|
|
735
|
-
this.#issuesManager.addEventListener(IssuesManager.IssuesManager.Events.ISSUE_ADDED, this.#onIssueAdded, this);
|
|
736
|
-
this.#issuesManager.addEventListener(
|
|
737
|
-
IssuesManager.IssuesManager.Events.ISSUE_HIDDEN_STATUS_UPDATED, this.#onIssueHiddenStatusUpdated, this);
|
|
738
|
-
|
|
739
753
|
this.treeElementByNode = new WeakMap();
|
|
740
754
|
const shadowContainer = document.createElement('div');
|
|
741
755
|
this.shadowRoot = UI.UIUtils.createShadowRootWithCoreStyles(
|
|
@@ -792,86 +806,6 @@ export class ElementsTreeOutline extends
|
|
|
792
806
|
return elementsTreeOutlineByDOMModel.get(domModel) || null;
|
|
793
807
|
}
|
|
794
808
|
|
|
795
|
-
#onIssueAdded(event: Common.EventTarget.EventTargetEvent<IssuesManager.IssuesManager.IssueAddedEvent>): void {
|
|
796
|
-
void this.#addTreeElementIssue(event.data.issue);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
#onIssueHiddenStatusUpdated(
|
|
800
|
-
event: Common.EventTarget.EventTargetEvent<IssuesManager.IssuesManager.IssueHiddenStatusUpdatedEvent>): void {
|
|
801
|
-
const issue = event.data.issue;
|
|
802
|
-
if (!issue) {
|
|
803
|
-
return;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
if (issue.isHidden()) {
|
|
807
|
-
void this.#removeTreeElementIssue(issue);
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
void this.#addTreeElementIssue(issue);
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
#addAllElementIssues(): void {
|
|
814
|
-
if (!this.#issuesManager) {
|
|
815
|
-
return;
|
|
816
|
-
}
|
|
817
|
-
for (const issue of this.#issuesManager.issues()) {
|
|
818
|
-
void this.#addTreeElementIssue(issue);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
async #addTreeElementIssue(issue: IssuesManager.Issue.Issue): Promise<void> {
|
|
823
|
-
if (issue.isHidden()) {
|
|
824
|
-
return;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
const elementIssueDetails = getElementIssueDetails(issue);
|
|
828
|
-
if (!elementIssueDetails) {
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
const {nodeId} = elementIssueDetails;
|
|
832
|
-
if (!this.rootDOMNode || !nodeId) {
|
|
833
|
-
return;
|
|
834
|
-
}
|
|
835
|
-
const deferredDOMNode = new SDK.DOMModel.DeferredDOMNode(this.rootDOMNode.domModel().target(), nodeId);
|
|
836
|
-
const node = await deferredDOMNode.resolvePromise();
|
|
837
|
-
|
|
838
|
-
if (!node) {
|
|
839
|
-
return;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
const treeElement = this.findTreeElement(node);
|
|
843
|
-
if (treeElement) {
|
|
844
|
-
treeElement.addIssue(issue);
|
|
845
|
-
const treeElementNodeElementsToIssues = treeElement.issuesByNodeElement;
|
|
846
|
-
// This element could be the treeElement tags name or an attribute.
|
|
847
|
-
for (const [element, issues] of treeElementNodeElementsToIssues) {
|
|
848
|
-
this.#nodeElementToIssues.set(element, issues);
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
async #removeTreeElementIssue(issue: IssuesManager.Issue.Issue): Promise<void> {
|
|
854
|
-
const elementIssueDetails = getElementIssueDetails(issue);
|
|
855
|
-
if (!elementIssueDetails) {
|
|
856
|
-
return;
|
|
857
|
-
}
|
|
858
|
-
const {nodeId} = elementIssueDetails;
|
|
859
|
-
if (!this.rootDOMNode || !nodeId) {
|
|
860
|
-
return;
|
|
861
|
-
}
|
|
862
|
-
const deferredDOMNode = new SDK.DOMModel.DeferredDOMNode(this.rootDOMNode.domModel().target(), nodeId);
|
|
863
|
-
const node = await deferredDOMNode.resolvePromise();
|
|
864
|
-
|
|
865
|
-
if (!node) {
|
|
866
|
-
return;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
const treeElement = this.findTreeElement(node);
|
|
870
|
-
if (treeElement) {
|
|
871
|
-
treeElement.removeIssue(issue);
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
|
|
875
809
|
deindentSingleNode(): void {
|
|
876
810
|
const firstChild = this.firstChild();
|
|
877
811
|
if (!firstChild || (firstChild && !firstChild.isExpandable())) {
|
|
@@ -879,18 +813,6 @@ export class ElementsTreeOutline extends
|
|
|
879
813
|
}
|
|
880
814
|
}
|
|
881
815
|
|
|
882
|
-
updateNodeElementToIssue(element: Element, issues: IssuesManager.Issue.Issue[]): void {
|
|
883
|
-
if (!issues || issues.length === 0) {
|
|
884
|
-
this.#nodeElementToIssues.delete(element);
|
|
885
|
-
return;
|
|
886
|
-
}
|
|
887
|
-
this.#nodeElementToIssues.set(element, issues);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
issuesByNodeElement(element: Element): IssuesManager.Issue.Issue[]|undefined {
|
|
891
|
-
return this.#nodeElementToIssues.get(element);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
816
|
setWordWrap(wrap: boolean): void {
|
|
895
817
|
this.elementInternal.classList.toggle('elements-tree-nowrap', !wrap);
|
|
896
818
|
}
|
|
@@ -1720,7 +1642,6 @@ export class ElementsTreeOutline extends
|
|
|
1720
1642
|
this.reset();
|
|
1721
1643
|
if (domModel.existingDocument()) {
|
|
1722
1644
|
this.rootDOMNode = domModel.existingDocument();
|
|
1723
|
-
this.#addAllElementIssues();
|
|
1724
1645
|
}
|
|
1725
1646
|
}
|
|
1726
1647
|
|
|
@@ -68,17 +68,8 @@ export class StandaloneStylesContainer extends Common.ObjectWrapper.eventMixin<E
|
|
|
68
68
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
69
69
|
super(element, {useShadowDom: true});
|
|
70
70
|
this.#view = view;
|
|
71
|
-
this.#computedStyleModelInternal.addEventListener(
|
|
72
|
-
|
|
73
|
-
this.#computedStyleModelInternal.addEventListener(
|
|
74
|
-
ComputedStyle.ComputedStyleModel.Events.COMPUTED_STYLE_CHANGED, this.#onComputedStyleChanged, this);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#onComputedStyleChanged(): void {
|
|
78
|
-
if (this.isEditingStyle || this.userOperation) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
this.#rebuildAndUpdate();
|
|
71
|
+
this.#computedStyleModelInternal.addEventListener(ComputedStyle.ComputedStyleModel.Events.CSS_MODEL_CHANGED,
|
|
72
|
+
this.#onCSSModelChanged, this);
|
|
82
73
|
}
|
|
83
74
|
|
|
84
75
|
#rebuildAndUpdate(): void {
|
|
@@ -238,6 +229,9 @@ export class StandaloneStylesContainer extends Common.ObjectWrapper.eventMixin<E
|
|
|
238
229
|
this.isEditingStyle = editing;
|
|
239
230
|
}
|
|
240
231
|
|
|
232
|
+
suppressResets(): void {
|
|
233
|
+
}
|
|
234
|
+
|
|
241
235
|
setUserOperation(userOperation: boolean): void {
|
|
242
236
|
this.userOperation = userOperation;
|
|
243
237
|
}
|
|
@@ -2361,6 +2361,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
|
|
2363
2363
|
this.#stylesContainer.setUserOperation(true);
|
|
2364
|
+
this.#stylesContainer.suppressResets();
|
|
2364
2365
|
const success = await this.property.setDisabled(disabled);
|
|
2365
2366
|
this.#stylesContainer.setUserOperation(false);
|
|
2366
2367
|
|
|
@@ -3652,6 +3653,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3652
3653
|
|
|
3653
3654
|
const currentNode = this.#stylesContainer.node();
|
|
3654
3655
|
this.#stylesContainer.setUserOperation(true);
|
|
3656
|
+
this.#stylesContainer.suppressResets();
|
|
3655
3657
|
|
|
3656
3658
|
styleText += Platform.StringUtilities.findUnclosedCssQuote(styleText);
|
|
3657
3659
|
styleText += ')'.repeat(Platform.StringUtilities.countUnmatchedLeftParentheses(styleText));
|