From 90ee30c33abe52dc17a6dc046ec32004fcef799a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 5 Oct 2023 18:39:37 +0100 Subject: [PATCH] Update patches (#4086) --- packages/wrangler-devtools/Makefile | 12 +- ...d-README-detailing-the-setup-process.patch | 78 --------- ...port-viewing-files-over-the-network.patch} | 28 +-- ... 0002-Show-fallback-image-on-Safari.patch} | 36 ++-- ...ort-previewing-subrequest-responses.patch} | 28 ++- ...ter-Firefox-support-for-network-tab.patch} | 12 +- ... 0005-Remove-unsupported-network-UI.patch} | 30 ++-- ...0006-Remove-unsupported-profiler-UI.patch} | 18 +- ...-parameter-for-forcing-the-theme-fr.patch} | 10 +- ...r-text-colour-in-dark-mode-in-browse.patch | 73 ++++++++ ...overlay-on-the-memory-tab-in-Firefox.patch | 75 --------- ...009-Fallback-to-location-for-domain.patch} | 10 +- ...r-text-colour-in-dark-mode-in-browse.patch | 50 ------ ...> 0010-Hide-unsupported-settings-UI.patch} | 18 +- ...ing-to-improve-connection-stability.patch} | 12 +- ...ps.patch => 0012-Support-sourcemaps.patch} | 36 ++-- ...bugger-sidebar-and-disable-breakpoin.patch | 91 ---------- ...hen-query-parameter-debugger-is-tru.patch} | 88 +++++++--- .../patches/0014-Show-Profiling-panel.patch | 159 ++++++++++++++++++ .../0015-Basic-support-for-Safari.patch | 46 +++++ packages/wrangler/src/dev/inspect.ts | 6 +- 21 files changed, 469 insertions(+), 447 deletions(-) delete mode 100644 packages/wrangler-devtools/patches/0001-Add-README-detailing-the-setup-process.patch rename packages/wrangler-devtools/patches/{0002-Support-viewing-files-over-the-network.patch => 0001-Support-viewing-files-over-the-network.patch} (81%) rename packages/wrangler-devtools/patches/{0003-Show-fallback-image-on-Safari.patch => 0002-Show-fallback-image-on-Safari.patch} (99%) rename packages/wrangler-devtools/patches/{0004-Support-previewing-subrequest-responses.patch => 0003-Support-previewing-subrequest-responses.patch} (73%) rename packages/wrangler-devtools/patches/{0005-Better-Firefox-support-for-network-tab.patch => 0004-Better-Firefox-support-for-network-tab.patch} (88%) rename packages/wrangler-devtools/patches/{0006-DEVX-292-Remove-unsupported-network-UI.patch => 0005-Remove-unsupported-network-UI.patch} (82%) rename packages/wrangler-devtools/patches/{0007-Remove-unsupported-profiler-UI.patch => 0006-Remove-unsupported-profiler-UI.patch} (79%) rename packages/wrangler-devtools/patches/{0009-Support-theme-url-parameter-for-forcing-the-theme-fr.patch => 0007-Support-theme-url-parameter-for-forcing-the-theme-fr.patch} (88%) create mode 100644 packages/wrangler-devtools/patches/0008-Basic-support-for-text-colour-in-dark-mode-in-browse.patch delete mode 100644 packages/wrangler-devtools/patches/0008-Show-an-overlay-on-the-memory-tab-in-Firefox.patch rename packages/wrangler-devtools/patches/{0011-Fallback-to-location-for-domain.patch => 0009-Fallback-to-location-for-domain.patch} (74%) delete mode 100644 packages/wrangler-devtools/patches/0010-Basic-support-for-text-colour-in-dark-mode-in-browse.patch rename packages/wrangler-devtools/patches/{0012-Hide-unsupported-settings-UI.patch => 0010-Hide-unsupported-settings-UI.patch} (86%) rename packages/wrangler-devtools/patches/{0014-Add-ping-to-improve-connection-stability.patch => 0011-Add-ping-to-improve-connection-stability.patch} (81%) rename packages/wrangler-devtools/patches/{0015-Support-sourcemaps.patch => 0012-Support-sourcemaps.patch} (69%) delete mode 100644 packages/wrangler-devtools/patches/0013-DEVX-380-Hide-debugger-sidebar-and-disable-breakpoin.patch rename packages/wrangler-devtools/patches/{0016-Disable-debugger-when-query-parameter-debugger-is-fa.patch => 0013-Enable-debugger-when-query-parameter-debugger-is-tru.patch} (54%) create mode 100644 packages/wrangler-devtools/patches/0014-Show-Profiling-panel.patch create mode 100644 packages/wrangler-devtools/patches/0015-Basic-support-for-Safari.patch diff --git a/packages/wrangler-devtools/Makefile b/packages/wrangler-devtools/Makefile index 4f511e87290b..8f3cfc214960 100644 --- a/packages/wrangler-devtools/Makefile +++ b/packages/wrangler-devtools/Makefile @@ -1,7 +1,7 @@ ROOT = $(realpath .) -PATH_WITH_DEPOT = $(PATH):"$(ROOT)/depot/" +PATH_WITH_DEPOT = $(PATH):$(ROOT)/depot/ # The upstream devtools commit upon which our patches are based -HEAD = f931aec3eca7c860dc4d657f328daca19d19221d +HEAD = 64208f10b3efe06a92c58d345bd828832d09c4a7 PATCHES = $(shell ls ${PWD}/patches/*.patch) depot: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot @@ -9,16 +9,16 @@ depot: devtools-frontend: depot git clone https://chromium.googlesource.com/devtools/devtools-frontend # Ensure other depot_tools can be called from gclient config - PATH=$(PATH_WITH_DEPOT) $(ROOT)/depot/gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged + PATH="$(PATH_WITH_DEPOT)" $(ROOT)/depot/gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged git -C devtools-frontend checkout $(HEAD) git -C devtools-frontend config user.email "workers-devprod@cloudflare.com" git -C devtools-frontend config user.name "Workers DevProd" git -C devtools-frontend am $(PATCHES) devtools-frontend/out/Default/gen/front_end: devtools-frontend - cd devtools-frontend && PATH=$(PATH_WITH_DEPOT) $(ROOT)/depot/gclient sync - cd devtools-frontend && PATH=$(PATH_WITH_DEPOT) $(ROOT)/depot/gn gen out/Default - cd devtools-frontend && PATH=$(PATH_WITH_DEPOT) $(ROOT)/depot/autoninja -C out/Default + cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" $(ROOT)/depot/gclient sync + cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" $(ROOT)/depot/gn gen out/Default + cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" $(ROOT)/depot/autoninja -C out/Default publish: devtools-frontend/out/Default/gen/front_end npx wrangler pages deploy --project-name cloudflare-devtools devtools-frontend/out/Default/gen/front_end diff --git a/packages/wrangler-devtools/patches/0001-Add-README-detailing-the-setup-process.patch b/packages/wrangler-devtools/patches/0001-Add-README-detailing-the-setup-process.patch deleted file mode 100644 index 8473e490948a..000000000000 --- a/packages/wrangler-devtools/patches/0001-Add-README-detailing-the-setup-process.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 085ba88402c95c0c110c77da1cdf23c0e7ccf0ab Mon Sep 17 00:00:00 2001 -From: Samuel Macleod -Date: Wed, 11 Jan 2023 17:46:48 +0000 -Subject: [PATCH 01/16] Add README detailing the setup process - ---- - README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 58 insertions(+) - -diff --git a/README.md b/README.md -index 8a057be23c..4e009509b2 100644 ---- a/README.md -+++ b/README.md -@@ -1,3 +1,61 @@ -+# Cloudflare's DevTools fork -+ -+## Setting up your development environment -+ -+> _Taken from https://chromium.googlesource.com/devtools/devtools-frontend/+/main/docs/workflows.md_ -+ -+- Set up [depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) -+- Make a folder in which to work on Chrome DevTools -+ -+ ```sh -+ mkdir chrome-devtools -+ cd chrom-devtools -+ ``` -+ -+- Fetch the upstream source -+ -+ ```sh -+ fetch devtools-frontend -+ cd devtools-frontend -+ ``` -+ -+- Verify you can build devtools successfully. This will take a while (~6 minutes) the first time you run the build commands, but will be much faster in future. -+ -+ ```sh -+ gclient sync -+ gn gen out/Default -+ autoninja -C out/Default -+ ``` -+ -+- Verify you can serve and access devtools (try running `wrangler dev` on a test worker to see logs in the served devtools) -+ -+ ```sh -+ npx serve out/Default/gen/front_end -+ open "http://localhost:3000/js_app?v8only=true&ws=localhost:9229/ws" -+ ``` -+ -+- Add the Cloudflare fork as a remote -+ -+ ```sh -+ git remote add fork ssh://git@bitbucket.cfdata.org:7999/mirrors/chrome-devtools-frontend.git -+ ``` -+ -+- Fetch the latest changes from the Cloudflare fork -+ -+ ```sh -+ git fetch fork -+ ``` -+ -+- Checkout the right branch (the fact that this isn't `main` is a legacy holdover from the fact that we had an earlier fork in 2019 on the `new-devtools` branch) -+ -+ ```sh -+ git switch -c cloudflare fork/cloudflare -+ ``` -+ -+- And you're ready to develop! Remember to only push commits to the Cloudflare fork, and open a PR with any changes -+ -+_Original README reproduced below_ -+ - # Chrome DevTools frontend - - --- -2.41.0 - diff --git a/packages/wrangler-devtools/patches/0002-Support-viewing-files-over-the-network.patch b/packages/wrangler-devtools/patches/0001-Support-viewing-files-over-the-network.patch similarity index 81% rename from packages/wrangler-devtools/patches/0002-Support-viewing-files-over-the-network.patch rename to packages/wrangler-devtools/patches/0001-Support-viewing-files-over-the-network.patch index 294ae5ca3aac..1632c6e17063 100644 --- a/packages/wrangler-devtools/patches/0002-Support-viewing-files-over-the-network.patch +++ b/packages/wrangler-devtools/patches/0001-Support-viewing-files-over-the-network.patch @@ -1,7 +1,7 @@ -From ae9408ae42966da4f8e34a9add5c9ee641e1afa1 Mon Sep 17 00:00:00 2001 -From: Samuel Macleod -Date: Thu, 12 Jan 2023 15:33:43 +0000 -Subject: [PATCH 02/16] Support viewing files over the network +From 24644cc732ec4bf8589715e853067eadd1b52e29 Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Mon, 2 Oct 2023 18:13:34 +0100 +Subject: [PATCH 01/15] Support viewing files over the network --- front_end/core/sdk/Target.ts | 4 ++++ @@ -11,12 +11,12 @@ Subject: [PATCH 02/16] Support viewing files over the network 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/front_end/core/sdk/Target.ts b/front_end/core/sdk/Target.ts -index 77e23b798e..11ff0af705 100644 +index eed909ea64..5e1778885d 100644 --- a/front_end/core/sdk/Target.ts +++ b/front_end/core/sdk/Target.ts -@@ -76,6 +76,9 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase { +@@ -82,6 +82,9 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase { case Type.Tab: - this.#capabilitiesMask = Capability.Target; + this.#capabilitiesMask = Capability.Target | Capability.Tracing; break; + case Type.Cloudflare: + this.#capabilitiesMask = Capability.JS | Capability.Network; @@ -24,7 +24,7 @@ index 77e23b798e..11ff0af705 100644 } this.#typeInternal = type; this.#parentTargetInternal = parentTarget; -@@ -239,6 +242,7 @@ export enum Type { +@@ -255,6 +258,7 @@ export enum Type { Browser = 'browser', AuctionWorklet = 'auction-worklet', Tab = 'tab', @@ -46,10 +46,10 @@ index cafecfa4ba..213ca7fecd 100644 }, Components.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost); } diff --git a/front_end/panels/sources/sources-meta.ts b/front_end/panels/sources/sources-meta.ts -index 946dd8c333..c5e95ab535 100644 +index a0c126df12..4b8244ea69 100644 --- a/front_end/panels/sources/sources-meta.ts +++ b/front_end/panels/sources/sources-meta.ts -@@ -40,6 +40,11 @@ const UIStrings = { +@@ -41,6 +41,11 @@ const UIStrings = { *@description Title of the 'Snippets' tool in the Snippets Navigator View, which is part of the Sources tool */ snippets: 'Snippets', @@ -61,14 +61,14 @@ index 946dd8c333..c5e95ab535 100644 /** *@description Command for showing the 'Search' tool */ -@@ -428,14 +433,14 @@ UI.ViewManager.registerViewExtension({ +@@ -454,14 +459,14 @@ UI.ViewManager.registerViewExtension({ UI.ViewManager.registerViewExtension({ location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW, - id: 'navigator-files', + id: 'navigator-network', - commandPrompt: i18nLazyString(UIStrings.showFilesystem), -- title: i18nLazyString(UIStrings.filesystem), + commandPrompt: i18nLazyString(UIStrings.showWorkspace), +- title: i18nLazyString(UIStrings.workspace), + title: i18nLazyString(UIStrings.cloudflare), order: 3, persistence: UI.ViewManager.ViewPersistence.PERMANENT, @@ -93,5 +93,5 @@ index ac0d4aaf68..29c726e185 100644 ] } -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0003-Show-fallback-image-on-Safari.patch b/packages/wrangler-devtools/patches/0002-Show-fallback-image-on-Safari.patch similarity index 99% rename from packages/wrangler-devtools/patches/0003-Show-fallback-image-on-Safari.patch rename to packages/wrangler-devtools/patches/0002-Show-fallback-image-on-Safari.patch index 7b3ff63e5740..57b41d317058 100644 --- a/packages/wrangler-devtools/patches/0003-Show-fallback-image-on-Safari.patch +++ b/packages/wrangler-devtools/patches/0002-Show-fallback-image-on-Safari.patch @@ -1,7 +1,7 @@ -From 3e732ac51f1cc473f5dea7224b3c5f2978a82956 Mon Sep 17 00:00:00 2001 -From: Samuel Macleod -Date: Mon, 16 Jan 2023 16:51:11 +0000 -Subject: [PATCH 03/16] Show fallback image on Safari +From 0ccfb994361f1fa467f7ea441131f4a079cea607 Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Mon, 2 Oct 2023 18:18:45 +0100 +Subject: [PATCH 02/15] Show fallback image on Safari --- config/gni/devtools_grd_files.gni | 1 + @@ -12,29 +12,29 @@ Subject: [PATCH 03/16] Show fallback image on Safari create mode 100644 front_end/Images/fake.png diff --git a/config/gni/devtools_grd_files.gni b/config/gni/devtools_grd_files.gni -index ddeed12b41..21d6e4c020 100644 +index f0007ac34b..5e2281b2e7 100644 --- a/config/gni/devtools_grd_files.gni +++ b/config/gni/devtools_grd_files.gni -@@ -37,6 +37,7 @@ grd_files_release_sources = [ - "front_end/Images/baseline-icon.svg", - "front_end/Images/checkboxCheckmark.svg", - "front_end/Images/checker.png", +@@ -58,6 +58,7 @@ grd_files_release_sources = [ + "front_end/Images/check-circle.svg", + "front_end/Images/check-double.svg", + "front_end/Images/checker.svg", + "front_end/Images/fake.png", - "front_end/Images/chevrons.svg", - "front_end/Images/chromeDisabledSelect.png", - "front_end/Images/chromeDisabledSelect_2x.png", + "front_end/Images/checkmark.svg", + "front_end/Images/chevron-double-right.svg", + "front_end/Images/chevron-down.svg", diff --git a/config/gni/devtools_image_files.gni b/config/gni/devtools_image_files.gni -index 64c35de875..47ef8f4790 100644 +index 042be12dfd..7439a30ab7 100644 --- a/config/gni/devtools_image_files.gni +++ b/config/gni/devtools_image_files.gni @@ -8,6 +8,7 @@ devtools_image_files = [ "accelerometer-right.png", "accelerometer-top.png", - "checker.png", -+ "fake.png", - "chromeDisabledSelect_2x.png", - "chromeDisabledSelect.png", "chromeLeft.avif", ++ "fake.png", + "chromeMiddle.avif", + "chromeRight.avif", + "cssoverview_icons_2x.avif", diff --git a/front_end/Images/fake.png b/front_end/Images/fake.png new file mode 100644 index 0000000000000000000000000000000000000000..61468f4e731cdbbc8fa26ab74b72b93b509d5a54 @@ -1815,5 +1815,5 @@ index 1edaec9604..945aa6d816 100644 + -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0004-Support-previewing-subrequest-responses.patch b/packages/wrangler-devtools/patches/0003-Support-previewing-subrequest-responses.patch similarity index 73% rename from packages/wrangler-devtools/patches/0004-Support-previewing-subrequest-responses.patch rename to packages/wrangler-devtools/patches/0003-Support-previewing-subrequest-responses.patch index 72c1efe914e1..a2e4a9fad852 100644 --- a/packages/wrangler-devtools/patches/0004-Support-previewing-subrequest-responses.patch +++ b/packages/wrangler-devtools/patches/0003-Support-previewing-subrequest-responses.patch @@ -1,30 +1,28 @@ -From 2b46e6f3c86723ff2c0729ff9dee507347a07a75 Mon Sep 17 00:00:00 2001 -From: bcoll -Date: Mon, 16 Jan 2023 14:26:52 +0000 -Subject: [PATCH 04/16] Support previewing subrequest responses +From 95b2dc1f6cf0f02c3c52da17c0cec1f6fdbf6035 Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Mon, 2 Oct 2023 18:22:08 +0100 +Subject: [PATCH 03/15] Support previewing subrequest responses --- - front_end/core/sdk/NetworkManager.ts | 9 +++++++-- + front_end/core/sdk/NetworkManager.ts | 7 ++++++- front_end/entrypoints/js_app/BUILD.gn | 1 + front_end/entrypoints/js_app/js_app.ts | 1 + - 3 files changed, 9 insertions(+), 2 deletions(-) + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/front_end/core/sdk/NetworkManager.ts b/front_end/core/sdk/NetworkManager.ts -index a6cc176456..d0a60dd664 100644 +index c8aa624961..6201d73bba 100644 --- a/front_end/core/sdk/NetworkManager.ts +++ b/front_end/core/sdk/NetworkManager.ts -@@ -695,8 +695,8 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher { +@@ -705,7 +705,7 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher { this.updateNetworkRequest(networkRequest); } -- loadingFinished({requestId, timestamp: finishTime, encodedDataLength, shouldReportCorbBlocking}: -- Protocol.Network.LoadingFinishedEvent): void { -+ loadingFinished({requestId, timestamp: finishTime, encodedDataLength, shouldReportCorbBlocking, cfResponse }: -+ Protocol.Network.LoadingFinishedEvent & { cfResponse?: Omit }): void { +- loadingFinished({requestId, timestamp: finishTime, encodedDataLength}: Protocol.Network.LoadingFinishedEvent): void { ++ loadingFinished({requestId, timestamp: finishTime, encodedDataLength, cfResponse}: Protocol.Network.LoadingFinishedEvent & { cfResponse?: Omit }): void { let networkRequest: NetworkRequest|null|undefined = this.#requestsById.get(requestId); if (!networkRequest) { networkRequest = this.maybeAdoptMainResourceRequest(requestId); -@@ -705,6 +705,11 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher { +@@ -714,6 +714,11 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher { return; } this.getExtraInfoBuilder(requestId).finished(); @@ -33,7 +31,7 @@ index a6cc176456..d0a60dd664 100644 + return { error: null, content: cfResponse.body, encoded: cfResponse.base64Encoded }; + }); + } - this.finishNetworkRequest(networkRequest, finishTime, encodedDataLength, shouldReportCorbBlocking); + this.finishNetworkRequest(networkRequest, finishTime, encodedDataLength); this.#manager.dispatchEventToListeners(Events.LoadingFinished, networkRequest); } diff --git a/front_end/entrypoints/js_app/BUILD.gn b/front_end/entrypoints/js_app/BUILD.gn @@ -61,5 +59,5 @@ index 213ca7fecd..ef5c568e96 100644 import '../../panels/js_profiler/js_profiler-meta.js'; -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0005-Better-Firefox-support-for-network-tab.patch b/packages/wrangler-devtools/patches/0004-Better-Firefox-support-for-network-tab.patch similarity index 88% rename from packages/wrangler-devtools/patches/0005-Better-Firefox-support-for-network-tab.patch rename to packages/wrangler-devtools/patches/0004-Better-Firefox-support-for-network-tab.patch index bfd2c9419dc4..2c20056e6b80 100644 --- a/packages/wrangler-devtools/patches/0005-Better-Firefox-support-for-network-tab.patch +++ b/packages/wrangler-devtools/patches/0004-Better-Firefox-support-for-network-tab.patch @@ -1,7 +1,7 @@ -From c19d1d618c1ca839dd662e4dbd9b3fd6d1aa65e3 Mon Sep 17 00:00:00 2001 +From 83b63469d06e2318f880c417c168f5494edf89fa Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Jan 2023 15:47:52 +0000 -Subject: [PATCH 05/16] Better Firefox support for network tab +Subject: [PATCH 04/15] Better Firefox support for network tab --- front_end/entrypoints/js_app/js_app.ts | 2 ++ @@ -22,10 +22,10 @@ index ef5c568e96..f6a3a1641f 100644 static instance(opts: {forceNew: boolean|null} = {forceNew: null}): JsMainImpl { const {forceNew} = opts; diff --git a/front_end/ui/legacy/components/data_grid/DataGrid.ts b/front_end/ui/legacy/components/data_grid/DataGrid.ts -index a7ec8ccf32..fc80d2769d 100644 +index 88c258f54f..0648649ccf 100644 --- a/front_end/ui/legacy/components/data_grid/DataGrid.ts +++ b/front_end/ui/legacy/components/data_grid/DataGrid.ts -@@ -219,6 +219,8 @@ export class DataGridImpl extends Common.ObjectWrapper.ObjectWrapper extends Common.ObjectWrapper.ObjectWrapper extends Common.ObjectWrapper.ObjectWrapper extends Common.ObjectWrapper.ObjectWrapper -Date: Mon, 16 Jan 2023 15:43:50 +0000 -Subject: [PATCH 06/16] DEVX-292 Remove unsupported network UI +From f2c4fc2bd919c743124df81d0b7ca9dc19cd2787 Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Mon, 2 Oct 2023 18:24:46 +0100 +Subject: [PATCH 05/15] Remove unsupported network UI --- front_end/panels/network/NetworkPanel.ts | 35 ------------------------ 1 file changed, 35 deletions(-) diff --git a/front_end/panels/network/NetworkPanel.ts b/front_end/panels/network/NetworkPanel.ts -index 304bb09af1..aaf80fbd50 100644 +index 65f0094c36..edad7d4781 100644 --- a/front_end/panels/network/NetworkPanel.ts +++ b/front_end/panels/network/NetworkPanel.ts -@@ -41,7 +41,6 @@ import * as Bindings from '../../models/bindings/bindings.js'; - import * as Logs from '../../models/logs/logs.js'; +@@ -42,7 +42,6 @@ import * as Logs from '../../models/logs/logs.js'; + import * as TraceEngine from '../../models/trace/trace.js'; import * as Workspace from '../../models/workspace/workspace.js'; import * as NetworkForward from '../../panels/network/forward/forward.js'; -import * as IconButton from '../../ui/components/icon_button/icon_button.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js'; -@@ -79,14 +78,6 @@ const UIStrings = { +@@ -74,14 +73,6 @@ const UIStrings = { *@description Text to preserve the log after refreshing */ preserveLog: 'Preserve log', @@ -34,7 +34,7 @@ index 304bb09af1..aaf80fbd50 100644 /** *@description Tooltip text that appears when hovering over the largeicon settings gear in show settings pane setting in network panel of the network panel */ -@@ -155,10 +146,6 @@ const UIStrings = { +@@ -150,10 +141,6 @@ const UIStrings = { *@description Text in Network Panel of the Network panel */ fetchingFrames: 'Fetching frames...', @@ -45,7 +45,7 @@ index 304bb09af1..aaf80fbd50 100644 }; const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkPanel.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -@@ -411,28 +398,6 @@ export class NetworkPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi +@@ -414,28 +401,6 @@ export class NetworkPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi this.panelToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox( this.preserveLogSetting, i18nString(UIStrings.doNotClearLogOnPageReload), i18nString(UIStrings.preserveLog))); @@ -59,10 +59,10 @@ index 304bb09af1..aaf80fbd50 100644 - - const networkConditionsIcon = new IconButton.Icon.Icon(); - networkConditionsIcon.data = { -- iconName: 'network_conditions_icon', -- color: 'rgb(110 110 110)', -- width: '18px', -- height: '18px', +- iconName: 'network-settings', +- color: 'var(--icon-default)', +- width: '20px', +- height: '20px', - }; - const networkConditionsButton = - new UI.Toolbar.ToolbarButton(i18nString(UIStrings.moreNetworkConditions), networkConditionsIcon); @@ -75,5 +75,5 @@ index 304bb09af1..aaf80fbd50 100644 this.rightToolbar.appendSeparator(); this.rightToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingToggle( -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0007-Remove-unsupported-profiler-UI.patch b/packages/wrangler-devtools/patches/0006-Remove-unsupported-profiler-UI.patch similarity index 79% rename from packages/wrangler-devtools/patches/0007-Remove-unsupported-profiler-UI.patch rename to packages/wrangler-devtools/patches/0006-Remove-unsupported-profiler-UI.patch index b64c3bf0d093..247326b45aac 100644 --- a/packages/wrangler-devtools/patches/0007-Remove-unsupported-profiler-UI.patch +++ b/packages/wrangler-devtools/patches/0006-Remove-unsupported-profiler-UI.patch @@ -1,7 +1,7 @@ -From 300d56bf34269b93eb011a0a25bbd160f4d3e122 Mon Sep 17 00:00:00 2001 -From: bcoll -Date: Mon, 16 Jan 2023 16:32:45 +0000 -Subject: [PATCH 07/16] Remove unsupported profiler UI +From a1602867b77541604c03f67da518044bb2209f8a Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Mon, 2 Oct 2023 18:26:03 +0100 +Subject: [PATCH 06/15] Remove unsupported profiler UI --- front_end/panels/profiler/HeapProfilerPanel.ts | 2 +- @@ -9,7 +9,7 @@ Subject: [PATCH 07/16] Remove unsupported profiler UI 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/front_end/panels/profiler/HeapProfilerPanel.ts b/front_end/panels/profiler/HeapProfilerPanel.ts -index 27cdb23ab5..df3c3d540e 100644 +index 02a484f266..9d6b63c3ed 100644 --- a/front_end/panels/profiler/HeapProfilerPanel.ts +++ b/front_end/panels/profiler/HeapProfilerPanel.ts @@ -26,7 +26,7 @@ export class HeapProfilerPanel extends ProfilesPanel implements UI.ContextMenu.P @@ -22,11 +22,11 @@ index 27cdb23ab5..df3c3d540e 100644 } diff --git a/front_end/panels/profiler/ProfilesPanel.ts b/front_end/panels/profiler/ProfilesPanel.ts -index c4680b48be..c2fe5b775f 100644 +index e865c98e21..a175dfb050 100644 --- a/front_end/panels/profiler/ProfilesPanel.ts +++ b/front_end/panels/profiler/ProfilesPanel.ts -@@ -146,8 +146,6 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp - this.clearResultsButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearAllProfiles), 'largeicon-clear'); +@@ -170,8 +170,6 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp + this.clearResultsButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearAllProfiles), 'clear'); this.clearResultsButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.reset, this); toolbar.appendToolbarItem(this.clearResultsButton); - toolbar.appendSeparator(); @@ -35,5 +35,5 @@ index c4680b48be..c2fe5b775f 100644 this.profileViewToolbar = new UI.Toolbar.Toolbar('', this.toolbarElement); this.profileViewToolbar.makeWrappable(true); -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0009-Support-theme-url-parameter-for-forcing-the-theme-fr.patch b/packages/wrangler-devtools/patches/0007-Support-theme-url-parameter-for-forcing-the-theme-fr.patch similarity index 88% rename from packages/wrangler-devtools/patches/0009-Support-theme-url-parameter-for-forcing-the-theme-fr.patch rename to packages/wrangler-devtools/patches/0007-Support-theme-url-parameter-for-forcing-the-theme-fr.patch index 68a4202f6aa6..86581a3bbcce 100644 --- a/packages/wrangler-devtools/patches/0009-Support-theme-url-parameter-for-forcing-the-theme-fr.patch +++ b/packages/wrangler-devtools/patches/0007-Support-theme-url-parameter-for-forcing-the-theme-fr.patch @@ -1,7 +1,7 @@ -From 010c48b5ab6ae04da9c348e985a5f41397437fdc Mon Sep 17 00:00:00 2001 +From 8b11e3150fbb5b70d328888664475ca9ebec39fa Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 20 Jan 2023 19:19:37 +0000 -Subject: [PATCH 09/16] Support theme= url parameter for forcing the theme from +Subject: [PATCH 07/15] Support theme= url parameter for forcing the theme from outside --- @@ -9,10 +9,10 @@ Subject: [PATCH 09/16] Support theme= url parameter for forcing the theme from 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/front_end/ui/legacy/theme_support/theme_support_impl.ts b/front_end/ui/legacy/theme_support/theme_support_impl.ts -index 05736bc0b8..530028d5b0 100644 +index a16673168f..04bac851d3 100644 --- a/front_end/ui/legacy/theme_support/theme_support_impl.ts +++ b/front_end/ui/legacy/theme_support/theme_support_impl.ts -@@ -135,19 +135,21 @@ export class ThemeSupport extends EventTarget { +@@ -134,19 +134,21 @@ export class ThemeSupport extends EventTarget { } applyTheme(document: Document): void { @@ -41,5 +41,5 @@ index 05736bc0b8..530028d5b0 100644 this.customSheets.clear(); this.dispatchEvent(new ThemeChangeEvent()); -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0008-Basic-support-for-text-colour-in-dark-mode-in-browse.patch b/packages/wrangler-devtools/patches/0008-Basic-support-for-text-colour-in-dark-mode-in-browse.patch new file mode 100644 index 000000000000..f9c8b2eb691f --- /dev/null +++ b/packages/wrangler-devtools/patches/0008-Basic-support-for-text-colour-in-dark-mode-in-browse.patch @@ -0,0 +1,73 @@ +From 4f06ecdab94922e227b3f4d098d0875efbb724a1 Mon Sep 17 00:00:00 2001 +From: Samuel Macleod +Date: Mon, 23 Jan 2023 15:12:38 +0000 +Subject: [PATCH 08/15] Basic support for text colour in dark mode in browsers + that don't implement :host-context + +--- + front_end/entrypoint_template.html | 38 ++++++++++++++++++++++++------ + 1 file changed, 31 insertions(+), 7 deletions(-) + +diff --git a/front_end/entrypoint_template.html b/front_end/entrypoint_template.html +index 945aa6d816..14d3e0071b 100644 +--- a/front_end/entrypoint_template.html ++++ b/front_end/entrypoint_template.html +@@ -13,8 +13,34 @@ + background-color: rgb(41 42 45); + } + } ++ ++ .platform-mac { ++ --monospace-font-size: 11px; ++ --monospace-font-family: menlo, monospace; ++ --source-code-font-size: 11px; ++ --source-code-font-family: menlo, monospace; ++ } ++ ++ .platform-windows { ++ --monospace-font-size: 12px; ++ --monospace-font-family: consolas, lucida console, courier new, monospace; ++ --source-code-font-size: 12px; ++ --source-code-font-family: consolas, lucida console, courier new, monospace; ++ } ++ ++ .platform-linux { ++ --monospace-font-size: 11px; ++ --monospace-font-family: dejavu sans mono, monospace; ++ --source-code-font-size: 11px; ++ --source-code-font-family: dejavu sans mono, monospace; ++ } ++ ++ .-theme-with-dark-background .platform-linux, ++ .-theme-with-dark-background .platform-mac { ++ --override-text-color: rgb(189 198 207); ++ } + +- ++ + + ++ ++ + +-- +2.39.3 (Apple Git-145) + diff --git a/packages/wrangler-devtools/patches/0008-Show-an-overlay-on-the-memory-tab-in-Firefox.patch b/packages/wrangler-devtools/patches/0008-Show-an-overlay-on-the-memory-tab-in-Firefox.patch deleted file mode 100644 index 5d90fc63da19..000000000000 --- a/packages/wrangler-devtools/patches/0008-Show-an-overlay-on-the-memory-tab-in-Firefox.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 67881d8f2c90958d2532a8b2d794548b7836ec66 Mon Sep 17 00:00:00 2001 -From: Samuel Macleod -Date: Thu, 19 Jan 2023 18:49:47 +0000 -Subject: [PATCH 08/16] Show an overlay on the memory tab in Firefox - ---- - front_end/entrypoint_template.html | 18 ++++++++++++++++-- - front_end/panels/profiler/profilesPanel.css | 16 ++++++++++++++++ - 2 files changed, 32 insertions(+), 2 deletions(-) - -diff --git a/front_end/entrypoint_template.html b/front_end/entrypoint_template.html -index 945aa6d816..b451da60eb 100644 ---- a/front_end/entrypoint_template.html -+++ b/front_end/entrypoint_template.html -@@ -14,7 +14,13 @@ - } - } - -- -+ -+ - - -- -+ -+ -\ No newline at end of file -diff --git a/front_end/panels/profiler/profilesPanel.css b/front_end/panels/profiler/profilesPanel.css -index 693621a273..9b330e7cf0 100644 ---- a/front_end/panels/profiler/profilesPanel.css -+++ b/front_end/panels/profiler/profilesPanel.css -@@ -28,6 +28,22 @@ - */ - /* Profiler Style */ - -+ -+.heap_profiler::after { -+ content: "⚠️ The 'Memory' tab is only supported in Chrome"; -+ position: absolute; -+ top: 0px; -+ background: rgba(0, 0, 0, 0.8); -+ z-index: 9999; -+ width: 100%; -+ left: 0px; -+ height: 100%; -+ color: white; -+ font-size: 2em; -+ display: var(--heap-profiler-tab-display); -+ justify-content: center; -+ align-content: center; -+} - #profile-views { - flex: auto; - position: relative; --- -2.41.0 - diff --git a/packages/wrangler-devtools/patches/0011-Fallback-to-location-for-domain.patch b/packages/wrangler-devtools/patches/0009-Fallback-to-location-for-domain.patch similarity index 74% rename from packages/wrangler-devtools/patches/0011-Fallback-to-location-for-domain.patch rename to packages/wrangler-devtools/patches/0009-Fallback-to-location-for-domain.patch index 476a34891ffc..254b01b00562 100644 --- a/packages/wrangler-devtools/patches/0011-Fallback-to-location-for-domain.patch +++ b/packages/wrangler-devtools/patches/0009-Fallback-to-location-for-domain.patch @@ -1,17 +1,17 @@ -From 035ac87786e0f52c9ce36680083a07f1806b24bb Mon Sep 17 00:00:00 2001 +From 597f5cee506058efa09d952b94e7b9a2ad384e9d Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 26 Jan 2023 15:27:04 +0000 -Subject: [PATCH 11/16] Fallback to location for domain +Subject: [PATCH 09/15] Fallback to location for domain --- front_end/panels/sources/NavigatorView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front_end/panels/sources/NavigatorView.ts b/front_end/panels/sources/NavigatorView.ts -index c7a64ab432..ca32b5202e 100644 +index 01532aa06a..72c037d297 100644 --- a/front_end/panels/sources/NavigatorView.ts +++ b/front_end/panels/sources/NavigatorView.ts -@@ -757,7 +757,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O +@@ -792,7 +792,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O } if (!projectOrigin) { @@ -22,5 +22,5 @@ index c7a64ab432..ca32b5202e 100644 const parsedURL = new Common.ParsedURL.ParsedURL(projectOrigin); -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0010-Basic-support-for-text-colour-in-dark-mode-in-browse.patch b/packages/wrangler-devtools/patches/0010-Basic-support-for-text-colour-in-dark-mode-in-browse.patch deleted file mode 100644 index a3aed40cbb07..000000000000 --- a/packages/wrangler-devtools/patches/0010-Basic-support-for-text-colour-in-dark-mode-in-browse.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 7c24a16730403a6db93a01aeb0d07c4910d320f6 Mon Sep 17 00:00:00 2001 -From: Samuel Macleod -Date: Mon, 23 Jan 2023 15:12:38 +0000 -Subject: [PATCH 10/16] Basic support for text colour in dark mode in browsers - that don't implement :host-context - ---- - front_end/entrypoint_template.html | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - -diff --git a/front_end/entrypoint_template.html b/front_end/entrypoint_template.html -index b451da60eb..8828dd8f07 100644 ---- a/front_end/entrypoint_template.html -+++ b/front_end/entrypoint_template.html -@@ -18,6 +18,32 @@ - :root { - --heap-profiler-tab-display: none - } -+ -+ .platform-mac { -+ --monospace-font-size: 11px; -+ --monospace-font-family: menlo, monospace; -+ --source-code-font-size: 11px; -+ --source-code-font-family: menlo, monospace; -+ } -+ -+ .platform-windows { -+ --monospace-font-size: 12px; -+ --monospace-font-family: consolas, lucida console, courier new, monospace; -+ --source-code-font-size: 12px; -+ --source-code-font-family: consolas, lucida console, courier new, monospace; -+ } -+ -+ .platform-linux { -+ --monospace-font-size: 11px; -+ --monospace-font-family: dejavu sans mono, monospace; -+ --source-code-font-size: 11px; -+ --source-code-font-family: dejavu sans mono, monospace; -+ } -+ -+ .-theme-with-dark-background .platform-linux, -+ .-theme-with-dark-background .platform-mac { -+ --override-text-color: rgb(189 198 207); -+ } - - --- -2.41.0 - diff --git a/packages/wrangler-devtools/patches/0012-Hide-unsupported-settings-UI.patch b/packages/wrangler-devtools/patches/0010-Hide-unsupported-settings-UI.patch similarity index 86% rename from packages/wrangler-devtools/patches/0012-Hide-unsupported-settings-UI.patch rename to packages/wrangler-devtools/patches/0010-Hide-unsupported-settings-UI.patch index b13a01cbd8ba..005f09cd6c54 100644 --- a/packages/wrangler-devtools/patches/0012-Hide-unsupported-settings-UI.patch +++ b/packages/wrangler-devtools/patches/0010-Hide-unsupported-settings-UI.patch @@ -1,7 +1,7 @@ -From 3de10e06c66c60a9e2e34e4192571a0a8be30029 Mon Sep 17 00:00:00 2001 +From 3c9b2a24e6afefffe5485516fab7bfb38107c9d6 Mon Sep 17 00:00:00 2001 From: bcoll Date: Thu, 26 Jan 2023 15:30:34 +0000 -Subject: [PATCH 12/16] Hide unsupported settings UI +Subject: [PATCH 10/15] Hide unsupported settings UI - Show CORS errors in console setting - Show XHR requests in console setting @@ -15,10 +15,10 @@ Subject: [PATCH 12/16] Hide unsupported settings UI 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/front_end/panels/console/ConsoleView.ts b/front_end/panels/console/ConsoleView.ts -index 3e698c0eb7..77c7a1431c 100644 +index eb61914002..f7b9f0a912 100644 --- a/front_end/panels/console/ConsoleView.ts +++ b/front_end/panels/console/ConsoleView.ts -@@ -458,14 +458,10 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea +@@ -468,14 +468,10 @@ export class ConsoleView extends UI.Widget.VBox implements i18nString(UIStrings.onlyShowMessagesFromTheCurrentContext), i18nString(UIStrings.selectedContextOnly)); ConsoleView.appendSettingsCheckboxToToolbar( settingsToolbarLeft, this.groupSimilarSetting, i18nString(UIStrings.groupSimilarMessagesInConsole)); @@ -34,10 +34,10 @@ index 3e698c0eb7..77c7a1431c 100644 settingsToolbarRight, 'consoleEagerEval', i18nString(UIStrings.eagerlyEvaluateTextInThePrompt)); ConsoleView.appendSettingsCheckboxToToolbar( diff --git a/front_end/panels/settings/SettingsScreen.ts b/front_end/panels/settings/SettingsScreen.ts -index af732358ad..089ee5edc8 100644 +index a1c443c74e..3648b2d74a 100644 --- a/front_end/panels/settings/SettingsScreen.ts +++ b/front_end/panels/settings/SettingsScreen.ts -@@ -380,6 +380,10 @@ export class GenericSettingsTab extends SettingsTab { +@@ -379,6 +379,10 @@ export class GenericSettingsTab extends SettingsTab { const uiSectionName = Common.Settings.getLocalizedSettingsCategory(category); const sectionElement = this.appendSection(uiSectionName); for (const settingRegistration of settings) { @@ -49,10 +49,10 @@ index af732358ad..089ee5edc8 100644 const settingControl = UI.SettingsUI.createControlForSetting(setting); if (settingControl) { diff --git a/front_end/panels/settings/settingsScreen.css b/front_end/panels/settings/settingsScreen.css -index df0806e90d..0b20193865 100644 +index 583c2e345e..e574de5002 100644 --- a/front_end/panels/settings/settingsScreen.css +++ b/front_end/panels/settings/settingsScreen.css -@@ -234,3 +234,8 @@ label { +@@ -238,3 +238,8 @@ label { color: HighlightText; } } @@ -62,5 +62,5 @@ index df0806e90d..0b20193865 100644 + display: none; +} -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0014-Add-ping-to-improve-connection-stability.patch b/packages/wrangler-devtools/patches/0011-Add-ping-to-improve-connection-stability.patch similarity index 81% rename from packages/wrangler-devtools/patches/0014-Add-ping-to-improve-connection-stability.patch rename to packages/wrangler-devtools/patches/0011-Add-ping-to-improve-connection-stability.patch index 1dc2c4830c64..e6f9a96e3bc4 100644 --- a/packages/wrangler-devtools/patches/0014-Add-ping-to-improve-connection-stability.patch +++ b/packages/wrangler-devtools/patches/0011-Add-ping-to-improve-connection-stability.patch @@ -1,17 +1,17 @@ -From e17ef45cf30b880519d9be96402f784beb363c4e Mon Sep 17 00:00:00 2001 +From b2e4d126f70ba0a96163411c7bd60c2fe7af4872 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 4 May 2023 03:21:58 +0100 -Subject: [PATCH 14/16] Add ping to improve connection stability +Subject: [PATCH 11/15] Add ping to improve connection stability --- front_end/core/protocol_client/InspectorBackend.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/front_end/core/protocol_client/InspectorBackend.ts b/front_end/core/protocol_client/InspectorBackend.ts -index bc7ccf9c08..7d033a7b26 100644 +index 99e6b17d14..1263a56cc7 100644 --- a/front_end/core/protocol_client/InspectorBackend.ts +++ b/front_end/core/protocol_client/InspectorBackend.ts -@@ -249,6 +249,8 @@ export class SessionRouter { +@@ -259,6 +259,8 @@ export class SessionRouter { proxyConnection: ((Connection | undefined)|null), }>; #pendingScripts: (() => void)[]; @@ -20,7 +20,7 @@ index bc7ccf9c08..7d033a7b26 100644 constructor(connection: Connection) { this.#connectionInternal = connection; -@@ -266,11 +268,18 @@ export class SessionRouter { +@@ -276,11 +278,18 @@ export class SessionRouter { this.#connectionInternal.setOnMessage(this.onMessage.bind(this)); this.#connectionInternal.setOnDisconnect(reason => { @@ -40,5 +40,5 @@ index bc7ccf9c08..7d033a7b26 100644 registerSession(target: TargetBase, sessionId: string, proxyConnection?: Connection|null): void { -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0015-Support-sourcemaps.patch b/packages/wrangler-devtools/patches/0012-Support-sourcemaps.patch similarity index 69% rename from packages/wrangler-devtools/patches/0015-Support-sourcemaps.patch rename to packages/wrangler-devtools/patches/0012-Support-sourcemaps.patch index 38b610207434..ccc2260e833c 100644 --- a/packages/wrangler-devtools/patches/0015-Support-sourcemaps.patch +++ b/packages/wrangler-devtools/patches/0012-Support-sourcemaps.patch @@ -1,13 +1,13 @@ -From cb79cae04886e81f8be78d4f90fad920b1e81f7c Mon Sep 17 00:00:00 2001 -From: Samuel Macleod -Date: Thu, 4 May 2023 03:22:33 +0100 -Subject: [PATCH 15/16] Support sourcemaps: +From 85b0de956a4c57150c9b43fd1e6096074809df27 Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Mon, 2 Oct 2023 18:30:44 +0100 +Subject: [PATCH 12/15] Support sourcemaps: * Recognise `wrangler://` URLs as "special", and always load them with Network.loadNetworkResource * Support a `text` property on the response to `Network.loadNetworkResource` to support providing a raw response, rather than a response stream - * Enable the experimental `AUTHORED_DEPLOYED_GROUPING` and `JUST_MY_CODE` by default, for a better splitting of sourcemapped/deployed Worker code, and to su + * Enable the experimental `AUTHORED_DEPLOYED_GROUPING` and `JUST_MY_CODE` by default, for a better splitting of sourcemapped/deployed Worker code --- front_end/core/common/ParsedURL.ts | 2 +- front_end/core/sdk/PageResourceLoader.ts | 4 +++- @@ -15,10 +15,10 @@ Subject: [PATCH 15/16] Support sourcemaps: 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/front_end/core/common/ParsedURL.ts b/front_end/core/common/ParsedURL.ts -index 37c79c85c1..bc52e4c7ce 100644 +index 7e667fc467..d4719f900d 100644 --- a/front_end/core/common/ParsedURL.ts +++ b/front_end/core/common/ParsedURL.ts -@@ -355,7 +355,7 @@ export class ParsedURL { +@@ -358,7 +358,7 @@ export class ParsedURL { // Return special URLs as-is. const trimmedHref = href.trim(); if (trimmedHref.startsWith('data:') || trimmedHref.startsWith('blob:') || trimmedHref.startsWith('javascript:') || @@ -28,12 +28,12 @@ index 37c79c85c1..bc52e4c7ce 100644 } diff --git a/front_end/core/sdk/PageResourceLoader.ts b/front_end/core/sdk/PageResourceLoader.ts -index b057267115..23d7872699 100644 +index be22f944c1..190b4c3891 100644 --- a/front_end/core/sdk/PageResourceLoader.ts +++ b/front_end/core/sdk/PageResourceLoader.ts -@@ -307,7 +307,9 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper -Date: Wed, 15 Feb 2023 15:07:45 +0000 -Subject: [PATCH 13/16] DEVX-380 Hide debugger sidebar and disable breakpoints - -- Hides debugger sidebar -- Removes toggle debugger sidebar command -- Disables breakpoint creation ---- - front_end/panels/sources/DebuggerPlugin.ts | 5 ----- - front_end/panels/sources/SourcesPanel.ts | 6 +----- - front_end/panels/sources/sources-meta.ts | 23 ---------------------- - 3 files changed, 1 insertion(+), 33 deletions(-) - -diff --git a/front_end/panels/sources/DebuggerPlugin.ts b/front_end/panels/sources/DebuggerPlugin.ts -index 81f01d388f..6871a61d55 100644 ---- a/front_end/panels/sources/DebuggerPlugin.ts -+++ b/front_end/panels/sources/DebuggerPlugin.ts -@@ -228,11 +228,6 @@ export class DebuggerPlugin extends Plugin { - this.scriptsPanel = SourcesPanel.instance(); - this.breakpointManager = Bindings.BreakpointManager.BreakpointManager.instance(); - -- this.breakpointManager.addEventListener( -- Bindings.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this); -- this.breakpointManager.addEventListener( -- Bindings.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this); -- - this.uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this); - this.uiSourceCode.addEventListener( - Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this); -diff --git a/front_end/panels/sources/SourcesPanel.ts b/front_end/panels/sources/SourcesPanel.ts -index 72287c6b5d..1e094864ea 100644 ---- a/front_end/panels/sources/SourcesPanel.ts -+++ b/front_end/panels/sources/SourcesPanel.ts -@@ -248,6 +248,7 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi - new UI.SplitWidget.SplitWidget(true, true, 'sourcesPanelSplitViewState', initialDebugSidebarWidth); - this.splitWidget.enableShowModeSaving(); - this.splitWidget.show(this.element); -+ this.splitWidget.hideSidebar(false); - - // Create scripts navigator - const initialNavigatorWidth = 225; -@@ -355,11 +356,6 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi - } - if (!isInWrapper) { - panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton); -- if (panel.splitWidget.isVertical()) { -- panel.sourcesViewInternal.rightToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton); -- } else { -- panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton); -- } - } - } - -diff --git a/front_end/panels/sources/sources-meta.ts b/front_end/panels/sources/sources-meta.ts -index c5e95ab535..9c53bca1b3 100644 ---- a/front_end/panels/sources/sources-meta.ts -+++ b/front_end/panels/sources/sources-meta.ts -@@ -1375,29 +1375,6 @@ UI.ActionRegistration.registerActionExtension({ - ], - }); - --UI.ActionRegistration.registerActionExtension({ -- actionId: 'sources.toggle-debugger-sidebar', -- category: UI.ActionRegistration.ActionCategory.SOURCES, -- title: i18nLazyString(UIStrings.toggleDebuggerSidebar), -- async loadActionDelegate() { -- const Sources = await loadSourcesModule(); -- return Sources.SourcesPanel.ActionDelegate.instance(); -- }, -- contextTypes() { -- return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]); -- }, -- bindings: [ -- { -- platform: UI.ActionRegistration.Platforms.WindowsLinux, -- shortcut: 'Ctrl+Shift+h', -- }, -- { -- platform: UI.ActionRegistration.Platforms.Mac, -- shortcut: 'Meta+Shift+h', -- }, -- ], --}); -- - Common.Settings.registerSettingExtension({ - settingName: 'navigatorGroupByFolder', - settingType: Common.Settings.SettingType.BOOLEAN, --- -2.41.0 - diff --git a/packages/wrangler-devtools/patches/0016-Disable-debugger-when-query-parameter-debugger-is-fa.patch b/packages/wrangler-devtools/patches/0013-Enable-debugger-when-query-parameter-debugger-is-tru.patch similarity index 54% rename from packages/wrangler-devtools/patches/0016-Disable-debugger-when-query-parameter-debugger-is-fa.patch rename to packages/wrangler-devtools/patches/0013-Enable-debugger-when-query-parameter-debugger-is-tru.patch index 3e098d6d4ce6..3e0e48bba03b 100644 --- a/packages/wrangler-devtools/patches/0016-Disable-debugger-when-query-parameter-debugger-is-fa.patch +++ b/packages/wrangler-devtools/patches/0013-Enable-debugger-when-query-parameter-debugger-is-tru.patch @@ -1,54 +1,59 @@ -From 238f57c76bd8dc90069bb8004f832688ee1224db Mon Sep 17 00:00:00 2001 +From d3add591e59cefa45458a29341185824df9334b2 Mon Sep 17 00:00:00 2001 From: Workers DevProd -Date: Thu, 17 Aug 2023 13:31:48 -0500 -Subject: [PATCH 16/16] Eanble debugger when query parameter `debugger` is true +Date: Wed, 4 Oct 2023 00:57:43 +0100 +Subject: [PATCH 13/15] Enable debugger when query parameter `debugger` is true --- - front_end/panels/sources/DebuggerPlugin.ts | 8 +++++++ - front_end/panels/sources/SourcesPanel.ts | 14 +++++++++++- - front_end/panels/sources/sources-meta.ts | 26 ++++++++++++++++++++++ - 3 files changed, 47 insertions(+), 1 deletion(-) + front_end/panels/sources/DebuggerPlugin.ts | 7 +++- + front_end/panels/sources/SourcesPanel.ts | 18 +++++--- + front_end/panels/sources/sources-meta.ts | 49 ++++++++++++---------- + 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/front_end/panels/sources/DebuggerPlugin.ts b/front_end/panels/sources/DebuggerPlugin.ts -index 6871a61d55..50b38ca92c 100644 +index c403f0e37f..d7f8798497 100644 --- a/front_end/panels/sources/DebuggerPlugin.ts +++ b/front_end/panels/sources/DebuggerPlugin.ts -@@ -228,6 +228,14 @@ export class DebuggerPlugin extends Plugin { +@@ -253,10 +253,13 @@ export class DebuggerPlugin extends Plugin { this.scriptsPanel = SourcesPanel.instance(); - this.breakpointManager = Bindings.BreakpointManager.BreakpointManager.instance(); + this.breakpointManager = Breakpoints.BreakpointManager.BreakpointManager.instance(); +- this.breakpointManager.addEventListener( + const debuggerEnabled = Root.Runtime.Runtime.queryParam('debugger') === 'true'; + if (debuggerEnabled) { + this.breakpointManager.addEventListener( -+ Bindings.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this); + Breakpoints.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this); +- this.breakpointManager.addEventListener( + this.breakpointManager.addEventListener( -+ Bindings.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this); + Breakpoints.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this); + } -+ + this.uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this); this.uiSourceCode.addEventListener( - Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this); diff --git a/front_end/panels/sources/SourcesPanel.ts b/front_end/panels/sources/SourcesPanel.ts -index 1e094864ea..ac30f5d54c 100644 +index 8a06b6c6e9..10f2c33c86 100644 --- a/front_end/panels/sources/SourcesPanel.ts +++ b/front_end/panels/sources/SourcesPanel.ts -@@ -248,7 +248,11 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi - new UI.SplitWidget.SplitWidget(true, true, 'sourcesPanelSplitViewState', initialDebugSidebarWidth); +@@ -242,6 +242,11 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi this.splitWidget.enableShowModeSaving(); this.splitWidget.show(this.element); -- this.splitWidget.hideSidebar(false); -+ + + const debuggerEnabled = Root.Runtime.Runtime.queryParam('debugger') === 'true'; + if (!debuggerEnabled) { + this.splitWidget.hideSidebar(false); + } - ++ // Create scripts navigator const initialNavigatorWidth = 225; -@@ -355,6 +359,14 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi + this.editorView = +@@ -347,12 +352,15 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi panel.splitWidget.installResizer(panel.sourcesViewInternal.toolbarContainerElement()); } if (!isInWrapper) { +- panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton); +- if (panel.splitWidget.isVertical()) { +- panel.sourcesViewInternal.rightToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton); +- } else { +- panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton); + const debuggerEnabled = Root.Runtime.Runtime.queryParam('debugger') === 'true'; + if (debuggerEnabled) { + if (panel.splitWidget.isVertical()) { @@ -56,15 +61,16 @@ index 1e094864ea..ac30f5d54c 100644 + } else { + panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton); + } -+ } - panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton); + } ++ panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton); } } + diff --git a/front_end/panels/sources/sources-meta.ts b/front_end/panels/sources/sources-meta.ts -index 9c53bca1b3..036c33ea16 100644 +index 4b8244ea69..749065fdeb 100644 --- a/front_end/panels/sources/sources-meta.ts +++ b/front_end/panels/sources/sources-meta.ts -@@ -586,6 +586,32 @@ UI.ActionRegistration.registerActionExtension({ +@@ -609,6 +609,32 @@ UI.ActionRegistration.registerActionExtension({ ], }); @@ -97,6 +103,36 @@ index 9c53bca1b3..036c33ea16 100644 UI.ActionRegistration.registerActionExtension({ category: UI.ActionRegistration.ActionCategory.DEBUGGER, actionId: 'debugger.step-over', +@@ -1399,29 +1425,6 @@ UI.ActionRegistration.registerActionExtension({ + ], + }); + +-UI.ActionRegistration.registerActionExtension({ +- actionId: 'sources.toggle-debugger-sidebar', +- category: UI.ActionRegistration.ActionCategory.SOURCES, +- title: i18nLazyString(UIStrings.toggleDebuggerSidebar), +- async loadActionDelegate() { +- const Sources = await loadSourcesModule(); +- return Sources.SourcesPanel.ActionDelegate.instance(); +- }, +- contextTypes() { +- return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]); +- }, +- bindings: [ +- { +- platform: UI.ActionRegistration.Platforms.WindowsLinux, +- shortcut: 'Ctrl+Shift+h', +- }, +- { +- platform: UI.ActionRegistration.Platforms.Mac, +- shortcut: 'Meta+Shift+h', +- }, +- ], +-}); +- + Common.Settings.registerSettingExtension({ + settingName: 'navigatorGroupByFolder', + settingType: Common.Settings.SettingType.BOOLEAN, -- -2.41.0 +2.39.3 (Apple Git-145) diff --git a/packages/wrangler-devtools/patches/0014-Show-Profiling-panel.patch b/packages/wrangler-devtools/patches/0014-Show-Profiling-panel.patch new file mode 100644 index 000000000000..2c27a20e75f2 --- /dev/null +++ b/packages/wrangler-devtools/patches/0014-Show-Profiling-panel.patch @@ -0,0 +1,159 @@ +From 0488c38300b4125cd9c8d1956894baac47d03d9a Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Wed, 4 Oct 2023 01:11:14 +0100 +Subject: [PATCH 14/15] Show Profiling panel + +--- + front_end/entrypoints/main/MainImpl.ts | 1 + + .../panels/js_profiler/js_profiler-meta.ts | 99 +------------------ + front_end/panels/profiler/ProfilesPanel.ts | 1 - + 3 files changed, 2 insertions(+), 99 deletions(-) + +diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts +index e4d10c442a..e66c539007 100644 +--- a/front_end/entrypoints/main/MainImpl.ts ++++ b/front_end/entrypoints/main/MainImpl.ts +@@ -439,6 +439,7 @@ export class MainImpl { + Root.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR, + Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING, + Root.Runtime.ExperimentName.JUST_MY_CODE, ++ Root.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE, + ]); + + Root.Runtime.experiments.setNonConfigurableExperiments([ +diff --git a/front_end/panels/js_profiler/js_profiler-meta.ts b/front_end/panels/js_profiler/js_profiler-meta.ts +index 2c0f3e64ec..0bcdf01551 100644 +--- a/front_end/panels/js_profiler/js_profiler-meta.ts ++++ b/front_end/panels/js_profiler/js_profiler-meta.ts +@@ -88,7 +88,7 @@ UI.ViewManager.registerViewExtension({ + title: i18nLazyString(UIStrings.profiler), + commandPrompt: i18nLazyString(UIStrings.showProfiler), + order: 65, +- persistence: UI.ViewManager.ViewPersistence.CLOSEABLE, ++ persistence: UI.ViewManager.ViewPersistence.PERMANENT, + experiment: Root.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE, + async loadView() { + const Profiler = await loadProfilerModule(); +@@ -96,20 +96,6 @@ UI.ViewManager.registerViewExtension({ + }, + }); + +-UI.ViewManager.registerViewExtension({ +- location: UI.ViewManager.ViewLocationValues.PANEL, +- id: 'timeline', +- title: i18nLazyString(UIStrings.performance), +- commandPrompt: i18nLazyString(UIStrings.showPerformance), +- order: 66, +- hasToolbar: false, +- isPreviewFeature: true, +- async loadView() { +- const Timeline = await loadTimelineModule(); +- return Timeline.TimelinePanel.TimelinePanel.instance({forceNew: null, isNode: true}); +- }, +-}); +- + UI.ActionRegistration.registerActionExtension({ + actionId: 'profiler.js-toggle-recording', + category: UI.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER, +@@ -136,86 +122,3 @@ UI.ActionRegistration.registerActionExtension({ + }, + ], + }); +- +-UI.ActionRegistration.registerActionExtension({ +- actionId: 'timeline.show-history', +- async loadActionDelegate() { +- const Timeline = await loadTimelineModule(); +- return Timeline.TimelinePanel.ActionDelegate.instance(); +- }, +- category: UI.ActionRegistration.ActionCategory.PERFORMANCE, +- title: i18nLazyString(UIStrings.showRecentTimelineSessions), +- contextTypes() { +- return maybeRetrieveTimelineContextTypes(Timeline => [Timeline.TimelinePanel.TimelinePanel]); +- }, +- bindings: [ +- { +- platform: UI.ActionRegistration.Platforms.WindowsLinux, +- shortcut: 'Ctrl+H', +- }, +- { +- platform: UI.ActionRegistration.Platforms.Mac, +- shortcut: 'Meta+Y', +- }, +- ], +-}); +- +-UI.ActionRegistration.registerActionExtension({ +- actionId: 'timeline.toggle-recording', +- category: UI.ActionRegistration.ActionCategory.PERFORMANCE, +- iconClass: UI.ActionRegistration.IconClass.START_RECORDING, +- toggleable: true, +- toggledIconClass: UI.ActionRegistration.IconClass.STOP_RECORDING, +- toggleWithRedColor: true, +- contextTypes() { +- return maybeRetrieveTimelineContextTypes(Timeline => [Timeline.TimelinePanel.TimelinePanel]); +- }, +- async loadActionDelegate() { +- const Timeline = await loadTimelineModule(); +- return Timeline.TimelinePanel.ActionDelegate.instance(); +- }, +- options: [ +- { +- value: true, +- title: i18nLazyString(UIStrings.record), +- }, +- { +- value: false, +- title: i18nLazyString(UIStrings.stop), +- }, +- ], +- bindings: [ +- { +- platform: UI.ActionRegistration.Platforms.WindowsLinux, +- shortcut: 'Ctrl+E', +- }, +- { +- platform: UI.ActionRegistration.Platforms.Mac, +- shortcut: 'Meta+E', +- }, +- ], +-}); +- +-UI.ActionRegistration.registerActionExtension({ +- actionId: 'timeline.record-reload', +- iconClass: UI.ActionRegistration.IconClass.REFRESH, +- contextTypes() { +- return maybeRetrieveTimelineContextTypes(Timeline => [Timeline.TimelinePanel.TimelinePanel]); +- }, +- category: UI.ActionRegistration.ActionCategory.PERFORMANCE, +- title: i18nLazyString(UIStrings.startProfilingAndReloadPage), +- async loadActionDelegate() { +- const Timeline = await loadTimelineModule(); +- return Timeline.TimelinePanel.ActionDelegate.instance(); +- }, +- bindings: [ +- { +- platform: UI.ActionRegistration.Platforms.WindowsLinux, +- shortcut: 'Ctrl+Shift+E', +- }, +- { +- platform: UI.ActionRegistration.Platforms.Mac, +- shortcut: 'Meta+Shift+E', +- }, +- ], +-}); +diff --git a/front_end/panels/profiler/ProfilesPanel.ts b/front_end/panels/profiler/ProfilesPanel.ts +index a175dfb050..28d46d7378 100644 +--- a/front_end/panels/profiler/ProfilesPanel.ts ++++ b/front_end/panels/profiler/ProfilesPanel.ts +@@ -753,7 +753,6 @@ export class JSProfilerPanel extends ProfilesPanel implements UI.ActionRegistrat + ], + /* disableSetting? */ undefined); + infobar.setParentView(this); +- this.splitWidget().mainWidget()?.element.prepend(infobar.element); + } + + #showDeprecationWarningAndNoPanel(): void { +-- +2.39.3 (Apple Git-145) + diff --git a/packages/wrangler-devtools/patches/0015-Basic-support-for-Safari.patch b/packages/wrangler-devtools/patches/0015-Basic-support-for-Safari.patch new file mode 100644 index 000000000000..9732e69e035e --- /dev/null +++ b/packages/wrangler-devtools/patches/0015-Basic-support-for-Safari.patch @@ -0,0 +1,46 @@ +From 8b0cffa7ec0679ca5aff6eb86654b08956fa33f9 Mon Sep 17 00:00:00 2001 +From: Workers DevProd +Date: Thu, 5 Oct 2023 16:37:38 +0100 +Subject: [PATCH 15/15] Basic support for Safari + +--- + front_end/core/dom_extension/DOMExtension.ts | 2 +- + front_end/entrypoint_template.html | 8 +++++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/front_end/core/dom_extension/DOMExtension.ts b/front_end/core/dom_extension/DOMExtension.ts +index 6fb8d5237f..6b1e3d1342 100644 +--- a/front_end/core/dom_extension/DOMExtension.ts ++++ b/front_end/core/dom_extension/DOMExtension.ts +@@ -132,7 +132,7 @@ Node.prototype.getComponentSelection = function(): Selection|null { + while (parent && parent.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) { + parent = parent.parentNode; + } +- return parent instanceof ShadowRoot ? parent.getSelection() : this.window().getSelection(); ++ return parent instanceof ShadowRoot ? (parent?.getSelection?.() ?? this.window().getSelection()) : this.window().getSelection(); + }; + + Node.prototype.hasSelection = function(): boolean { +diff --git a/front_end/entrypoint_template.html b/front_end/entrypoint_template.html +index 14d3e0071b..fa96b72fef 100644 +--- a/front_end/entrypoint_template.html ++++ b/front_end/entrypoint_template.html +@@ -40,8 +40,14 @@ + --override-text-color: rgb(189 198 207); + } + +- ++ + ++ +