Skip to content

Commit bf73092

Browse files
pfaffeDevtools-frontend LUCI CQ
authored andcommitted
Remove distances overlay
The distance tool was planned to be added to the inspector overlay, but it was never used in devtools. Original issue: crbug.com/41449675 Fixed: 425562188 Change-Id: Ia2c4d8318e0e63f003d5b9d42447b184bd7fd41d Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6695588 Commit-Queue: Philip Pfaffe <[email protected]> Auto-Submit: Philip Pfaffe <[email protected]> Commit-Queue: Alex Rudenko <[email protected]> Reviewed-by: Alex Rudenko <[email protected]>
1 parent 11f5f04 commit bf73092

File tree

5 files changed

+0
-174
lines changed

5 files changed

+0
-174
lines changed

front_end/legacy_test_runner/elements_test_runner/ElementsTestRunner.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,24 +1263,6 @@ ElementsTestRunner.dumpInspectorGridHighlightsJSON = async function(idValues, ca
12631263
callback();
12641264
};
12651265

1266-
ElementsTestRunner.dumpInspectorDistanceJSON = function(idValue, callback) {
1267-
ElementsTestRunner.nodeWithId(idValue, nodeResolved);
1268-
1269-
async function nodeResolved(node) {
1270-
const result = await TestRunner.OverlayAgent.getHighlightObjectForTest(node.id, true);
1271-
const info = result['distanceInfo'];
1272-
if (!info) {
1273-
TestRunner.addResult(`${idValue}: No distance info`);
1274-
} else {
1275-
if (info['style']) {
1276-
info['style'] = '<style data>';
1277-
}
1278-
TestRunner.addResult(idValue + JSON.stringify(info, null, 2));
1279-
}
1280-
callback();
1281-
}
1282-
};
1283-
12841266
ElementsTestRunner.dumpInspectorHighlightStyleJSON = async function(idValue) {
12851267
const node = await ElementsTestRunner.nodeWithIdPromise(idValue);
12861268
const result = await TestRunner.OverlayAgent.getHighlightObjectForTest(node.id, false, true /* includeStyle */);

inspector_overlay/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ action("build_inspector_overlay") {
2121
"$target_gen_dir/highlight_grid_common.js",
2222
"$target_gen_dir/highlight_isolated_element.js",
2323
"$target_gen_dir/highlight_scroll_snap.js",
24-
"$target_gen_dir/tool_distances.js",
2524
"$target_gen_dir/tool_persistent.js",
2625
"$target_gen_dir/tool_grid.css",
2726
"$target_gen_dir/tool_highlight.js",
@@ -91,7 +90,6 @@ ts_library("inspector_overlay") {
9190
"highlight_isolated_element.ts",
9291
"highlight_scroll_snap.ts",
9392
"main.ts",
94-
"tool_distances.ts",
9593
"tool_highlight.ts",
9694
"tool_paused.ts",
9795
"tool_persistent.ts",

inspector_overlay/debug/tool_distances.html

Lines changed: 0 additions & 25 deletions
This file was deleted.

inspector_overlay/main.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import commonStyle from './common.css';
77
import {adoptStyleSheet} from './common.js';
88
import {gridStyle} from './highlight_grid_common.js';
9-
import {DistancesOverlay} from './tool_distances.js';
109
// @ts-expect-error Importing CSS is handled in Rollup.
1110
import highlightGridStyle from './tool_grid.css';
1211
// @ts-expect-error Importing CSS is handled in Rollup.
@@ -41,15 +40,13 @@ gridStyleSheet.replaceSync(gridStyle);
4140

4241
const highlightOverlay = new HighlightOverlay(window, [highlightStyle, gridStyleSheet]);
4342
const persistentOverlay = new PersistentOverlay(window, [highlightGridStyle, gridStyleSheet]);
44-
const distancesOverlay = new DistancesOverlay(window);
4543
const pausedOverlay = new PausedOverlay(window, pausedStyle);
4644
const screenshotOverlay = new ScreenshotOverlay(window, screenshotStyle);
4745
const sourceOrderOverlay = new SourceOrderOverlay(window, sourceOrderStyle);
4846
const viewportSizeOverlay = new ViewportSizeOverlay(window);
4947
const windowControlsOverlay = new WindowControlsOverlay(window, [wcoStyle]);
5048

5149
interface Overlays {
52-
distances: DistancesOverlay;
5350
highlight: HighlightOverlay;
5451
persistent: PersistentOverlay;
5552
paused: PausedOverlay;
@@ -63,7 +60,6 @@ type PlatformName = string;
6360

6461
// Key in this object is the name the backend refers to a particular overlay by.
6562
const overlays: Overlays = {
66-
distances: distancesOverlay,
6763
highlight: highlightOverlay,
6864
persistent: persistentOverlay,
6965
paused: pausedOverlay,

inspector_overlay/tool_distances.ts

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)