Browse Source

fix: rename patches/devtools_frontend to patches/devtools-frontend (#42212)

* Correct patches/devtools_frontend to patches/devtools-frontend

Remove folder patches/devtools_frontend

* Update .patches

* Move patches to patches/devtools-frontend

From patches/devtools_frontend to patches/devtools-frontend

* Update config.json

rename devtools_frontend to devtools-frontend

* Update cherry-pick-19a4eebd05a7.patch

remove duplicated patch for ChildTargetManager.ts

* Delete patches/devtools-frontend/cherry-pick-19a4eebd05a7.patch

There are no test folder in devtools-frontend, so this patch can not be applied.

* Update .patches

cherry-pick-8a3bfd4b7403.patch
was not valid for this branch

* Update cherry-pick-8a3bfd4b7403.patch
appdevopts 11 months ago
parent
commit
65d35309db

+ 1 - 1
patches/config.json

@@ -1,7 +1,7 @@
 [
   { "patch_dir": "src/electron/patches/chromium", "repo": "src" },
   { "patch_dir": "src/electron/patches/boringssl", "repo": "src/third_party/boringssl/src" },
-  { "patch_dir": "src/electron/patches/devtools_frontend", "repo": "src/third_party/devtools-frontend/src" },
+  { "patch_dir": "src/electron/patches/devtools-frontend", "repo": "src/third_party/devtools-frontend/src" },
   { "patch_dir": "src/electron/patches/ffmpeg", "repo": "src/third_party/ffmpeg" },
   { "patch_dir": "src/electron/patches/v8", "repo":  "src/v8" },
   { "patch_dir": "src/electron/patches/node", "repo": "src/third_party/electron_node" },

+ 2 - 1
patches/devtools-frontend/.patches

@@ -1,2 +1,3 @@
+chore_expose_ui_to_allow_electron_to_set_dock_side.patch
+fix_support_for_worklet_targets.patch
 cherry-pick-8a3bfd4b7403.patch
-cherry-pick-19a4eebd05a7.patch

+ 0 - 98
patches/devtools-frontend/cherry-pick-19a4eebd05a7.patch

@@ -1,98 +0,0 @@
-From 19a4eebd05a725daad9c254a342717f2ed203015 Mon Sep 17 00:00:00 2001
-From: Andrey Kosyakov <[email protected]>
-Date: Tue, 12 Mar 2024 19:58:44 -0700
-Subject: [PATCH] Fix support for worklet targets
-
-Bug: 327027138
-Change-Id: I051565c591645f0a4ccc297825d299c0764501ca
-Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5367245
-Reviewed-by: Danil Somsikov <[email protected]>
-Commit-Queue: Andrey Kosyakov <[email protected]>
----
-
-diff --git a/front_end/core/sdk/ChildTargetManager.ts b/front_end/core/sdk/ChildTargetManager.ts
-index f2b6e42..895bdc7 100644
---- a/front_end/core/sdk/ChildTargetManager.ts
-+++ b/front_end/core/sdk/ChildTargetManager.ts
-@@ -172,6 +172,8 @@
-       type = Type.Frame;
-     } else if (targetInfo.type === 'worker') {
-       type = Type.Worker;
-+    } else if (targetInfo.type === 'worklet') {
-+      type = Type.Worklet;
-     } else if (targetInfo.type === 'shared_worker') {
-       type = Type.SharedWorker;
-     } else if (targetInfo.type === 'shared_storage_worklet') {
-diff --git a/test/e2e/BUILD.gn b/test/e2e/BUILD.gn
-index cac27fe..1e70e50 100644
---- a/test/e2e/BUILD.gn
-+++ b/test/e2e/BUILD.gn
-@@ -45,6 +45,7 @@
-     "settings",
-     "snippets",
-     "sources",
-+    "targets",
-     "webaudio",
-   ]
- }
-diff --git a/test/e2e/targets/BUILD.gn b/test/e2e/targets/BUILD.gn
-new file mode 100644
-index 0000000..d7e979b
---- /dev/null
-+++ b/test/e2e/targets/BUILD.gn
-@@ -0,0 +1,14 @@
-+# Copyright 2020 The Chromium Authors. All rights reserved.
-+# Use of this source code is governed by a BSD-style license that can be
-+# found in the LICENSE file.
-+
-+import("../../../third_party/typescript/typescript.gni")
-+
-+node_ts_library("targets") {
-+  sources = [ "worklet_test.ts" ]
-+
-+  deps = [
-+    "../../shared",
-+    "../helpers",
-+  ]
-+}
-diff --git a/test/e2e/targets/worklet_test.ts b/test/e2e/targets/worklet_test.ts
-new file mode 100644
-index 0000000..9b8bfad
---- /dev/null
-+++ b/test/e2e/targets/worklet_test.ts
-@@ -0,0 +1,35 @@
-+// Copyright 2024 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+import {assert} from 'chai';
-+
-+import {
-+  getBrowserAndPages,
-+  goToResource,
-+  waitForFunction,
-+} from '../../shared/helper.js';
-+import {describe, it} from '../../shared/mocha-extensions.js';
-+import {
-+  getStructuredConsoleMessages,
-+  navigateToConsoleTab,
-+} from '../helpers/console-helpers.js';
-+
-+describe('Audio worklet support', () => {
-+  it('Receiving log messages from Audio worklets', async () => {
-+    const {target} = getBrowserAndPages();
-+    await goToResource('empty.html');
-+    await navigateToConsoleTab();
-+    await target.evaluate(() => {
-+      const blob = new Blob(['console.log(\'hello from worklet\')'], {type: 'application/javascript'});
-+      const url = URL.createObjectURL(blob);
-+      const audioContext = new AudioContext();
-+      return audioContext.audioWorklet.addModule(url);
-+    });
-+    const message = await waitForFunction(async () => {
-+      const messages = await getStructuredConsoleMessages();
-+      return messages[0];
-+    });
-+    assert.strictEqual(message.message, 'hello from worklet');
-+  });
-+});

