Skip to content

Commit 77a381a

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Remove unused code
This is all the dead code that was unused and simple to remove. Bug: 409278895 Change-Id: I9f0f07440e83d0127ade86e12f447b052770983e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6439641 Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Reviewed-by: Alina Varkki <alinavarkki@chromium.org> Commit-Queue: Alina Varkki <alinavarkki@chromium.org>
1 parent 3252009 commit 77a381a

16 files changed

+3
-54
lines changed

front_end/panels/application/ApplicationPanelSidebar.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
10041004
this.resourcesSection.revealAndSelectFrame(frame);
10051005
}
10061006

1007-
private innerShowView(view: UI.Widget.Widget): void {
1008-
this.panel.showView(view);
1009-
}
1010-
10111007
showPreloadingRuleSetView(revealInfo: PreloadingHelper.PreloadingForward.RuleSetView): void {
10121008
if (this.preloadingSummaryTreeElement) {
10131009
this.preloadingSummaryTreeElement.expandAndRevealRuleSet(revealInfo);
@@ -2170,7 +2166,6 @@ export class ResourcesSection implements SDK.TargetManager.Observer {
21702166
export class FrameTreeElement extends ApplicationPanelTreeElement {
21712167
private section: ResourcesSection;
21722168
private frame: SDK.ResourceTreeModel.ResourceTreeFrame;
2173-
private frameId: string;
21742169
private readonly categoryElements: Map<string, ExpandableApplicationPanelTreeElement>;
21752170
private readonly treeElementForResource: Map<string, FrameResourceTreeElement>;
21762171
private treeElementForWindow: Map<Protocol.Target.TargetID, FrameWindowTreeElement>;
@@ -2182,7 +2177,6 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
21822177
super(section.panel, '', false, 'frame');
21832178
this.section = section;
21842179
this.frame = frame;
2185-
this.frameId = frame.id;
21862180
this.categoryElements = new Map();
21872181
this.treeElementForResource = new Map();
21882182
this.treeElementForWindow = new Map();
@@ -2207,7 +2201,6 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22072201
this.setLeadingIcons([icon]);
22082202
this.invalidateChildren();
22092203

2210-
this.frameId = frame.id;
22112204
if (this.title !== frame.displayName()) {
22122205
this.title = frame.displayName();
22132206
UI.ARIAUtils.setLabel(this.listItemElement, this.title);

front_end/panels/application/CookieItemsView.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ class CookiePreviewWidget extends UI.Widget.VBox {
165165
export class CookieItemsView extends StorageItemsView {
166166
private model: SDK.CookieModel.CookieModel;
167167
private cookieDomain: string;
168-
private totalSize: number;
169168
private cookiesTable: CookieTable.CookiesTable.CookiesTable;
170169
private readonly splitWidget: UI.SplitWidget.SplitWidget;
171170
private readonly previewPanel: UI.Widget.VBox;
@@ -185,7 +184,6 @@ export class CookieItemsView extends StorageItemsView {
185184
this.model = model;
186185
this.cookieDomain = cookieDomain;
187186

188-
this.totalSize = 0;
189187
this.cookiesTable = new CookieTable.CookiesTable.CookiesTable(
190188
/* renderInline */ false, this.saveCookie.bind(this), this.refreshItems.bind(this),
191189
this.handleCookieSelected.bind(this), this.deleteCookie.bind(this));
@@ -266,7 +264,6 @@ export class CookieItemsView extends StorageItemsView {
266264

267265
private updateWithCookies(allCookies: SDK.Cookie.Cookie[]): void {
268266
this.allCookies = allCookies;
269-
this.totalSize = allCookies.reduce((size, cookie) => size + cookie.size(), 0);
270267

271268
const parsedURL = Common.ParsedURL.ParsedURL.fromString(this.cookieDomain);
272269
const host = parsedURL ? parsedURL.host : '';

front_end/panels/application/ServiceWorkersView.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ export class Section {
492492
private sourceField: Element;
493493
private readonly statusField: Element;
494494
private readonly clientsField: Element;
495-
private readonly linkifier: Components.Linkifier.Linkifier;
496495
private readonly clientInfoCache: Map<string, Protocol.Target.TargetInfo>;
497496
private readonly throttler: Common.Throttler.Throttler;
498497
private updateCycleField?: Element;
@@ -552,7 +551,6 @@ export class Section {
552551
this.createUpdateCycleField();
553552
this.maybeCreateRouterField();
554553

555-
this.linkifier = new Components.Linkifier.Linkifier();
556554
this.clientInfoCache = new Map();
557555
this.throttler = new Common.Throttler.Throttler(500);
558556
}

front_end/panels/application/preloading/PreloadingView.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ function pageURL(): Platform.DevToolsPath.UrlString {
202202
export class PreloadingRuleSetView extends UI.Widget.VBox {
203203
private model: SDK.PreloadingModel.PreloadingModel;
204204
private focusedRuleSetId: Protocol.Preload.RuleSetId|null = null;
205-
private focusedPreloadingAttemptId: SDK.PreloadingModel.PreloadingAttemptId|null = null;
206205

207206
private readonly warningsContainer: HTMLDivElement;
208207
private readonly warningsView = new PreloadingWarningsView();

front_end/panels/layer_viewer/PaintProfilerView.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,11 @@ export class PaintProfilerCommandLogView extends UI.ThrottledWidget.ThrottledWid
495495
export class LogTreeElement extends UI.TreeOutline.TreeElement {
496496
readonly logItem: SDK.PaintProfiler.PaintProfilerLogItem;
497497
private readonly ownerView: PaintProfilerCommandLogView;
498-
private readonly filled: boolean;
499498

500499
constructor(ownerView: PaintProfilerCommandLogView, logItem: SDK.PaintProfiler.PaintProfilerLogItem) {
501500
super('', Boolean(logItem.params));
502501
this.logItem = logItem;
503502
this.ownerView = ownerView;
504-
this.filled = false;
505503
}
506504

507505
override onattach(): void {

front_end/panels/layers/LayerTreeModel.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ export class AgentLayer implements SDK.LayerTreeBase.Layer {
230230
private scrollRectsInternal!: Protocol.LayerTree.ScrollRect[];
231231
private quadInternal!: number[];
232232
private childrenInternal!: AgentLayer[];
233-
private image!: HTMLImageElement|null;
234233
private parentInternal!: AgentLayer|null;
235234
private layerPayload!: Protocol.LayerTree.Layer;
236235
private layerTreeModel: LayerTreeModel;
@@ -378,7 +377,6 @@ export class AgentLayer implements SDK.LayerTreeBase.Layer {
378377
didPaint(rect: Protocol.DOM.Rect): void {
379378
this.lastPaintRectInternal = rect;
380379
this.paintCountInternal = this.paintCount() + 1;
381-
this.image = null;
382380
}
383381

384382
reset(layerPayload: Protocol.LayerTree.Layer): void {
@@ -387,7 +385,6 @@ export class AgentLayer implements SDK.LayerTreeBase.Layer {
387385
this.parentInternal = null;
388386
this.paintCountInternal = 0;
389387
this.layerPayload = layerPayload;
390-
this.image = null;
391388
this.scrollRectsInternal = this.layerPayload.scrollRects || [];
392389
this.stickyPositionConstraintInternal = this.layerPayload.stickyPositionConstraint ?
393390
new SDK.LayerTreeBase.StickyPositionConstraint(

front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const {LinearMemoryInspectorController} = LinearMemoryInspector;
1212
const {ValueInterpreterDisplayUtils} = LinearMemoryInspectorComponents;
1313

1414
class MockRemoteObject extends SDK.RemoteObject.LocalJSONObject {
15-
private objSubtype?: string;
16-
1715
constructor(array: ArrayBuffer) {
1816
super(array);
1917
}

front_end/panels/media/PlayerMessagesView.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ class MessageLevelSelector implements UI.SoftDropDown.Delegate<SelectableLevel>
9999
private readonly itemMap: Map<number, SelectableLevel>;
100100
private hiddenLevels: string[];
101101
private bitFieldValue: MessageLevelBitfield;
102-
private readonly savedBitFieldValue: MessageLevelBitfield;
103102
private readonly defaultTitleInternal: Common.UIString.LocalizedString;
104103
private readonly customTitle: Common.UIString.LocalizedString;
105104
private readonly allTitle: Common.UIString.LocalizedString;
@@ -113,7 +112,6 @@ class MessageLevelSelector implements UI.SoftDropDown.Delegate<SelectableLevel>
113112
this.hiddenLevels = [];
114113

115114
this.bitFieldValue = MessageLevelBitfield.DEFAULT;
116-
this.savedBitFieldValue = MessageLevelBitfield.DEFAULT;
117115

118116
this.defaultTitleInternal = i18nString(UIStrings.default);
119117
this.customTitle = i18nString(UIStrings.custom);

front_end/panels/media/PlayerPropertiesView.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ export const enum PlayerPropertyKeys {
172172
}
173173

174174
export class PropertyRenderer extends UI.Widget.VBox {
175-
private readonly title: Platform.UIString.LocalizedString;
176175
private readonly contents: HTMLElement;
177176
private value: string|null;
178177
private pseudoColorProtectionElement: HTMLDivElement|null;
@@ -183,7 +182,6 @@ export class PropertyRenderer extends UI.Widget.VBox {
183182
const titleElement = this.contentElement.createChild('span', 'media-property-renderer-title');
184183
this.contents = this.contentElement.createChild('div', 'media-property-renderer-contents');
185184
UI.UIUtils.createTextChild(titleElement, title);
186-
this.title = title;
187185
this.value = null;
188186
this.pseudoColorProtectionElement = null;
189187
this.contentElement.classList.add('media-property-renderer-hidden');
@@ -437,7 +435,6 @@ export class PlayerPropertiesView extends UI.Widget.VBox {
437435
private readonly mediaElements: PropertyRenderer[];
438436
private readonly videoDecoderElements: PropertyRenderer[];
439437
private readonly audioDecoderElements: PropertyRenderer[];
440-
private readonly textTrackElements: PropertyRenderer[];
441438
private readonly attributeMap: Map<string, PropertyRenderer|TrackManager>;
442439
private readonly videoProperties: AttributesView;
443440
private readonly videoDecoderProperties: AttributesView;
@@ -457,7 +454,6 @@ export class PlayerPropertiesView extends UI.Widget.VBox {
457454
this.mediaElements = [];
458455
this.videoDecoderElements = [];
459456
this.audioDecoderElements = [];
460-
this.textTrackElements = [];
461457
this.attributeMap = new Map();
462458

463459
this.populateAttributesAndElements();

front_end/panels/media/TickingFlameChart.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export interface EventProperties {
5353
duration?: number;
5454
name: string;
5555
color?: string;
56-
hoverData?: Object|null;
5756
}
5857

5958
/**
@@ -69,12 +68,11 @@ export class Event {
6968
title: string;
7069
private colorInternal: string;
7170
private fontColorInternal: string;
72-
private readonly hoverData: Object;
7371

7472
constructor(
7573
timelineData: PerfUI.FlameChart.FlameChartTimelineData, eventHandlers: EventHandlers,
7674
eventProperties: EventProperties|
77-
undefined = {color: undefined, duration: undefined, hoverData: {}, level: 0, name: '', startTime: 0}) {
75+
undefined = {color: undefined, duration: undefined, level: 0, name: '', startTime: 0}) {
7876
// These allow the event to privately change it's own data in the timeline.
7977
this.timelineData = timelineData;
8078
this.setLive = eventHandlers.setLive;
@@ -100,7 +98,6 @@ export class Event {
10098
this.title = eventProperties['name'] || '';
10199
this.colorInternal = eventProperties['color'] || HotColorScheme[0];
102100
this.fontColorInternal = calculateFontColor(this.colorInternal);
103-
this.hoverData = eventProperties['hoverData'] || {};
104101
}
105102

106103
/**

0 commit comments

Comments
 (0)