chrome-devtools-frontend 1.0.1543082 → 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/root/DevToolsContext.ts +60 -0
- package/front_end/core/root/root.ts +6 -1
- package/front_end/core/sdk/TargetManager.ts +5 -6
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -13
- package/front_end/entrypoints/main/MainImpl.ts +3 -5
- package/front_end/foundation/Universe.ts +13 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +11 -8
- 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/FrameDetailsView.ts +468 -447
- package/front_end/panels/console/ConsoleView.ts +9 -7
- package/front_end/panels/console/ConsoleViewMessage.ts +19 -9
- package/front_end/panels/explain/components/ConsoleInsight.ts +314 -310
- 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/ui/components/docs/component_docs.ts +0 -4
- 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 +1 -1
- 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/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/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
|
@@ -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}));
|
|
@@ -1564,7 +1564,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1564
1564
|
|
|
1565
1565
|
this.#searchableView.updateSearchMatchesCount(this.regexMatchRanges.length);
|
|
1566
1566
|
if (typeof this.searchShouldJumpBackwards !== 'undefined' && this.regexMatchRanges.length) {
|
|
1567
|
-
this.
|
|
1567
|
+
this.highlightMatch(this.searchShouldJumpBackwards ? -1 : 0);
|
|
1568
1568
|
delete this.searchShouldJumpBackwards;
|
|
1569
1569
|
}
|
|
1570
1570
|
|
|
@@ -1589,11 +1589,11 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1589
1589
|
}
|
|
1590
1590
|
|
|
1591
1591
|
jumpToNextSearchResult(): void {
|
|
1592
|
-
this.
|
|
1592
|
+
this.highlightMatch(this.currentMatchRangeIndex + 1);
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
1595
|
jumpToPreviousSearchResult(): void {
|
|
1596
|
-
this.
|
|
1596
|
+
this.highlightMatch(this.currentMatchRangeIndex - 1);
|
|
1597
1597
|
}
|
|
1598
1598
|
|
|
1599
1599
|
supportsCaseSensitiveSearch(): boolean {
|
|
@@ -1608,7 +1608,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1608
1608
|
return true;
|
|
1609
1609
|
}
|
|
1610
1610
|
|
|
1611
|
-
private
|
|
1611
|
+
private highlightMatch(index: number, scrollIntoView = true): void {
|
|
1612
1612
|
if (!this.regexMatchRanges.length) {
|
|
1613
1613
|
return;
|
|
1614
1614
|
}
|
|
@@ -1628,8 +1628,10 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1628
1628
|
const message = this.visibleViewMessages[matchRange.messageIndex];
|
|
1629
1629
|
const highlightNode = message.searchHighlightNode(matchRange.matchIndex);
|
|
1630
1630
|
highlightNode.classList.add(UI.UIUtils.highlightedCurrentSearchResultClassName);
|
|
1631
|
-
|
|
1632
|
-
|
|
1631
|
+
if (scrollIntoView) {
|
|
1632
|
+
this.viewport.scrollItemIntoView(matchRange.messageIndex);
|
|
1633
|
+
highlightNode.scrollIntoViewIfNeeded();
|
|
1634
|
+
}
|
|
1633
1635
|
}
|
|
1634
1636
|
|
|
1635
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
|
}
|