+ 6 - 7
patches/devtools-frontend/cherry-pick-8a3bfd4b7403.patch

@@ -1,7 +1,7 @@
-From 8a3bfd4b74038b16733245dde9a94c1a99522852 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Andrey Kosyakov <[email protected]>
-Date: Tue, 09 Jan 2024 16:47:29 -0800
-Subject: [PATCH] Add support of the Worklet target
+Date: Tue, 9 Jan 2024 16:47:29 -0800
+Subject: Add support of the Worklet target
 
 This is in preparation for the back-end to report regular renderer
 based worklets (such as CSS / Animation / Audio) as worklets rather
@@ -15,13 +15,12 @@ Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-fronte
 Reviewed-by: Danil Somsikov <[email protected]>
 Commit-Queue: Danil Somsikov <[email protected]>
 Auto-Submit: Andrey Kosyakov <[email protected]>
----
 
 diff --git a/front_end/core/sdk/Target.ts b/front_end/core/sdk/Target.ts
-index 736c567..7d2e42b 100644
+index fceaf85f3e07747e00f56b31f618e1fc3bf25cab..15470508d85019348266e22b99a866d0be6770c8 100644
 --- a/front_end/core/sdk/Target.ts
 +++ b/front_end/core/sdk/Target.ts
-@@ -70,6 +70,9 @@
+@@ -70,6 +70,9 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
          this.#capabilitiesMask = Capability.JS | Capability.Log | Capability.Network | Capability.Target |
              Capability.IO | Capability.Media | Capability.Emulation | Capability.EventBreakpoints;
          break;
@@ -31,7 +30,7 @@ index 736c567..7d2e42b 100644
        case Type.Node:
          this.#capabilitiesMask = Capability.JS;
          break;
-@@ -254,6 +257,7 @@
+@@ -254,6 +257,7 @@ export enum Type {
    Node = 'node',
    Browser = 'browser',
    AuctionWorklet = 'auction-worklet',

+ 0 - 0
patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch → patches/devtools-frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch


+ 0 - 0
patches/devtools_frontend/fix_support_for_worklet_targets.patch → patches/devtools-frontend/fix_support_for_worklet_targets.patch


+ 0 - 2
patches/devtools_frontend/.patches

@@ -1,2 +0,0 @@
-chore_expose_ui_to_allow_electron_to_set_dock_side.patch
-fix_support_for_worklet_targets.patch