chrome-devtools-frontend 1.0.920568 → 1.0.922044
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/config/gni/all_devtools_files.gni +1 -1
- package/config/gni/devtools_grd_files.gni +5 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/core/common/ColorUtils.ts +2 -1
- package/front_end/core/common/Object.ts +36 -1
- package/front_end/core/common/WasmDisassembly.ts +6 -14
- package/front_end/core/common/common.ts +2 -1
- package/front_end/core/i18n/locales/af.json +53 -32
- package/front_end/core/i18n/locales/am.json +56 -35
- package/front_end/core/i18n/locales/ar.json +53 -32
- package/front_end/core/i18n/locales/as.json +63 -42
- package/front_end/core/i18n/locales/az.json +53 -32
- package/front_end/core/i18n/locales/be.json +52 -31
- package/front_end/core/i18n/locales/bg.json +51 -30
- package/front_end/core/i18n/locales/bn.json +63 -42
- package/front_end/core/i18n/locales/bs.json +57 -36
- package/front_end/core/i18n/locales/ca.json +55 -34
- package/front_end/core/i18n/locales/cs.json +51 -30
- package/front_end/core/i18n/locales/cy.json +63 -42
- package/front_end/core/i18n/locales/da.json +55 -34
- package/front_end/core/i18n/locales/de.json +52 -31
- package/front_end/core/i18n/locales/el.json +58 -37
- package/front_end/core/i18n/locales/en-GB.json +51 -30
- package/front_end/core/i18n/locales/en-US.json +67 -34
- package/front_end/core/i18n/locales/en-XL.json +67 -34
- package/front_end/core/i18n/locales/es-419.json +53 -32
- package/front_end/core/i18n/locales/es.json +52 -31
- package/front_end/core/i18n/locales/et.json +54 -33
- package/front_end/core/i18n/locales/eu.json +71 -50
- package/front_end/core/i18n/locales/fa.json +54 -33
- package/front_end/core/i18n/locales/fi.json +55 -34
- package/front_end/core/i18n/locales/fil.json +59 -38
- package/front_end/core/i18n/locales/fr-CA.json +52 -31
- package/front_end/core/i18n/locales/fr.json +54 -33
- package/front_end/core/i18n/locales/gl.json +57 -36
- package/front_end/core/i18n/locales/gu.json +65 -44
- package/front_end/core/i18n/locales/he.json +56 -35
- package/front_end/core/i18n/locales/hi.json +61 -40
- package/front_end/core/i18n/locales/hr.json +55 -34
- package/front_end/core/i18n/locales/hu.json +53 -32
- package/front_end/core/i18n/locales/hy.json +54 -33
- package/front_end/core/i18n/locales/id.json +59 -38
- package/front_end/core/i18n/locales/is.json +51 -30
- package/front_end/core/i18n/locales/it.json +51 -30
- package/front_end/core/i18n/locales/ja.json +52 -31
- package/front_end/core/i18n/locales/ka.json +51 -30
- package/front_end/core/i18n/locales/kk.json +56 -35
- package/front_end/core/i18n/locales/km.json +59 -38
- package/front_end/core/i18n/locales/kn.json +63 -42
- package/front_end/core/i18n/locales/ko.json +59 -38
- package/front_end/core/i18n/locales/ky.json +54 -33
- package/front_end/core/i18n/locales/lo.json +59 -38
- package/front_end/core/i18n/locales/lt.json +52 -31
- package/front_end/core/i18n/locales/lv.json +60 -39
- package/front_end/core/i18n/locales/mk.json +51 -30
- package/front_end/core/i18n/locales/ml.json +65 -44
- package/front_end/core/i18n/locales/mn.json +59 -38
- package/front_end/core/i18n/locales/mr.json +61 -40
- package/front_end/core/i18n/locales/ms.json +59 -38
- package/front_end/core/i18n/locales/my.json +59 -38
- package/front_end/core/i18n/locales/ne.json +63 -42
- package/front_end/core/i18n/locales/nl.json +55 -34
- package/front_end/core/i18n/locales/no.json +54 -33
- package/front_end/core/i18n/locales/or.json +63 -42
- package/front_end/core/i18n/locales/pa.json +61 -40
- package/front_end/core/i18n/locales/pl.json +51 -30
- package/front_end/core/i18n/locales/pt-PT.json +52 -31
- package/front_end/core/i18n/locales/pt.json +59 -38
- package/front_end/core/i18n/locales/ro.json +52 -31
- package/front_end/core/i18n/locales/ru.json +52 -31
- package/front_end/core/i18n/locales/si.json +59 -38
- package/front_end/core/i18n/locales/sk.json +52 -31
- package/front_end/core/i18n/locales/sl.json +52 -31
- package/front_end/core/i18n/locales/sq.json +51 -30
- package/front_end/core/i18n/locales/sr-Latn.json +52 -31
- package/front_end/core/i18n/locales/sr.json +52 -31
- package/front_end/core/i18n/locales/sv.json +52 -31
- package/front_end/core/i18n/locales/sw.json +60 -39
- package/front_end/core/i18n/locales/ta.json +67 -46
- package/front_end/core/i18n/locales/te.json +62 -41
- package/front_end/core/i18n/locales/th.json +52 -31
- package/front_end/core/i18n/locales/tr.json +55 -34
- package/front_end/core/i18n/locales/uk.json +55 -34
- package/front_end/core/i18n/locales/ur.json +60 -39
- package/front_end/core/i18n/locales/uz.json +52 -31
- package/front_end/core/i18n/locales/vi.json +54 -33
- package/front_end/core/i18n/locales/zh-HK.json +52 -31
- package/front_end/core/i18n/locales/zh-TW.json +57 -36
- package/front_end/core/i18n/locales/zh.json +56 -35
- package/front_end/core/i18n/locales/zu.json +59 -38
- package/front_end/core/sdk/RemoteObject.ts +43 -20
- package/front_end/core/sdk/TracingModel.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.js +4 -4
- package/front_end/legacy/legacy-defs.d.ts +24 -0
- package/front_end/models/extensions/ExtensionAPI.ts +9 -4
- package/front_end/models/extensions/ExtensionServer.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +4 -1
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +12 -3
- package/front_end/models/issues_manager/descriptions/SameSiteSamePartyCrossPartyContextSet.md +10 -0
- package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +4 -0
- package/front_end/models/timeline_model/TimelineModel.ts +5 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -2
- package/front_end/panels/application/DatabaseQueryView.ts +7 -1
- package/front_end/panels/changes/ChangesSidebar.ts +6 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +8 -1
- package/front_end/panels/elements/ElementsPanel.ts +25 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +13 -1
- package/front_end/panels/elements/layoutPane.css +1 -0
- package/front_end/panels/emulation/AdvancedApp.ts +2 -12
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +14 -1
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
- package/front_end/panels/issues/IssueAggregator.ts +2 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +7 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +7 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +7 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +6 -7
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +8 -4
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -0
- package/front_end/panels/network/NetworkItemView.ts +24 -4
- package/front_end/panels/network/NetworkLogView.ts +14 -5
- package/front_end/panels/network/NetworkPanel.ts +7 -6
- package/front_end/panels/network/RequestHeadersView.ts +0 -345
- package/front_end/panels/network/RequestPayloadView.ts +529 -0
- package/front_end/panels/network/RequestTimingView.ts +3 -1
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
- package/front_end/panels/network/module.json +0 -3
- package/front_end/panels/network/network-legacy.ts +5 -0
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/network/requestPayloadTree.css +130 -0
- package/front_end/panels/network/requestPayloadView.css +16 -0
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -3
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -1
- package/front_end/panels/profiler/ProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +5 -5
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +5 -6
- package/front_end/panels/sources/SourcesPanel.ts +4 -5
- package/front_end/panels/sources/SourcesView.ts +16 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +7 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -7
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
- package/front_end/panels/timeline/TimelineLayersView.ts +7 -7
- package/front_end/panels/timeline/TimelinePanel.ts +5 -4
- package/front_end/ui/legacy/ARIAUtils.ts +12 -0
- package/front_end/ui/legacy/Fragment.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -0
- package/front_end/ui/legacy/SplitWidget.ts +6 -1
- package/front_end/ui/legacy/TabbedPane.ts +4 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +16 -66
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +8 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +9 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +11 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +6 -3
- package/front_end/ui/legacy/utils/focus-changed.ts +1 -1
- package/inspector_overlay/common.ts +3 -3
- package/inspector_overlay/tool_viewport_size.ts +1 -1
- package/package.json +1 -1
|
@@ -150,8 +150,8 @@ export class TimelineFlameChartView extends UI.Widget.VBox implements PerfUI.Fla
|
|
|
150
150
|
private readonly countersView: CountersGraph;
|
|
151
151
|
private readonly detailsSplitWidget: UI.SplitWidget.SplitWidget;
|
|
152
152
|
private readonly detailsView: TimelineDetailsView;
|
|
153
|
-
private readonly onMainEntrySelected: (event?: Common.EventTarget.EventTargetEvent) => void;
|
|
154
|
-
private readonly onNetworkEntrySelected: (event?: Common.EventTarget.EventTargetEvent) => void;
|
|
153
|
+
private readonly onMainEntrySelected: (event?: Common.EventTarget.EventTargetEvent<number>) => void;
|
|
154
|
+
private readonly onNetworkEntrySelected: (event?: Common.EventTarget.EventTargetEvent<number>) => void;
|
|
155
155
|
private nextExtensionIndex: number;
|
|
156
156
|
private readonly boundRefresh: () => void;
|
|
157
157
|
private selectedTrack: TimelineModel.TimelineModel.Track|null;
|
|
@@ -361,9 +361,9 @@ export class TimelineFlameChartView extends UI.Widget.VBox implements PerfUI.Fla
|
|
|
361
361
|
this.mainFlameChart.scheduleUpdate();
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
private onEntryHighlighted(commonEvent: Common.EventTarget.EventTargetEvent): void {
|
|
364
|
+
private onEntryHighlighted(commonEvent: Common.EventTarget.EventTargetEvent<number>): void {
|
|
365
365
|
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();
|
|
366
|
-
const entryIndex =
|
|
366
|
+
const entryIndex = commonEvent.data;
|
|
367
367
|
const event = this.mainDataProvider.eventByIndex(entryIndex);
|
|
368
368
|
if (!event) {
|
|
369
369
|
return;
|
|
@@ -63,13 +63,13 @@ export class TimelineLayersView extends UI.SplitWidget.SplitWidget {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
private onPaintProfilerRequested(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
66
|
+
private async onPaintProfilerRequested(
|
|
67
|
+
event: Common.EventTarget.EventTargetEvent<LayerViewer.LayerViewHost.Selection>): Promise<void> {
|
|
68
|
+
const selection = event.data;
|
|
69
|
+
const snapshotWithRect = await this.layers3DView.snapshotForSelection(selection);
|
|
70
|
+
if (snapshotWithRect) {
|
|
71
|
+
this.showPaintProfilerCallback(snapshotWithRect.snapshot);
|
|
72
|
+
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
private update(): void {
|
|
@@ -448,7 +448,8 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
|
448
448
|
this.loader = TimelineLoader.loadFromEvents(events, this);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
private onOverviewWindowChanged(
|
|
451
|
+
private onOverviewWindowChanged(
|
|
452
|
+
event: Common.EventTarget.EventTargetEvent<PerfUI.TimelineOverviewPane.WindowChangedEvent>): void {
|
|
452
453
|
if (!this.performanceModel) {
|
|
453
454
|
return;
|
|
454
455
|
}
|
|
@@ -1246,11 +1247,11 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
|
1246
1247
|
this.loadFromURL(url);
|
|
1247
1248
|
}
|
|
1248
1249
|
} else if (item.kind === 'file') {
|
|
1249
|
-
const
|
|
1250
|
-
if (!
|
|
1250
|
+
const file = items[0].getAsFile();
|
|
1251
|
+
if (!file) {
|
|
1251
1252
|
return;
|
|
1252
1253
|
}
|
|
1253
|
-
|
|
1254
|
+
this.loadFromFile(file);
|
|
1254
1255
|
}
|
|
1255
1256
|
}
|
|
1256
1257
|
}
|
|
@@ -108,6 +108,18 @@ export function markAsListitem(element: Element): void {
|
|
|
108
108
|
element.setAttribute('role', 'listitem');
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
export function markAsMain(element: Element): void {
|
|
112
|
+
element.setAttribute('role', 'main');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function markAsComplementary(element: Element): void {
|
|
116
|
+
element.setAttribute('role', 'complementary');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function markAsNavigation(element: Element): void {
|
|
120
|
+
element.setAttribute('role', 'navigation');
|
|
121
|
+
}
|
|
122
|
+
|
|
111
123
|
/**
|
|
112
124
|
* Must contain children whose role is option.
|
|
113
125
|
*/
|
|
@@ -67,7 +67,7 @@ export class Fragment {
|
|
|
67
67
|
const template = document.createElement('template');
|
|
68
68
|
template.innerHTML = html;
|
|
69
69
|
const walker = template.ownerDocument.createTreeWalker(
|
|
70
|
-
template.content, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, null
|
|
70
|
+
template.content, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, null);
|
|
71
71
|
let valueIndex = 0;
|
|
72
72
|
const emptyTextNodes = [];
|
|
73
73
|
const binds: Bind[] = [];
|
|
@@ -51,6 +51,7 @@ import type {TabbedViewLocation, View, ViewLocation, ViewLocationResolver} from
|
|
|
51
51
|
import {ViewManager} from './ViewManager.js';
|
|
52
52
|
import type {Widget} from './Widget.js';
|
|
53
53
|
import {VBox, WidgetFocusRestorer} from './Widget.js';
|
|
54
|
+
import * as ARIAUtils from './ARIAUtils.js';
|
|
54
55
|
|
|
55
56
|
const UIStrings = {
|
|
56
57
|
/**
|
|
@@ -97,6 +98,14 @@ const UIStrings = {
|
|
|
97
98
|
* @example {German} PH1
|
|
98
99
|
*/
|
|
99
100
|
setToSpecificLanguage: 'Switch DevTools to {PH1}',
|
|
101
|
+
/**
|
|
102
|
+
*@description The aria label for main toolbar
|
|
103
|
+
*/
|
|
104
|
+
mainToolbar: 'Main toolbar',
|
|
105
|
+
/**
|
|
106
|
+
*@description The aria label for the drawer.
|
|
107
|
+
*/
|
|
108
|
+
drawer: 'Tool drawer',
|
|
100
109
|
};
|
|
101
110
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/InspectorView.ts', UIStrings);
|
|
102
111
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -142,6 +151,10 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
142
151
|
this.drawerTabbedPane.addEventListener(TabbedPaneEvents.TabSelected, this.tabSelected, this);
|
|
143
152
|
this.drawerTabbedPane.setTabDelegate(this.tabDelegate);
|
|
144
153
|
|
|
154
|
+
const drawerElement = this.drawerTabbedPane.element;
|
|
155
|
+
ARIAUtils.markAsComplementary(drawerElement);
|
|
156
|
+
ARIAUtils.setAccessibleName(drawerElement, i18nString(UIStrings.drawer));
|
|
157
|
+
|
|
145
158
|
this.drawerSplitWidget.installResizer(this.drawerTabbedPane.headerElement());
|
|
146
159
|
this.drawerSplitWidget.setSidebarWidget(this.drawerTabbedPane);
|
|
147
160
|
this.drawerTabbedPane.rightToolbar().appendToolbarItem(closeDrawerButton);
|
|
@@ -159,6 +172,10 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
159
172
|
this.tabbedPane.setAccessibleName(i18nString(UIStrings.panels));
|
|
160
173
|
this.tabbedPane.setTabDelegate(this.tabDelegate);
|
|
161
174
|
|
|
175
|
+
const mainHeaderElement = this.tabbedPane.headerElement();
|
|
176
|
+
ARIAUtils.markAsNavigation(mainHeaderElement);
|
|
177
|
+
ARIAUtils.setAccessibleName(mainHeaderElement, i18nString(UIStrings.mainToolbar));
|
|
178
|
+
|
|
162
179
|
// Store the initial selected panel for use in launch histograms
|
|
163
180
|
Host.userMetrics.setLaunchPanel(this.tabbedPane.selectedTabId);
|
|
164
181
|
|
|
@@ -38,7 +38,7 @@ import {ToolbarButton} from './Toolbar.js';
|
|
|
38
38
|
import {Widget} from './Widget.js';
|
|
39
39
|
import {Events as ZoomManagerEvents, ZoomManager} from './ZoomManager.js';
|
|
40
40
|
|
|
41
|
-
export class SplitWidget extends Widget {
|
|
41
|
+
export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typeof Widget>(Widget) {
|
|
42
42
|
private sidebarElementInternal: HTMLElement;
|
|
43
43
|
private mainElement: HTMLElement;
|
|
44
44
|
private resizerElementInternal: HTMLElement;
|
|
@@ -869,6 +869,11 @@ export enum Events {
|
|
|
869
869
|
ShowModeChanged = 'ShowModeChanged',
|
|
870
870
|
}
|
|
871
871
|
|
|
872
|
+
export type EventTypes = {
|
|
873
|
+
[Events.SidebarSizeChanged]: number,
|
|
874
|
+
[Events.ShowModeChanged]: string,
|
|
875
|
+
};
|
|
876
|
+
|
|
872
877
|
const MinPadding = 20;
|
|
873
878
|
export interface SettingForOrientation {
|
|
874
879
|
showMode: string;
|
|
@@ -204,6 +204,10 @@ export class TabbedPane extends VBox {
|
|
|
204
204
|
return this.headerElementInternal;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
tabbedPaneContentElement(): Element {
|
|
208
|
+
return this.contentElementInternal;
|
|
209
|
+
}
|
|
210
|
+
|
|
207
211
|
isTabCloseable(id: string): boolean {
|
|
208
212
|
const tab = this.tabsById.get(id);
|
|
209
213
|
return tab ? tab.isCloseable() : false;
|
|
@@ -219,7 +219,7 @@ class DragHandler {
|
|
|
219
219
|
DragHandler.rootForMouseOut = event.target instanceof Node && event.target.getRootNode() || null;
|
|
220
220
|
this.dragEventsTargetDocument = targetDocument;
|
|
221
221
|
try {
|
|
222
|
-
if (targetDocument.defaultView) {
|
|
222
|
+
if (targetDocument.defaultView && targetDocument.defaultView.top) {
|
|
223
223
|
this.dragEventsTargetDocumentTop = targetDocument.defaultView.top.document;
|
|
224
224
|
}
|
|
225
225
|
} catch (e) {
|
|
@@ -1294,7 +1294,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1294
1294
|
{value: toIndex},
|
|
1295
1295
|
{value: ArrayGroupingTreeElement.bucketThreshold},
|
|
1296
1296
|
{value: ArrayGroupingTreeElement.sparseIterationThreshold},
|
|
1297
|
-
{value: ArrayGroupingTreeElement.getOwnPropertyNamesThreshold},
|
|
1298
1297
|
]);
|
|
1299
1298
|
|
|
1300
1299
|
await callback(jsonValue);
|
|
@@ -1303,22 +1302,19 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1303
1302
|
* Note: must declare params as optional.
|
|
1304
1303
|
*/
|
|
1305
1304
|
function packRanges(
|
|
1306
|
-
this: Object, fromIndex?: number, toIndex?: number, bucketThreshold?: number,
|
|
1307
|
-
|
|
1305
|
+
this: Object, fromIndex?: number, toIndex?: number, bucketThreshold?: number,
|
|
1306
|
+
sparseIterationThreshold?: number): {
|
|
1308
1307
|
ranges: number[][],
|
|
1309
|
-
skipGetOwnPropertyNames: boolean,
|
|
1310
1308
|
}|undefined {
|
|
1311
1309
|
if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined ||
|
|
1312
|
-
|
|
1310
|
+
bucketThreshold === undefined) {
|
|
1313
1311
|
return;
|
|
1314
1312
|
}
|
|
1315
1313
|
let ownPropertyNames: string[]|null = null;
|
|
1316
1314
|
const consecutiveRange = (toIndex - fromIndex >= sparseIterationThreshold) && ArrayBuffer.isView(this);
|
|
1317
|
-
const skipGetOwnPropertyNames = consecutiveRange && (toIndex - fromIndex >= getOwnPropertyNamesThreshold);
|
|
1318
1315
|
|
|
1319
1316
|
function* arrayIndexes(object: Object): Generator<number, void, unknown> {
|
|
1320
|
-
if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined
|
|
1321
|
-
getOwnPropertyNamesThreshold === undefined) {
|
|
1317
|
+
if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined) {
|
|
1322
1318
|
return;
|
|
1323
1319
|
}
|
|
1324
1320
|
|
|
@@ -1345,8 +1341,10 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1345
1341
|
if (consecutiveRange) {
|
|
1346
1342
|
count = toIndex - fromIndex + 1;
|
|
1347
1343
|
} else {
|
|
1348
|
-
|
|
1344
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1345
|
+
for (const ignored of arrayIndexes(this)) {
|
|
1349
1346
|
++count;
|
|
1347
|
+
}
|
|
1350
1348
|
}
|
|
1351
1349
|
|
|
1352
1350
|
let bucketSize: number = count;
|
|
@@ -1386,13 +1384,10 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1386
1384
|
}
|
|
1387
1385
|
}
|
|
1388
1386
|
|
|
1389
|
-
return {ranges: ranges
|
|
1387
|
+
return {ranges: ranges};
|
|
1390
1388
|
}
|
|
1391
1389
|
|
|
1392
|
-
async function callback(result: {
|
|
1393
|
-
ranges: Array<Array<number>>,
|
|
1394
|
-
skipGetOwnPropertyNames: boolean,
|
|
1395
|
-
}|undefined): Promise<void> {
|
|
1390
|
+
async function callback(result: {ranges: Array<Array<number>>}|undefined): Promise<void> {
|
|
1396
1391
|
if (!result) {
|
|
1397
1392
|
return;
|
|
1398
1393
|
}
|
|
@@ -1418,8 +1413,7 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1418
1413
|
if (topLevel) {
|
|
1419
1414
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
1420
1415
|
// @ts-ignore
|
|
1421
|
-
await ArrayGroupingTreeElement.populateNonIndexProperties(
|
|
1422
|
-
treeNode, object, result.skipGetOwnPropertyNames, linkifier);
|
|
1416
|
+
await ArrayGroupingTreeElement.populateNonIndexProperties(treeNode, object, linkifier);
|
|
1423
1417
|
}
|
|
1424
1418
|
}
|
|
1425
1419
|
}
|
|
@@ -1487,57 +1481,14 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1487
1481
|
|
|
1488
1482
|
private static async populateNonIndexProperties(
|
|
1489
1483
|
this: ArrayGroupingTreeElement, treeNode: UI.TreeOutline.TreeElement, object: SDK.RemoteObject.RemoteObject,
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
const result = await object.callFunction(buildObjectFragment, [{value: skipGetOwnPropertyNames}]);
|
|
1495
|
-
if (!result.object || result.wasThrown) {
|
|
1496
|
-
return;
|
|
1497
|
-
}
|
|
1498
|
-
const allProperties = await result.object.getOwnProperties(true /* generatePreview */);
|
|
1499
|
-
result.object.release();
|
|
1500
|
-
if (!allProperties.properties) {
|
|
1484
|
+
linkifier?: Components.Linkifier.Linkifier): Promise<void> {
|
|
1485
|
+
const {properties, internalProperties} = await SDK.RemoteObject.RemoteObject.loadFromObjectPerProto(
|
|
1486
|
+
object, true /* generatePreview */, true /* nonIndexedPropertiesOnly */);
|
|
1487
|
+
if (!properties) {
|
|
1501
1488
|
return;
|
|
1502
1489
|
}
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
for (const property of properties) {
|
|
1506
|
-
parentMap.set(property, this.object);
|
|
1507
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
1508
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1509
|
-
if (!ObjectPropertiesSection.isDisplayableProperty(property, (treeNode as any).property)) {
|
|
1510
|
-
continue;
|
|
1511
|
-
}
|
|
1512
|
-
const childTreeElement = new ObjectPropertyTreeElement(property, linkifier);
|
|
1513
|
-
childTreeElement.readOnly = true;
|
|
1514
|
-
treeNode.appendChild(childTreeElement);
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
function buildObjectFragment(this: Object, skipGetOwnPropertyNames?: boolean): {
|
|
1518
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
1519
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/naming-convention
|
|
1520
|
-
__proto__: any,
|
|
1521
|
-
} {
|
|
1522
|
-
// @ts-ignore __proto__ exists on Object.
|
|
1523
|
-
const result = {__proto__: this.__proto__};
|
|
1524
|
-
if (skipGetOwnPropertyNames) {
|
|
1525
|
-
return result;
|
|
1526
|
-
}
|
|
1527
|
-
const names = Object.getOwnPropertyNames(this);
|
|
1528
|
-
for (let i = 0; i < names.length; ++i) {
|
|
1529
|
-
const name = names[i];
|
|
1530
|
-
// Array index check according to the ES5-15.4.
|
|
1531
|
-
if (String(Number(name) >>> 0) === name && Number(name) >>> 0 !== 0xffffffff) {
|
|
1532
|
-
continue;
|
|
1533
|
-
}
|
|
1534
|
-
const descriptor = Object.getOwnPropertyDescriptor(this, name);
|
|
1535
|
-
if (descriptor) {
|
|
1536
|
-
Object.defineProperty(result, name, descriptor);
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
return result;
|
|
1540
|
-
}
|
|
1490
|
+
ObjectPropertyTreeElement.populateWithProperties(
|
|
1491
|
+
treeNode, properties, internalProperties, false, false, object, linkifier);
|
|
1541
1492
|
}
|
|
1542
1493
|
|
|
1543
1494
|
async onpopulate(): Promise<void> {
|
|
@@ -1557,7 +1508,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1557
1508
|
|
|
1558
1509
|
private static bucketThreshold = 100;
|
|
1559
1510
|
private static sparseIterationThreshold = 250000;
|
|
1560
|
-
private static getOwnPropertyNamesThreshold = 500000;
|
|
1561
1511
|
}
|
|
1562
1512
|
|
|
1563
1513
|
export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
@@ -2,6 +2,7 @@
|
|
|
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';
|
|
5
6
|
import * as Host from '../../../../core/host/host.js';
|
|
6
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
7
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
@@ -33,7 +34,7 @@ const UIStrings = {
|
|
|
33
34
|
};
|
|
34
35
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/perf_ui/FilmStripView.ts', UIStrings);
|
|
35
36
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
36
|
-
export class FilmStripView extends UI.Widget.HBox {
|
|
37
|
+
export class FilmStripView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.HBox>(UI.Widget.HBox) {
|
|
37
38
|
private statusLabel: HTMLElement;
|
|
38
39
|
private zeroTime!: number;
|
|
39
40
|
private spanTime!: number;
|
|
@@ -195,6 +196,12 @@ export enum Events {
|
|
|
195
196
|
FrameExit = 'FrameExit',
|
|
196
197
|
}
|
|
197
198
|
|
|
199
|
+
export type EventTypes = {
|
|
200
|
+
[Events.FrameSelected]: number,
|
|
201
|
+
[Events.FrameEnter]: number,
|
|
202
|
+
[Events.FrameExit]: number,
|
|
203
|
+
};
|
|
204
|
+
|
|
198
205
|
export const Modes = {
|
|
199
206
|
TimeBased: 'TimeBased',
|
|
200
207
|
FrameBased: 'FrameBased',
|
|
@@ -85,7 +85,8 @@ interface GroupExpansionState {
|
|
|
85
85
|
[key: string]: boolean;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
export class FlameChart extends UI.Widget.VBox
|
|
88
|
+
export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
89
|
+
implements Calculator, ChartViewportDelegate {
|
|
89
90
|
private readonly groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>;
|
|
90
91
|
private groupExpansionState: GroupExpansionState;
|
|
91
92
|
private readonly flameChartDelegate: FlameChartDelegate;
|
|
@@ -2321,6 +2322,13 @@ export enum Events {
|
|
|
2321
2322
|
EntryHighlighted = 'EntryHighlighted',
|
|
2322
2323
|
}
|
|
2323
2324
|
|
|
2325
|
+
export type EventTypes = {
|
|
2326
|
+
[Events.CanvasFocused]: number|void,
|
|
2327
|
+
[Events.EntryInvoked]: number,
|
|
2328
|
+
[Events.EntrySelected]: number,
|
|
2329
|
+
[Events.EntryHighlighted]: number,
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2324
2332
|
export const Colors = {
|
|
2325
2333
|
SelectedGroupBackground: 'hsl(215, 85%, 98%)',
|
|
2326
2334
|
SelectedGroupBorder: 'hsl(216, 68%, 54%)',
|
|
@@ -36,7 +36,8 @@ import * as i18n from '../../../../core/i18n/i18n.js';
|
|
|
36
36
|
import {Events as OverviewGridEvents, OverviewGrid} from './OverviewGrid.js';
|
|
37
37
|
import type {Calculator} from './TimelineGrid.js';
|
|
38
38
|
|
|
39
|
-
export class TimelineOverviewPane extends UI.Widget.VBox
|
|
39
|
+
export class TimelineOverviewPane extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
40
|
+
UI.Widget.VBox) {
|
|
40
41
|
private readonly overviewCalculator: TimelineOverviewCalculator;
|
|
41
42
|
private readonly overviewGrid: OverviewGrid;
|
|
42
43
|
private readonly cursorArea: HTMLElement;
|
|
@@ -255,6 +256,15 @@ export enum Events {
|
|
|
255
256
|
WindowChanged = 'WindowChanged',
|
|
256
257
|
}
|
|
257
258
|
|
|
259
|
+
export interface WindowChangedEvent {
|
|
260
|
+
startTime: number;
|
|
261
|
+
endTime: number;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export type EventTypes = {
|
|
265
|
+
[Events.WindowChanged]: WindowChangedEvent,
|
|
266
|
+
};
|
|
267
|
+
|
|
258
268
|
export class TimelineOverviewCalculator implements Calculator {
|
|
259
269
|
private minimumBoundaryInternal!: number;
|
|
260
270
|
private maximumBoundaryInternal!: number;
|
|
@@ -236,8 +236,11 @@ export class ImageView extends UI.View.SimpleView {
|
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
const
|
|
240
|
-
|
|
239
|
+
const file = items[0].getAsFile();
|
|
240
|
+
if (!file) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const encoded = !file.name.endsWith('.svg');
|
|
241
244
|
const fileCallback = (file: Blob): void => {
|
|
242
245
|
const reader = new FileReader();
|
|
243
246
|
reader.onloadend = (): void => {
|
|
@@ -259,6 +262,6 @@ export class ImageView extends UI.View.SimpleView {
|
|
|
259
262
|
reader.readAsText(file);
|
|
260
263
|
}
|
|
261
264
|
};
|
|
262
|
-
|
|
265
|
+
fileCallback(file);
|
|
263
266
|
}
|
|
264
267
|
}
|