Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update devtools patches #7693

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/red-pillows-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/chrome-devtools-patches": patch
---

chore: rebases patches on latest devtools head
7 changes: 6 additions & 1 deletion packages/chrome-devtools-patches/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT = $(realpath .)
PATH_WITH_DEPOT = $(PATH):$(ROOT)/depot/
# The upstream devtools commit upon which our patches are based
HEAD = 279239c4c670edbde12345aca4fadb7f07d503e8
HEAD = 538f92a49ba5cbc615bcaa063214fca38ab87813
PATCHES = $(shell ls ${PWD}/patches/*.patch)
depot:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot
Expand All @@ -28,3 +28,8 @@ cleanup:

test:
git -C devtools-frontend am $(PATCHES)

dev:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the scripts couldn't find the installed tools without setting the path here, so i've added this in and will update the wiki page

cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" npm run install-deps
cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" gn gen out/Default --args="devtools_skip_typecheck=true"
cd devtools-frontend && PATH="$(PATH_WITH_DEPOT)" npm run watch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f33a1c016aca11dd75e912ba3373be01fc7480da Mon Sep 17 00:00:00 2001
From 308d29672a61ba0cd0e4751460ae15c0f0930666 Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 14:15:43 +0100
Subject: [PATCH 1/8] Expand Browser support (make it work in Firefox & Safari)
Expand All @@ -23,7 +23,7 @@ If updating the commit of devtools upon which these patches are based, make sure
4 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/front_end/core/dom_extension/DOMExtension.ts b/front_end/core/dom_extension/DOMExtension.ts
index 940ce81924..e9542743ff 100644
index 5060011dba..1ca615e641 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 {
Expand Down Expand Up @@ -100,7 +100,7 @@ index 45028f436a..6a154030b6 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 93a117e746..d9e37e3d7a 100644
index 24f6b09d0c..8b9ca969ae 100644
--- a/front_end/ui/legacy/components/data_grid/DataGrid.ts
+++ b/front_end/ui/legacy/components/data_grid/DataGrid.ts
@@ -217,6 +217,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
Expand All @@ -109,9 +109,9 @@ index 93a117e746..d9e37e3d7a 100644
this.dataTableBody = this.dataTable.createChild('tbody');
+ // This is required for Firefox, else Firefox will position the <tbody/> *under* the <thead/>
+ (this.dataTableBody as HTMLElement).style.height = 'calc(100% - 27px)';
this.topFillerRow = (this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed') as HTMLElement);
this.topFillerRow = this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed');
UI.ARIAUtils.setHidden(this.topFillerRow, true);
this.bottomFillerRow = (this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed') as HTMLElement);
this.bottomFillerRow = this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed');
@@ -505,6 +507,9 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
protected setVerticalPadding(top: number, bottom: number, isConstructorTime: boolean = false): void {
const topPx = top + 'px';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6fbdae0bba47eeb10a779fbfbb15bbe6f17fa798 Mon Sep 17 00:00:00 2001
From 06c925f4b3b765ac35d77ed504b626656a89581c Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 16:06:06 +0100
Subject: [PATCH 2/8] Setup Cloudflare devtools target type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 233ae8633d7a84f662ebdea564070fcbee2f42d4 Mon Sep 17 00:00:00 2001
From 202a5226a8f850a955b07c7abc301f3031d9a72d Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 15:04:17 +0100
Subject: [PATCH 3/8] Add ping to improve connection stability. Without this,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f55dc8200dda3025eb7866f2706a08851aa0d3dd Mon Sep 17 00:00:00 2001
From 79eef448a1e63c2295d67938f92a83093289ffe6 Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 15:26:38 +0100
Subject: [PATCH 4/8] Support viewing source files over the network. This
Expand All @@ -23,7 +23,7 @@ Subject: [PATCH 4/8] Support viewing source files over the network. This
6 files changed, 15 insertions(+), 40 deletions(-)

diff --git a/front_end/core/common/ParsedURL.ts b/front_end/core/common/ParsedURL.ts
index 832d76c19c..968439ade4 100644
index 100d9ec45f..d75d6e4f2f 100644
--- a/front_end/core/common/ParsedURL.ts
+++ b/front_end/core/common/ParsedURL.ts
@@ -366,7 +366,7 @@ export class ParsedURL {
Expand Down Expand Up @@ -88,20 +88,20 @@ index 1a6644df92..1724a33bd4 100644
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
async loadView() {
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index 978092dea5..fc463ec0c9 100644
index fbc6a1bd71..e6bc57bbb0 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -421,6 +421,8 @@ export class MainImpl {
Root.Runtime.ExperimentName.TIMELINE_ANNOTATIONS,
@@ -414,6 +414,8 @@ export class MainImpl {
Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN,
Root.Runtime.ExperimentName.FLOATING_ENTRY_POINTS_FOR_AI_ASSISTANCE,
Root.Runtime.ExperimentName.TIMELINE_ALTERNATIVE_NAVIGATION,
+ Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,
+ Root.Runtime.ExperimentName.JUST_MY_CODE,
...(Root.Runtime.Runtime.queryParam('isChromeForTesting') ? ['protocol-monitor'] : []),
]);

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

const parsedURL = new Common.ParsedURL.ParsedURL(projectOrigin);
diff --git a/front_end/panels/sources/sources-meta.ts b/front_end/panels/sources/sources-meta.ts
index 42a2e17f07..c41a8d2c7a 100644
index f4284da33b..76bb296abb 100644
--- a/front_end/panels/sources/sources-meta.ts
+++ b/front_end/panels/sources/sources-meta.ts
@@ -495,32 +495,6 @@ UI.ViewManager.registerViewExtension({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 0f7a1adad6b0bfbafe60fbc4c161fa9a7ef0381f Mon Sep 17 00:00:00 2001
From 94301beb8effbc0b3a2d11934369d4c6071fe73c Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 15:05:56 +0100
Subject: [PATCH 5/8] Support forcing the devtools theme via a query parameter,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 3b484138dabb583349363df0e2d69ffe3c1dc039 Mon Sep 17 00:00:00 2001
From c0a3154c9483ac4390d8459cb5869b58afa8d503 Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 16:05:12 +0100
Subject: [PATCH 6/8] All about the network tab!
Expand All @@ -16,7 +16,7 @@ Subject: [PATCH 6/8] All about the network tab!
4 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/front_end/core/sdk/NetworkManager.ts b/front_end/core/sdk/NetworkManager.ts
index 8735116e61..953d3fc7b1 100644
index 4093f80cf8..1eb3199a53 100644
--- a/front_end/core/sdk/NetworkManager.ts
+++ b/front_end/core/sdk/NetworkManager.ts
@@ -34,6 +34,7 @@
Expand Down Expand Up @@ -73,7 +73,7 @@ index 1724a33bd4..884c6264d2 100644

import * as Common from '../../core/common/common.js';
diff --git a/front_end/panels/network/NetworkPanel.ts b/front_end/panels/network/NetworkPanel.ts
index 71c40a6873..abf30cc4e8 100644
index 7d44f68bf3..f4b7ec0973 100644
--- a/front_end/panels/network/NetworkPanel.ts
+++ b/front_end/panels/network/NetworkPanel.ts
@@ -75,14 +75,6 @@ const UIStrings = {
Expand All @@ -91,7 +91,7 @@ index 71c40a6873..abf30cc4e8 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
*/
@@ -158,10 +150,6 @@ const UIStrings = {
@@ -180,10 +172,6 @@ const UIStrings = {
*@description Text in Network Panel that is displayed when frames are being fetched.
*/
fetchingFrames: 'Fetching frames...',
Expand All @@ -102,7 +102,7 @@ index 71c40a6873..abf30cc4e8 100644
};
const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkPanel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -422,21 +410,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
@@ -444,21 +432,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
this.panelToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(
this.preserveLogSetting, i18nString(UIStrings.doNotClearLogOnPageReload), i18nString(UIStrings.preserveLog)));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 01012531546fccc62536fba7d1bfde6c5cc1a6c2 Mon Sep 17 00:00:00 2001
From 6bca6c563e616596aa75a88f1d52b8f9150ba93c Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 16:07:24 +0100
Subject: [PATCH 7/8] Limit heap profiling modes available
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 57b100b2455fc3adb794218c4d15c44052a16f52 Mon Sep 17 00:00:00 2001
From 25c22c6909222b58a576a04c29c2baf517ecf69c Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Fri, 25 Oct 2024 16:11:10 +0100
Subject: [PATCH 8/8] Use the worker name as the title for the Javascript
Expand Down
Loading