chrome-devtools-frontend 1.0.1542501 → 1.0.1543472
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/common/Gzip.ts +4 -4
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/host/InspectorFrontendHost.ts +0 -3
- package/front_end/core/root/DevToolsContext.ts +60 -0
- package/front_end/core/root/Runtime.ts +0 -10
- package/front_end/core/root/root.ts +6 -1
- package/front_end/core/sdk/NetworkManager.ts +0 -7
- package/front_end/core/sdk/NetworkRequest.ts +0 -10
- package/front_end/core/sdk/TargetManager.ts +5 -6
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -13
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +5 -5
- package/front_end/entrypoints/main/MainImpl.ts +3 -5
- package/front_end/entrypoints/main/main-meta.ts +1 -5
- package/front_end/foundation/Universe.ts +13 -1
- package/front_end/generated/Deprecation.ts +0 -14
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +0 -1
- package/front_end/models/ai_assistance/BuiltInAi.ts +13 -7
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +14 -9
- package/front_end/models/trace/handlers/SamplesHandler.ts +64 -6
- package/front_end/models/trace/types/TraceEvents.ts +16 -0
- package/front_end/models/workspace/IgnoreListManager.ts +10 -9
- package/front_end/models/workspace/WorkspaceImpl.ts +5 -10
- package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -1
- package/front_end/panels/application/OpenedWindowDetailsView.ts +0 -2
- package/front_end/panels/application/ServiceWorkersView.ts +0 -2
- package/front_end/panels/application/StorageView.ts +0 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +12 -9
- package/front_end/panels/application/components/FrameDetailsView.ts +468 -447
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +12 -7
- package/front_end/panels/console/ConsoleViewMessage.ts +19 -9
- package/front_end/panels/explain/components/ConsoleInsight.ts +314 -310
- package/front_end/panels/network/NetworkDataGridNode.ts +0 -7
- package/front_end/panels/network/NetworkLogView.ts +1 -45
- package/front_end/panels/security/SecurityPanel.ts +0 -2
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -16
- package/front_end/panels/security/security.ts +0 -2
- package/front_end/panels/settings/SettingsScreen.ts +3 -6
- package/front_end/panels/settings/components/SyncSection.ts +218 -226
- package/front_end/panels/settings/components/syncSection.css +81 -80
- package/front_end/panels/sources/DebuggerPlugin.ts +3 -1
- package/front_end/panels/sources/ResourceOriginPlugin.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +0 -21
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/docs/component_docs.ts +0 -4
- package/front_end/ui/components/expandable_list/ExpandableList.docs.ts +30 -0
- package/front_end/ui/components/report_view/ReportView.ts +4 -1
- package/front_end/ui/legacy/ReportView.ts +0 -5
- package/front_end/ui/legacy/TextPrompt.ts +65 -19
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +8 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +90 -92
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +114 -184
- package/front_end/ui/legacy/components/utils/Linkifier.ts +46 -2
- package/front_end/ui/{components/docs/theme_colors/basic.ts → legacy/theme_support/ThemeColors.docs.ts} +33 -23
- package/package.json +1 -1
- package/front_end/core/common/QueryParamHandler.ts +0 -7
- package/front_end/panels/security/IPProtectionTreeElement.ts +0 -21
- package/front_end/panels/security/IPProtectionView.ts +0 -287
- package/front_end/ui/components/docs/expandable_list/basic.html +0 -24
- package/front_end/ui/components/docs/expandable_list/basic.ts +0 -30
- package/front_end/ui/components/docs/input/basic.html +0 -31
- package/front_end/ui/components/docs/input/basic.ts +0 -12
- package/front_end/ui/components/docs/report/basic.html +0 -27
- package/front_end/ui/components/docs/report/basic.ts +0 -48
- package/front_end/ui/components/docs/text_prompt/basic.html +0 -35
- package/front_end/ui/components/docs/text_prompt/basic.ts +0 -19
- package/front_end/ui/components/docs/theme_colors/basic.html +0 -56
- package/front_end/ui/components/docs/toggle_dark_mode.ts +0 -36
- package/front_end/ui/components/docs/toggle_fonts.ts +0 -74
- package/front_end/ui/components/docs/user_agent_client_hints/basic.html +0 -25
- package/front_end/ui/components/docs/user_agent_client_hints/basic.ts +0 -26
|
@@ -75,7 +75,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
75
75
|
private aidaAvailability?: Host.AidaClient.AidaAccessPreconditions;
|
|
76
76
|
private boundOnAidaAvailabilityChange?: () => Promise<void>;
|
|
77
77
|
private aiCodeCompletion?: AiCodeCompletion.AiCodeCompletion.AiCodeCompletion;
|
|
78
|
-
|
|
78
|
+
teaser?: PanelCommon.AiCodeCompletionTeaser;
|
|
79
79
|
private placeholderCompartment: CodeMirror.Compartment = new CodeMirror.Compartment();
|
|
80
80
|
private aiCodeCompletionSetting =
|
|
81
81
|
Common.Settings.Settings.instance().createSetting('ai-code-completion-enabled', false);
|
|
@@ -1324,7 +1324,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1324
1324
|
}
|
|
1325
1325
|
this.updateFilterStatus();
|
|
1326
1326
|
this.#searchableView.updateSearchMatchesCount(this.regexMatchRanges.length);
|
|
1327
|
-
this.
|
|
1327
|
+
this.highlightMatch(this.currentMatchRangeIndex, false); // Re-highlight current match without scrolling.
|
|
1328
1328
|
this.viewport.invalidate();
|
|
1329
1329
|
this.messagesCountElement.setAttribute(
|
|
1330
1330
|
'aria-label', i18nString(UIStrings.filteredMessagesInConsole, {PH1: this.visibleViewMessages.length}));
|
|
@@ -1457,6 +1457,9 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
private async keyDown(event: Event): Promise<void> {
|
|
1460
|
+
if (!this.prompt.teaser?.isShowing()) {
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1460
1463
|
const keyboardEvent = (event as KeyboardEvent);
|
|
1461
1464
|
if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(keyboardEvent)) {
|
|
1462
1465
|
if (keyboardEvent.key === 'i') {
|
|
@@ -1561,7 +1564,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1561
1564
|
|
|
1562
1565
|
this.#searchableView.updateSearchMatchesCount(this.regexMatchRanges.length);
|
|
1563
1566
|
if (typeof this.searchShouldJumpBackwards !== 'undefined' && this.regexMatchRanges.length) {
|
|
1564
|
-
this.
|
|
1567
|
+
this.highlightMatch(this.searchShouldJumpBackwards ? -1 : 0);
|
|
1565
1568
|
delete this.searchShouldJumpBackwards;
|
|
1566
1569
|
}
|
|
1567
1570
|
|
|
@@ -1586,11 +1589,11 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1586
1589
|
}
|
|
1587
1590
|
|
|
1588
1591
|
jumpToNextSearchResult(): void {
|
|
1589
|
-
this.
|
|
1592
|
+
this.highlightMatch(this.currentMatchRangeIndex + 1);
|
|
1590
1593
|
}
|
|
1591
1594
|
|
|
1592
1595
|
jumpToPreviousSearchResult(): void {
|
|
1593
|
-
this.
|
|
1596
|
+
this.highlightMatch(this.currentMatchRangeIndex - 1);
|
|
1594
1597
|
}
|
|
1595
1598
|
|
|
1596
1599
|
supportsCaseSensitiveSearch(): boolean {
|
|
@@ -1605,7 +1608,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1605
1608
|
return true;
|
|
1606
1609
|
}
|
|
1607
1610
|
|
|
1608
|
-
private
|
|
1611
|
+
private highlightMatch(index: number, scrollIntoView = true): void {
|
|
1609
1612
|
if (!this.regexMatchRanges.length) {
|
|
1610
1613
|
return;
|
|
1611
1614
|
}
|
|
@@ -1625,8 +1628,10 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1625
1628
|
const message = this.visibleViewMessages[matchRange.messageIndex];
|
|
1626
1629
|
const highlightNode = message.searchHighlightNode(matchRange.matchIndex);
|
|
1627
1630
|
highlightNode.classList.add(UI.UIUtils.highlightedCurrentSearchResultClassName);
|
|
1628
|
-
|
|
1629
|
-
|
|
1631
|
+
if (scrollIntoView) {
|
|
1632
|
+
this.viewport.scrollItemIntoView(matchRange.messageIndex);
|
|
1633
|
+
highlightNode.scrollIntoViewIfNeeded();
|
|
1634
|
+
}
|
|
1630
1635
|
}
|
|
1631
1636
|
|
|
1632
1637
|
private updateStickToBottomOnPointerDown(isRightClick?: boolean): void {
|
|
@@ -58,6 +58,7 @@ import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
|
58
58
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
59
59
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
60
60
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
61
|
+
import {render} from '../../ui/lit/lit.js';
|
|
61
62
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
62
63
|
import * as Security from '../security/security.js';
|
|
63
64
|
|
|
@@ -867,7 +868,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
867
868
|
titleElement.classList.add('console-object');
|
|
868
869
|
if (includePreview && obj.preview) {
|
|
869
870
|
titleElement.classList.add('console-object-preview');
|
|
870
|
-
|
|
871
|
+
/* eslint-disable-next-line @devtools/no-lit-render-outside-of-view */
|
|
872
|
+
render(this.previewFormatter.renderObjectPreview(obj.preview), titleElement);
|
|
871
873
|
ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.appendMemoryIcon(titleElement, obj);
|
|
872
874
|
} else if (obj.type === 'function') {
|
|
873
875
|
const functionElement = titleElement.createChild('span');
|
|
@@ -935,11 +937,11 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
935
937
|
protected renderPropertyPreviewOrAccessor(
|
|
936
938
|
object: SDK.RemoteObject.RemoteObject|null, property: Protocol.Runtime.PropertyPreview, propertyPath: Array<{
|
|
937
939
|
name: (string | symbol),
|
|
938
|
-
}>): HTMLElement {
|
|
940
|
+
}>): DocumentFragment|HTMLElement {
|
|
939
941
|
if (property.type === 'accessor') {
|
|
940
942
|
return this.formatAsAccessorProperty(object, propertyPath.map(property => property.name.toString()), false);
|
|
941
943
|
}
|
|
942
|
-
return this.
|
|
944
|
+
return this.renderPropertyPreview(
|
|
943
945
|
property.type, 'subtype' in property ? property.subtype : undefined, null, property.value);
|
|
944
946
|
}
|
|
945
947
|
|
|
@@ -1022,9 +1024,17 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1022
1024
|
return result;
|
|
1023
1025
|
}
|
|
1024
1026
|
|
|
1025
|
-
private formatAsArrayEntry(output: SDK.RemoteObject.RemoteObject):
|
|
1026
|
-
return this.
|
|
1027
|
-
|
|
1027
|
+
private formatAsArrayEntry(output: SDK.RemoteObject.RemoteObject): DocumentFragment {
|
|
1028
|
+
return this.renderPropertyPreview(output.type, output.subtype, output.className, output.description);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
private renderPropertyPreview(
|
|
1032
|
+
type: string, subtype: string|undefined, className: string|null|undefined,
|
|
1033
|
+
description: string|undefined): DocumentFragment {
|
|
1034
|
+
const fragment = document.createDocumentFragment();
|
|
1035
|
+
/* eslint-disable-next-line @devtools/no-lit-render-outside-of-view */
|
|
1036
|
+
render(this.previewFormatter.renderPropertyPreview(type, subtype, className, description), fragment);
|
|
1037
|
+
return fragment;
|
|
1028
1038
|
}
|
|
1029
1039
|
|
|
1030
1040
|
private formatAsAccessorProperty(
|
|
@@ -1059,8 +1069,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1059
1069
|
description = Platform.StringUtilities.trimEndWithMaxLength(object.description, maxLength);
|
|
1060
1070
|
}
|
|
1061
1071
|
}
|
|
1062
|
-
rootElement.appendChild(
|
|
1063
|
-
this.previewFormatter.renderPropertyPreview(type, subtype, object.className, description));
|
|
1072
|
+
rootElement.appendChild(this.renderPropertyPreview(type, subtype, object.className, description));
|
|
1064
1073
|
}
|
|
1065
1074
|
}
|
|
1066
1075
|
|
|
@@ -2253,7 +2262,8 @@ export class ConsoleTableMessageView extends ConsoleViewMessage {
|
|
|
2253
2262
|
|
|
2254
2263
|
if (columnRendered) {
|
|
2255
2264
|
const cellElement =
|
|
2256
|
-
this.renderPropertyPreviewOrAccessor(actualTable, cellProperty, [rowProperty, cellProperty])
|
|
2265
|
+
this.renderPropertyPreviewOrAccessor(actualTable, cellProperty, [rowProperty, cellProperty])
|
|
2266
|
+
.firstElementChild as HTMLElement;
|
|
2257
2267
|
cellElement.classList.add('console-message-nowrap-below');
|
|
2258
2268
|
rowValue.set(cellProperty.name, cellElement);
|
|
2259
2269
|
}
|