Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove DevTools legacy UI patching (#40331)
- Loading branch information
1 parent
30fbcfc
commit 652f995
Showing
6 changed files
with
35 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
fix_expose_globals_to_allow_patching_devtools_dock.patch | ||
chore_expose_ui_to_allow_electron_to_set_dock_side.patch |
24 changes: 24 additions & 0 deletions
24
patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Shelley Vohr <shelley.vohr@gmail.com> | ||
Date: Wed, 25 Oct 2023 11:48:21 -0400 | ||
Subject: chore: expose UI to allow Electron to set dock side | ||
|
||
This patch allows Electron to set the dock side via `webContents.openDevTools({ mode })`. | ||
|
||
It also allows us to test certain aspects of devtools extensions. We should look for a way | ||
to handle this without patching, but this is fairly clean for now and no longer requires | ||
patching legacy devtools code. | ||
|
||
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts | ||
index c62a8e6dd401c8be227c3c2a86a8da86ee795fba..af1abee6d5b4414f300854c85bc0e0cc3ddec198 100644 | ||
--- a/front_end/entrypoints/main/MainImpl.ts | ||
+++ b/front_end/entrypoints/main/MainImpl.ts | ||
@@ -770,6 +770,8 @@ export class MainImpl { | ||
globalThis.Main = globalThis.Main || {}; | ||
// @ts-ignore Exported for Tests.js | ||
globalThis.Main.Main = MainImpl; | ||
+// @ts-ignore Exported for Electron | ||
+globalThis.EUI = UI || {}; | ||
|
||
let zoomActionDelegateInstance: ZoomActionDelegate; | ||
|
319 changes: 0 additions & 319 deletions
319
patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters