Skip to content

Commit 65a3e35

Browse files
authored
chore: update devtools patches (#7693)
* update patches * add "make dev" * changeset
1 parent cf424bb commit 65a3e35

10 files changed

+33
-23
lines changed

.changeset/red-pillows-provide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/chrome-devtools-patches": patch
3+
---
4+
5+
chore: rebases patches on latest devtools head

packages/chrome-devtools-patches/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ROOT = $(realpath .)
22
PATH_WITH_DEPOT = $(PATH):$(ROOT)/depot/
33
# The upstream devtools commit upon which our patches are based
4-
HEAD = 279239c4c670edbde12345aca4fadb7f07d503e8
4+
HEAD = 538f92a49ba5cbc615bcaa063214fca38ab87813
55
PATCHES = $(shell ls ${PWD}/patches/*.patch)
66
depot:
77
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot
@@ -28,3 +28,8 @@ cleanup:
2828

2929
test:
3030
git -C devtools-frontend am $(PATCHES)
31+
32+
dev:
33+
cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" npm run install-deps
34+
cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" gn gen out/Default --args="devtools_skip_typecheck=true"
35+
cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" npm run watch

packages/chrome-devtools-patches/patches/0001-Expand-Browser-support-make-it-work-in-Firefox-Safar.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From f33a1c016aca11dd75e912ba3373be01fc7480da Mon Sep 17 00:00:00 2001
1+
From 308d29672a61ba0cd0e4751460ae15c0f0930666 Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 14:15:43 +0100
44
Subject: [PATCH 1/8] Expand Browser support (make it work in Firefox & Safari)
@@ -23,7 +23,7 @@ If updating the commit of devtools upon which these patches are based, make sure
2323
4 files changed, 46 insertions(+), 2 deletions(-)
2424

2525
diff --git a/front_end/core/dom_extension/DOMExtension.ts b/front_end/core/dom_extension/DOMExtension.ts
26-
index 940ce81924..e9542743ff 100644
26+
index 5060011dba..1ca615e641 100644
2727
--- a/front_end/core/dom_extension/DOMExtension.ts
2828
+++ b/front_end/core/dom_extension/DOMExtension.ts
2929
@@ -132,7 +132,7 @@ Node.prototype.getComponentSelection = function(): Selection|null {
@@ -100,7 +100,7 @@ index 45028f436a..6a154030b6 100644
100100
static instance(opts: {forceNew: boolean|null} = {forceNew: null}): JsMainImpl {
101101
const {forceNew} = opts;
102102
diff --git a/front_end/ui/legacy/components/data_grid/DataGrid.ts b/front_end/ui/legacy/components/data_grid/DataGrid.ts
103-
index 93a117e746..d9e37e3d7a 100644
103+
index 24f6b09d0c..8b9ca969ae 100644
104104
--- a/front_end/ui/legacy/components/data_grid/DataGrid.ts
105105
+++ b/front_end/ui/legacy/components/data_grid/DataGrid.ts
106106
@@ -217,6 +217,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
@@ -109,9 +109,9 @@ index 93a117e746..d9e37e3d7a 100644
109109
this.dataTableBody = this.dataTable.createChild('tbody');
110110
+ // This is required for Firefox, else Firefox will position the <tbody/> *under* the <thead/>
111111
+ (this.dataTableBody as HTMLElement).style.height = 'calc(100% - 27px)';
112-
this.topFillerRow = (this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed') as HTMLElement);
112+
this.topFillerRow = this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed');
113113
UI.ARIAUtils.setHidden(this.topFillerRow, true);
114-
this.bottomFillerRow = (this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed') as HTMLElement);
114+
this.bottomFillerRow = this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed');
115115
@@ -505,6 +507,9 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
116116
protected setVerticalPadding(top: number, bottom: number, isConstructorTime: boolean = false): void {
117117
const topPx = top + 'px';

packages/chrome-devtools-patches/patches/0002-Setup-Cloudflare-devtools-target-type.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 6fbdae0bba47eeb10a779fbfbb15bbe6f17fa798 Mon Sep 17 00:00:00 2001
1+
From 06c925f4b3b765ac35d77ed504b626656a89581c Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 16:06:06 +0100
44
Subject: [PATCH 2/8] Setup Cloudflare devtools target type

packages/chrome-devtools-patches/patches/0003-Add-ping-to-improve-connection-stability.-Without-th.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 233ae8633d7a84f662ebdea564070fcbee2f42d4 Mon Sep 17 00:00:00 2001
1+
From 202a5226a8f850a955b07c7abc301f3031d9a72d Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 15:04:17 +0100
44
Subject: [PATCH 3/8] Add ping to improve connection stability. Without this,

packages/chrome-devtools-patches/patches/0004-Support-viewing-source-files-over-the-network.-This-.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From f55dc8200dda3025eb7866f2706a08851aa0d3dd Mon Sep 17 00:00:00 2001
1+
From 79eef448a1e63c2295d67938f92a83093289ffe6 Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 15:26:38 +0100
44
Subject: [PATCH 4/8] Support viewing source files over the network. This
@@ -23,7 +23,7 @@ Subject: [PATCH 4/8] Support viewing source files over the network. This
2323
6 files changed, 15 insertions(+), 40 deletions(-)
2424

2525
diff --git a/front_end/core/common/ParsedURL.ts b/front_end/core/common/ParsedURL.ts
26-
index 832d76c19c..968439ade4 100644
26+
index 100d9ec45f..d75d6e4f2f 100644
2727
--- a/front_end/core/common/ParsedURL.ts
2828
+++ b/front_end/core/common/ParsedURL.ts
2929
@@ -366,7 +366,7 @@ export class ParsedURL {
@@ -88,20 +88,20 @@ index 1a6644df92..1724a33bd4 100644
8888
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
8989
async loadView() {
9090
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
91-
index 978092dea5..fc463ec0c9 100644
91+
index fbc6a1bd71..e6bc57bbb0 100644
9292
--- a/front_end/entrypoints/main/MainImpl.ts
9393
+++ b/front_end/entrypoints/main/MainImpl.ts
94-
@@ -421,6 +421,8 @@ export class MainImpl {
95-
Root.Runtime.ExperimentName.TIMELINE_ANNOTATIONS,
94+
@@ -414,6 +414,8 @@ export class MainImpl {
9695
Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN,
9796
Root.Runtime.ExperimentName.FLOATING_ENTRY_POINTS_FOR_AI_ASSISTANCE,
97+
Root.Runtime.ExperimentName.TIMELINE_ALTERNATIVE_NAVIGATION,
9898
+ Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,
9999
+ Root.Runtime.ExperimentName.JUST_MY_CODE,
100100
...(Root.Runtime.Runtime.queryParam('isChromeForTesting') ? ['protocol-monitor'] : []),
101101
]);
102102

103103
diff --git a/front_end/panels/sources/NavigatorView.ts b/front_end/panels/sources/NavigatorView.ts
104-
index 6f4c52f3e7..2f5ada52e6 100644
104+
index d9da41ab84..73f42a22be 100644
105105
--- a/front_end/panels/sources/NavigatorView.ts
106106
+++ b/front_end/panels/sources/NavigatorView.ts
107107
@@ -795,8 +795,9 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
@@ -117,7 +117,7 @@ index 6f4c52f3e7..2f5ada52e6 100644
117117

118118
const parsedURL = new Common.ParsedURL.ParsedURL(projectOrigin);
119119
diff --git a/front_end/panels/sources/sources-meta.ts b/front_end/panels/sources/sources-meta.ts
120-
index 42a2e17f07..c41a8d2c7a 100644
120+
index f4284da33b..76bb296abb 100644
121121
--- a/front_end/panels/sources/sources-meta.ts
122122
+++ b/front_end/panels/sources/sources-meta.ts
123123
@@ -495,32 +495,6 @@ UI.ViewManager.registerViewExtension({

packages/chrome-devtools-patches/patches/0005-Support-forcing-the-devtools-theme-via-a-query-param.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 0f7a1adad6b0bfbafe60fbc4c161fa9a7ef0381f Mon Sep 17 00:00:00 2001
1+
From 94301beb8effbc0b3a2d11934369d4c6071fe73c Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 15:05:56 +0100
44
Subject: [PATCH 5/8] Support forcing the devtools theme via a query parameter,

packages/chrome-devtools-patches/patches/0006-All-about-the-network-tab.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 3b484138dabb583349363df0e2d69ffe3c1dc039 Mon Sep 17 00:00:00 2001
1+
From c0a3154c9483ac4390d8459cb5869b58afa8d503 Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 16:05:12 +0100
44
Subject: [PATCH 6/8] All about the network tab!
@@ -16,7 +16,7 @@ Subject: [PATCH 6/8] All about the network tab!
1616
4 files changed, 9 insertions(+), 28 deletions(-)
1717

1818
diff --git a/front_end/core/sdk/NetworkManager.ts b/front_end/core/sdk/NetworkManager.ts
19-
index 8735116e61..953d3fc7b1 100644
19+
index 4093f80cf8..1eb3199a53 100644
2020
--- a/front_end/core/sdk/NetworkManager.ts
2121
+++ b/front_end/core/sdk/NetworkManager.ts
2222
@@ -34,6 +34,7 @@
@@ -73,7 +73,7 @@ index 1724a33bd4..884c6264d2 100644
7373

7474
import * as Common from '../../core/common/common.js';
7575
diff --git a/front_end/panels/network/NetworkPanel.ts b/front_end/panels/network/NetworkPanel.ts
76-
index 71c40a6873..abf30cc4e8 100644
76+
index 7d44f68bf3..f4b7ec0973 100644
7777
--- a/front_end/panels/network/NetworkPanel.ts
7878
+++ b/front_end/panels/network/NetworkPanel.ts
7979
@@ -75,14 +75,6 @@ const UIStrings = {
@@ -91,7 +91,7 @@ index 71c40a6873..abf30cc4e8 100644
9191
/**
9292
*@description Tooltip text that appears when hovering over the largeicon settings gear in show settings pane setting in network panel of the network panel
9393
*/
94-
@@ -158,10 +150,6 @@ const UIStrings = {
94+
@@ -180,10 +172,6 @@ const UIStrings = {
9595
*@description Text in Network Panel that is displayed when frames are being fetched.
9696
*/
9797
fetchingFrames: 'Fetching frames...',
@@ -102,7 +102,7 @@ index 71c40a6873..abf30cc4e8 100644
102102
};
103103
const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkPanel.ts', UIStrings);
104104
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
105-
@@ -422,21 +410,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
105+
@@ -444,21 +432,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
106106
this.panelToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(
107107
this.preserveLogSetting, i18nString(UIStrings.doNotClearLogOnPageReload), i18nString(UIStrings.preserveLog)));
108108

packages/chrome-devtools-patches/patches/0007-Limit-heap-profiling-modes-available.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 01012531546fccc62536fba7d1bfde6c5cc1a6c2 Mon Sep 17 00:00:00 2001
1+
From 6bca6c563e616596aa75a88f1d52b8f9150ba93c Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 16:07:24 +0100
44
Subject: [PATCH 7/8] Limit heap profiling modes available

packages/chrome-devtools-patches/patches/0008-Use-the-worker-name-as-the-title-for-the-Javascript-.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 57b100b2455fc3adb794218c4d15c44052a16f52 Mon Sep 17 00:00:00 2001
1+
From 25c22c6909222b58a576a04c29c2baf517ecf69c Mon Sep 17 00:00:00 2001
22
From: Workers DevProd <[email protected]>
33
Date: Fri, 25 Oct 2024 16:11:10 +0100
44
Subject: [PATCH 8/8] Use the worker name as the title for the Javascript

0 commit comments

Comments
 (0)