chrome-devtools-frontend 1.0.1578486 → 1.0.1578729
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/common/Revealer.ts +0 -5
- package/front_end/core/sdk/ConsoleModel.ts +0 -3
- package/front_end/models/ai_assistance/AiConversation.ts +42 -22
- package/front_end/models/issues_manager/CookieIssue.ts +0 -1
- package/front_end/models/issues_manager/IssuesManager.ts +2 -15
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +17 -25
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +0 -5
- package/front_end/panels/console/ConsoleViewMessage.ts +0 -32
- package/front_end/panels/console/consoleView.css +0 -5
- package/front_end/panels/media/PlayerListView.ts +13 -1
- package/front_end/panels/media/playerListView.css +5 -0
- package/front_end/panels/network/NetworkItemView.ts +2 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +17 -6
- package/front_end/panels/network/RequestInitiatorView.ts +20 -4
- package/front_end/panels/network/RequestPayloadView.ts +253 -280
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +3 -3
- package/front_end/panels/network/requestPayloadTree.css +6 -3
- package/front_end/panels/network/requestPayloadView.css +1 -0
- package/front_end/panels/security/SecurityPanel.ts +0 -16
- package/front_end/panels/security/security-meta.ts +1 -15
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +6 -5
- package/front_end/ui/legacy/Treeoutline.ts +81 -22
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -1
- package/front_end/ui/legacy/softDropDown.css +7 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +1 -1
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
6
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
6
|
import * as Root from '../../core/root/root.js';
|
|
8
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
8
|
|
|
10
|
-
import * as Security from './security.js';
|
|
9
|
+
import type * as Security from './security.js';
|
|
11
10
|
|
|
12
11
|
const UIStrings = {
|
|
13
12
|
/**
|
|
@@ -55,16 +54,3 @@ UI.ViewManager.registerViewExtension({
|
|
|
55
54
|
return Security.SecurityPanel.SecurityPanel.instance();
|
|
56
55
|
},
|
|
57
56
|
});
|
|
58
|
-
|
|
59
|
-
Common.Revealer.registerRevealer({
|
|
60
|
-
contextTypes() {
|
|
61
|
-
return [
|
|
62
|
-
Security.CookieReportView.CookieReportView,
|
|
63
|
-
];
|
|
64
|
-
},
|
|
65
|
-
destination: Common.Revealer.RevealerDestination.SECURITY_PANEL,
|
|
66
|
-
async loadRevealer() {
|
|
67
|
-
const Security = await loadSecurityModule();
|
|
68
|
-
return new Security.SecurityPanel.SecurityRevealer();
|
|
69
|
-
},
|
|
70
|
-
});
|
|
@@ -178,7 +178,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
|
178
178
|
</div>
|
|
179
179
|
${this.list.element}
|
|
180
180
|
<div class='show-more-message hidden' ${ref(showMoreRef)}>
|
|
181
|
-
<
|
|
181
|
+
<button class='link' @click=${onShowMoreClicked}>${i18nString(UIStrings.showMore)}</button>
|
|
182
182
|
</div>
|
|
183
183
|
`, this.contentElement);
|
|
184
184
|
// clang-format on
|
|
@@ -126,7 +126,7 @@ export class Button extends HTMLElement {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
override cloneNode(deep?: boolean): Node {
|
|
129
|
-
const node =
|
|
129
|
+
const node = document.importNode(this, deep);
|
|
130
130
|
Object.assign(node.#props, this.#props);
|
|
131
131
|
node.#render();
|
|
132
132
|
return node;
|
|
@@ -155,6 +155,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
155
155
|
private focusRestorer?: WidgetFocusRestorer|null;
|
|
156
156
|
private ownerSplitWidget?: SplitWidget;
|
|
157
157
|
private reloadRequiredInfobar?: Infobar;
|
|
158
|
+
#debuggedTabReloadRequiredInfobar?: Infobar;
|
|
158
159
|
#selectOverrideFolderInfobar?: Infobar;
|
|
159
160
|
#resizeObserver: ResizeObserver;
|
|
160
161
|
#toggleOrientationButton: ToolbarButton;
|
|
@@ -636,7 +637,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
636
637
|
}
|
|
637
638
|
|
|
638
639
|
displayDebuggedTabReloadRequiredWarning(message: string): void {
|
|
639
|
-
if (!this
|
|
640
|
+
if (!this.#debuggedTabReloadRequiredInfobar) {
|
|
640
641
|
const infobar = new Infobar(
|
|
641
642
|
InfobarType.INFO, message,
|
|
642
643
|
[
|
|
@@ -654,9 +655,9 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
654
655
|
undefined, 'reload-required');
|
|
655
656
|
infobar.setParentView(this);
|
|
656
657
|
this.attachInfobar(infobar);
|
|
657
|
-
this
|
|
658
|
+
this.#debuggedTabReloadRequiredInfobar = infobar;
|
|
658
659
|
infobar.setCloseCallback(() => {
|
|
659
|
-
|
|
660
|
+
this.#debuggedTabReloadRequiredInfobar = undefined;
|
|
660
661
|
});
|
|
661
662
|
|
|
662
663
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
@@ -666,8 +667,8 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
666
667
|
}
|
|
667
668
|
|
|
668
669
|
removeDebuggedTabReloadRequiredWarning(): void {
|
|
669
|
-
if (this
|
|
670
|
-
this.
|
|
670
|
+
if (this.#debuggedTabReloadRequiredInfobar) {
|
|
671
|
+
this.#debuggedTabReloadRequiredInfobar.dispose();
|
|
671
672
|
SDK.TargetManager.TargetManager.instance().removeModelListener(
|
|
672
673
|
SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
|
|
673
674
|
this.removeDebuggedTabReloadRequiredWarning, this);
|
|
@@ -1535,6 +1535,7 @@ export class TreeSearch < NodeT extends TreeNode<NodeT>,
|
|
|
1535
1535
|
}
|
|
1536
1536
|
|
|
1537
1537
|
class TreeViewTreeElement extends TreeElement {
|
|
1538
|
+
static readonly CLONED_ATTRIBUTES = SDK.DOMModel.ARIA_ATTRIBUTES.union(new Set(['jslog']));
|
|
1538
1539
|
#clonedAttributes = new Set<string>();
|
|
1539
1540
|
#clonedClasses = new Set<string>();
|
|
1540
1541
|
|
|
@@ -1556,7 +1557,7 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1556
1557
|
this.#clonedClasses.clear();
|
|
1557
1558
|
for (let i = 0; i < this.configElement.attributes.length; ++i) {
|
|
1558
1559
|
const attribute = this.configElement.attributes.item(i);
|
|
1559
|
-
if (attribute && attribute.name !== 'role' &&
|
|
1560
|
+
if (attribute && attribute.name !== 'role' && TreeViewTreeElement.CLONED_ATTRIBUTES.has(attribute.name)) {
|
|
1560
1561
|
this.listItemElement.setAttribute(attribute.name, attribute.value);
|
|
1561
1562
|
this.#clonedAttributes.add(attribute.name);
|
|
1562
1563
|
}
|
|
@@ -1574,6 +1575,8 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1574
1575
|
this.titleElement.appendChild(HTMLElementWithLightDOMTemplate.cloneNode(child));
|
|
1575
1576
|
}
|
|
1576
1577
|
|
|
1578
|
+
this.hidden = hasBooleanAttribute(this.configElement, 'hidden');
|
|
1579
|
+
|
|
1577
1580
|
Highlighting.HighlightManager.HighlightManager.instance().apply(this.titleElement);
|
|
1578
1581
|
}
|
|
1579
1582
|
|
|
@@ -1582,23 +1585,26 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1582
1585
|
}
|
|
1583
1586
|
|
|
1584
1587
|
remove(): void {
|
|
1585
|
-
|
|
1586
|
-
if (parent) {
|
|
1587
|
-
parent.removeChild(this);
|
|
1588
|
-
parent.setExpandable(parent.children().length > 0);
|
|
1589
|
-
}
|
|
1588
|
+
removeNode(this);
|
|
1590
1589
|
TreeViewTreeElement.#elementToTreeElement.delete(this.configElement);
|
|
1591
1590
|
}
|
|
1592
1591
|
}
|
|
1593
1592
|
|
|
1594
|
-
function getTreeNodes(nodeList: NodeList|Node[]): HTMLLIElement
|
|
1593
|
+
function getTreeNodes(nodeList: NodeList|Node[]): Array<HTMLLIElement|TreeElementWrapper> {
|
|
1595
1594
|
return nodeList.values()
|
|
1596
1595
|
.flatMap(node => {
|
|
1596
|
+
if (node instanceof TreeElementWrapper) {
|
|
1597
|
+
return [node];
|
|
1598
|
+
}
|
|
1597
1599
|
if (node instanceof HTMLLIElement && node.role === 'treeitem') {
|
|
1598
|
-
return [
|
|
1600
|
+
return [
|
|
1601
|
+
node,
|
|
1602
|
+
...node.querySelectorAll<HTMLLIElement|TreeElementWrapper>(
|
|
1603
|
+
'ul[role="group"] li[role="treeitem"],ul[role="group"] devtools-tree-wrapper')
|
|
1604
|
+
];
|
|
1599
1605
|
}
|
|
1600
1606
|
if (node instanceof HTMLElement) {
|
|
1601
|
-
return node.querySelectorAll<HTMLLIElement>('li[role="treeitem"]');
|
|
1607
|
+
return node.querySelectorAll<HTMLLIElement|TreeElementWrapper>('li[role="treeitem"],devtools-tree-wrapper');
|
|
1602
1608
|
}
|
|
1603
1609
|
return [];
|
|
1604
1610
|
})
|
|
@@ -1617,6 +1623,14 @@ function getStyleElements(nodes: NodeList|Node[]): HTMLElement[] {
|
|
|
1617
1623
|
});
|
|
1618
1624
|
}
|
|
1619
1625
|
|
|
1626
|
+
function removeNode(node: TreeElement): void {
|
|
1627
|
+
const parent = node.parent;
|
|
1628
|
+
if (parent) {
|
|
1629
|
+
parent.removeChild(node);
|
|
1630
|
+
parent.setExpandable(parent.children().length > 0);
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1620
1634
|
/**
|
|
1621
1635
|
* A tree element that can be used as progressive enhancement over a <ul> element. A `template` IDL attribute allows
|
|
1622
1636
|
* additionally to insert the <ul> into a <template>, avoiding rendering anything into light DOM, which is recommended.
|
|
@@ -1683,7 +1697,7 @@ function getStyleElements(nodes: NodeList|Node[]): HTMLElement[] {
|
|
|
1683
1697
|
* @attribute hide-overflow
|
|
1684
1698
|
*/
|
|
1685
1699
|
export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
1686
|
-
static readonly observedAttributes = ['navigation-variant', 'hide-overflow'];
|
|
1700
|
+
static readonly observedAttributes = ['navigation-variant', 'hide-overflow', 'dense'];
|
|
1687
1701
|
readonly #treeOutline = new TreeOutlineInShadow(undefined, this);
|
|
1688
1702
|
|
|
1689
1703
|
constructor() {
|
|
@@ -1710,7 +1724,7 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1710
1724
|
return this.#treeOutline;
|
|
1711
1725
|
}
|
|
1712
1726
|
|
|
1713
|
-
#getParentTreeElement(element: HTMLLIElement): {treeElement: TreeElement, expanded: boolean}|null {
|
|
1727
|
+
#getParentTreeElement(element: HTMLLIElement|TreeElementWrapper): {treeElement: TreeElement, expanded: boolean}|null {
|
|
1714
1728
|
const subtreeRoot = element.parentElement;
|
|
1715
1729
|
if (!(subtreeRoot instanceof HTMLUListElement)) {
|
|
1716
1730
|
return null;
|
|
@@ -1765,15 +1779,25 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1765
1779
|
}
|
|
1766
1780
|
const nextElement = nextSibling ? TreeViewTreeElement.get(nextSibling) : null;
|
|
1767
1781
|
const index = nextElement ? parent.treeElement.indexOfChild(nextElement) : parent.treeElement.children().length;
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1782
|
+
let treeElement;
|
|
1783
|
+
if (node instanceof HTMLLIElement) {
|
|
1784
|
+
treeElement = new TreeViewTreeElement(this.#treeOutline, node);
|
|
1785
|
+
const expandable = Boolean(node.querySelector('ul[role="group"]'));
|
|
1786
|
+
treeElement.setExpandable(expandable);
|
|
1787
|
+
} else {
|
|
1788
|
+
treeElement = node.treeElement;
|
|
1774
1789
|
}
|
|
1775
|
-
if (
|
|
1776
|
-
|
|
1790
|
+
if (treeElement) {
|
|
1791
|
+
if (treeElement.parent) {
|
|
1792
|
+
removeNode(treeElement);
|
|
1793
|
+
}
|
|
1794
|
+
parent.treeElement.insertChild(treeElement, index);
|
|
1795
|
+
if (hasBooleanAttribute(node, 'selected')) {
|
|
1796
|
+
treeElement.revealAndSelect(true);
|
|
1797
|
+
}
|
|
1798
|
+
if (parent.expanded) {
|
|
1799
|
+
parent.treeElement.expand();
|
|
1800
|
+
}
|
|
1777
1801
|
}
|
|
1778
1802
|
}
|
|
1779
1803
|
for (const element of getStyleElements(nodes)) {
|
|
@@ -1783,7 +1807,11 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1783
1807
|
|
|
1784
1808
|
protected override removeNodes(nodes: NodeList): void {
|
|
1785
1809
|
for (const node of getTreeNodes(nodes)) {
|
|
1786
|
-
|
|
1810
|
+
if (node instanceof HTMLLIElement) {
|
|
1811
|
+
TreeViewTreeElement.get(node)?.remove();
|
|
1812
|
+
} else if (node.treeElement) {
|
|
1813
|
+
removeNode(node.treeElement);
|
|
1814
|
+
}
|
|
1787
1815
|
}
|
|
1788
1816
|
}
|
|
1789
1817
|
|
|
@@ -1803,16 +1831,29 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1803
1831
|
return hasBooleanAttribute(this, 'navigation-variant');
|
|
1804
1832
|
}
|
|
1805
1833
|
|
|
1834
|
+
set dense(dense: boolean) {
|
|
1835
|
+
this.toggleAttribute('dense', dense);
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
get dense(): boolean {
|
|
1839
|
+
return hasBooleanAttribute(this, 'dense');
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1806
1842
|
attributeChangedCallback(name: string, oldValue: string|null, newValue: string|null): void {
|
|
1807
1843
|
if (oldValue === newValue) {
|
|
1808
1844
|
return;
|
|
1809
1845
|
}
|
|
1846
|
+
const booleanValueIsTrue = newValue !== null && newValue !== 'false';
|
|
1810
1847
|
switch (name) {
|
|
1811
1848
|
case 'navigation-variant':
|
|
1812
|
-
this.#treeOutline.setVariant(
|
|
1849
|
+
this.#treeOutline.setVariant(booleanValueIsTrue ? TreeVariant.NAVIGATION_TREE : TreeVariant.OTHER);
|
|
1813
1850
|
break;
|
|
1814
1851
|
case 'hide-overflow':
|
|
1815
|
-
this.#treeOutline.setHideOverflow(
|
|
1852
|
+
this.#treeOutline.setHideOverflow(booleanValueIsTrue);
|
|
1853
|
+
break;
|
|
1854
|
+
case 'dense':
|
|
1855
|
+
this.#treeOutline.setDense(booleanValueIsTrue);
|
|
1856
|
+
break;
|
|
1816
1857
|
}
|
|
1817
1858
|
}
|
|
1818
1859
|
}
|
|
@@ -1831,11 +1872,29 @@ export namespace TreeViewElement {
|
|
|
1831
1872
|
}
|
|
1832
1873
|
}
|
|
1833
1874
|
|
|
1875
|
+
export class TreeElementWrapper extends HTMLElement {
|
|
1876
|
+
#treeElement?: TreeElement;
|
|
1877
|
+
set treeElement(treeElement: TreeElement) {
|
|
1878
|
+
if (this.#treeElement?.parent) {
|
|
1879
|
+
const parent = this.#treeElement.parent;
|
|
1880
|
+
const index = parent.indexOfChild(this.#treeElement);
|
|
1881
|
+
parent.removeChildAtIndex(index);
|
|
1882
|
+
parent.insertChild(treeElement, index);
|
|
1883
|
+
}
|
|
1884
|
+
this.#treeElement = treeElement;
|
|
1885
|
+
}
|
|
1886
|
+
get treeElement(): TreeElement|undefined {
|
|
1887
|
+
return this.#treeElement;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1834
1891
|
customElements.define('devtools-tree', TreeViewElement);
|
|
1892
|
+
customElements.define('devtools-tree-wrapper', TreeElementWrapper);
|
|
1835
1893
|
|
|
1836
1894
|
declare global {
|
|
1837
1895
|
interface HTMLElementTagNameMap {
|
|
1838
1896
|
'devtools-tree': TreeViewElement;
|
|
1897
|
+
'devtools-tree-wrapper': TreeElementWrapper;
|
|
1839
1898
|
}
|
|
1840
1899
|
}
|
|
1841
1900
|
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
.item.highlighted {
|
|
19
19
|
background-color: var(--sys-color-state-hover-on-subtle);
|
|
20
|
+
outline: var(--sys-size-2) solid var(--sys-color-primary);
|
|
21
|
+
outline-offset: calc(-1 * var(--sys-size-2));
|
|
22
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
@media (forced-colors: active) {
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
.item-list {
|
|
28
|
-
border:
|
|
31
|
+
border: var(--sys-size-1) solid ButtonText;
|
|
29
32
|
background-color: ButtonFace;
|
|
30
33
|
}
|
|
31
34
|
|
|
@@ -33,5 +36,8 @@
|
|
|
33
36
|
forced-color-adjust: none;
|
|
34
37
|
color: HighlightText;
|
|
35
38
|
background-color: Highlight;
|
|
39
|
+
outline: var(--sys-size-2) solid Highlight;
|
|
40
|
+
outline-offset: calc(-1 * var(--sys-size-2));
|
|
41
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
36
42
|
}
|
|
37
43
|
}
|
|
@@ -3167,6 +3167,9 @@ export const knownContextValues = new Set([
|
|
|
3167
3167
|
'request-header-sec-fetch-mode',
|
|
3168
3168
|
'request-header-user-agent',
|
|
3169
3169
|
'request-headers',
|
|
3170
|
+
'request-info-form-data-category-expanded',
|
|
3171
|
+
'request-info-query-string-category-expanded',
|
|
3172
|
+
'request-info-request-payload-category-expanded',
|
|
3170
3173
|
'request-payload',
|
|
3171
3174
|
'request-types',
|
|
3172
3175
|
'required',
|
package/mcp/mcp.ts
CHANGED
|
@@ -23,9 +23,11 @@ export type * as CDPConnection from '../front_end/core/protocol_client/CDPConnec
|
|
|
23
23
|
export {ConnectionTransport} from '../front_end/core/protocol_client/ConnectionTransport.js';
|
|
24
24
|
export * as ProtocolClient from '../front_end/core/protocol_client/protocol_client.js';
|
|
25
25
|
export {DebuggerModel} from '../front_end/core/sdk/DebuggerModel.js';
|
|
26
|
+
export {RuntimeModel} from '../front_end/core/sdk/RuntimeModel.js';
|
|
26
27
|
export {Target} from '../front_end/core/sdk/Target.js';
|
|
27
28
|
export {TargetManager} from '../front_end/core/sdk/TargetManager.js';
|
|
28
29
|
export * as Foundation from '../front_end/foundation/foundation.js';
|
|
30
|
+
export * as Protocol from '../front_end/generated/protocol.js';
|
|
29
31
|
export {
|
|
30
32
|
PerformanceInsightFormatter
|
|
31
33
|
} from '../front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.js';
|
package/package.json
CHANGED