Skip to content

Commit c558bae

Browse files
paulirishDevtools-frontend LUCI CQ
authored andcommitted
Meta: Delete unused methods
I found these with a shell script, but double-checked each and excluded ones used in tests. Part 1 landed in https://crrev.com/c/6236186 Change-Id: Ie5fb7039d88576c9b3924cd820ebf37f2b1651ac Bug: 396301196 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6222940 Auto-Submit: Paul Irish <[email protected]> Reviewed-by: Benedikt Meurer <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]> Commit-Queue: Paul Irish <[email protected]>
1 parent 768aa1f commit c558bae

File tree

72 files changed

+9
-616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+9
-616
lines changed

front_end/core/common/ColorConverter.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,6 @@ const XYZD50_TO_XYZD65_MATRIX = new Matrix3x3([
214214
[0.012308773293784308, -0.02050053471777469, 1.3301947294775631],
215215
]);
216216

217-
const XYZD65_TO_SRGB_MATRIX = new Matrix3x3([
218-
[3.2408089365140573, -1.5375788839307314, -0.4985609572551541],
219-
[-0.9692732213205414, 1.876110235238969, 0.041560501141251774],
220-
[0.05567030990267439, -0.2040007921971802, 1.0571046720577026],
221-
]);
222-
223217
export class ColorConverter {
224218
static labToXyzd50(l: number, a: number, b: number): [number, number, number] {
225219
let y = (l + 16.0) / 116.0;
@@ -366,12 +360,6 @@ export class ColorConverter {
366360
return xyzOutput.values;
367361
}
368362

369-
static xyzd65TosRGBLinear(x: number, y: number, z: number): [number, number, number] {
370-
const xyzInput = new Vector3([x, y, z]);
371-
const rgbResult = XYZD65_TO_SRGB_MATRIX.multiply(xyzInput);
372-
return rgbResult.values;
373-
}
374-
375363
static xyzd50TosRGBLinear(x: number, y: number, z: number): [number, number, number] {
376364
const xyzInput = new Vector3([x, y, z]);
377365
const rgbResult = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput);

front_end/core/common/ParsedURL.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,6 @@ export class ParsedURL {
537537
return this.scheme === 'data';
538538
}
539539

540-
isHttpOrHttps(): boolean {
541-
return this.scheme === 'http' || this.scheme === 'https';
542-
}
543-
544540
isBlobURL(): boolean {
545541
return this.url.startsWith('blob:');
546542
}

front_end/core/common/ResourceType.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,6 @@ export class ResourceCategory {
364364
this.title = title;
365365
this.shortTitle = shortTitle;
366366
}
367-
368-
static categoryByTitle(title: string): ResourceCategory|null {
369-
const allCategories = Object.values(resourceCategories);
370-
return allCategories.find(category => category.title() === title) || null;
371-
}
372367
}
373368

374369
export const resourceCategories = {

front_end/core/common/SegmentedRange.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ export class SegmentedRange<T> {
7272
this.#segmentsInternal.splice(startIndex, endIndex - startIndex, newSegment);
7373
}
7474

75-
appendRange(that: SegmentedRange<T>): void {
76-
that.segments().forEach(segment => this.append(segment));
77-
}
78-
7975
segments(): Array<Segment<T>> {
8076
return this.#segmentsInternal;
8177
}

front_end/core/platform/Timing.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ export type Seconds = Brand<number, 'Seconds'>;
88
export type MilliSeconds = Brand<number, 'MilliSeconds'>;
99
export type MicroSeconds = Brand<number, 'MicroSeconds'>;
1010

11-
export function secondsToMilliSeconds(x: Seconds): MilliSeconds {
12-
return (x * 1000) as MilliSeconds;
13-
}
14-
1511
export function milliSecondsToSeconds(x: MilliSeconds): Seconds {
1612
return (x / 1000) as Seconds;
1713
}

front_end/core/sdk/AccessibilityModel.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,6 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
336336
this.#frameIdToAXNode.set(frameId, axNode);
337337
}
338338

339-
axNodeForFrameId(frameId: Protocol.Page.FrameId): AccessibilityNode|null {
340-
return this.#frameIdToAXNode.get(frameId) ?? null;
341-
}
342-
343339
setAXNodeForAXId(axId: string, axNode: AccessibilityNode): void {
344340
this.#axIdToAXNode.set(axId, axNode);
345341
}

front_end/core/sdk/AnimationModel.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,6 @@ export class AnimationImpl {
563563
return this.#playStateInternal || this.#payloadInternal.playState;
564564
}
565565

566-
setPlayState(playState: string): void {
567-
this.#playStateInternal = playState;
568-
}
569-
570566
playbackRate(): number {
571567
return this.#payloadInternal.playbackRate;
572568
}

front_end/core/sdk/CPUProfilerModel.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const str_ = i18n.i18n.registerUIStrings('core/sdk/CPUProfilerModel.ts', UIStrin
4848
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
4949

5050
export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolProxyApi.ProfilerDispatcher {
51-
#isRecording: boolean;
5251
#nextAnonymousConsoleProfileNumber: number;
5352
#anonymousConsoleProfileIdToTitle: Map<string, string>;
5453
readonly #profilerAgent: ProtocolProxyApi.ProfilerApi;
@@ -59,7 +58,6 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
5958

6059
constructor(target: Target) {
6160
super(target);
62-
this.#isRecording = false;
6361
this.#nextAnonymousConsoleProfileNumber = 1;
6462
this.#anonymousConsoleProfileIdToTitle = new Map();
6563
this.#profilerAgent = target.profilerAgent();
@@ -110,19 +108,13 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
110108
};
111109
}
112110

113-
isRecordingProfile(): boolean {
114-
return this.#isRecording;
115-
}
116-
117111
startRecording(): Promise<unknown> {
118-
this.#isRecording = true;
119112
const intervalUs = 100;
120113
void this.#profilerAgent.invoke_setSamplingInterval({interval: intervalUs});
121114
return this.#profilerAgent.invoke_start();
122115
}
123116

124117
stopRecording(): Promise<Protocol.Profiler.Profile|null> {
125-
this.#isRecording = false;
126118
return this.#profilerAgent.invoke_stop().then(response => response.profile || null);
127119
}
128120

front_end/core/sdk/CSSMatchedStyles.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ export class CSSRegisteredProperty {
193193
this.#registration = registration;
194194
}
195195

196-
isAtProperty(): boolean {
197-
return this.#registration instanceof CSSPropertyRule;
198-
}
199-
200196
propertyName(): string {
201197
return this.#registration instanceof CSSPropertyRule ? this.#registration.propertyName().text :
202198
this.#registration.propertyName;

front_end/core/sdk/ConsoleModel.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,6 @@ export class ConsoleModel extends SDKModel<EventTypes> {
449449
return this.#violationsInternal;
450450
}
451451

452-
static allViolations(): number {
453-
let violations = 0;
454-
for (const target of TargetManager.instance().targets()) {
455-
violations += target.model(ConsoleModel)?.violations() || 0;
456-
}
457-
return violations;
458-
}
459-
460452
async saveToTempVariable(currentExecutionContext: ExecutionContext|null, remoteObject: RemoteObject|null):
461453
Promise<void> {
462454
if (!remoteObject || !currentExecutionContext) {

0 commit comments

Comments
 (0)