From 6c5418d0e9371c1f6379db6c86d62d6f488450e9 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 2 May 2018 10:38:57 +0200 Subject: [PATCH] Fix Remote Debugging is missing 'Select Element Button' --- patch/patch.cfg | 5 +++ patch/patches/devtools_837145.patch | 64 +++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 patch/patches/devtools_837145.patch diff --git a/patch/patch.cfg b/patch/patch.cfg index f32df38ab..b5566cc93 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -368,4 +368,9 @@ patches = [ # https://crrev.com/35dabc0d 'name': 'service_worker_jumbo', }, + { + # Fix Remote Debugging is missing 'Select Element Button' + # https://bugs.chromium.org/p/chromium/issues/detail?id=837145 + 'name': 'devtools_837145', + }, ] diff --git a/patch/patches/devtools_837145.patch b/patch/patches/devtools_837145.patch new file mode 100644 index 000000000..602975ee8 --- /dev/null +++ b/patch/patches/devtools_837145.patch @@ -0,0 +1,64 @@ +diff --git content/shell/browser/shell_devtools_frontend.cc content/shell/browser/shell_devtools_frontend.cc +index 3b3221a..6447347 100644 +--- content/shell/browser/shell_devtools_frontend.cc ++++ content/shell/browser/shell_devtools_frontend.cc +@@ -19,8 +19,8 @@ + namespace { + static GURL GetFrontendURL() { + int port = ShellDevToolsManagerDelegate::GetHttpHandlerPort(); +- return GURL( +- base::StringPrintf("http://127.0.0.1:%d/devtools/inspector.html", port)); ++ return GURL(base::StringPrintf( ++ "http://127.0.0.1:%d/devtools/devtools_app.html", port)); + } + } // namespace + +diff --git third_party/WebKit/Source/devtools/BUILD.gn third_party/WebKit/Source/devtools/BUILD.gn +index 952b922..9e7b4bf 100644 +--- third_party/WebKit/Source/devtools/BUILD.gn ++++ third_party/WebKit/Source/devtools/BUILD.gn +@@ -1048,7 +1048,6 @@ + "$resources_out_dir/cm_modes/cm_modes_module.js", + "$resources_out_dir/emulated_devices/emulated_devices_module.js", + "$resources_out_dir/product_registry_impl/product_registry_impl_module.js", +- "$resources_out_dir/screencast/screencast_module.js", + ] + + devtools_applications = [ +diff --git third_party/WebKit/Source/devtools/front_end/inspector.json third_party/WebKit/Source/devtools/front_end/inspector.json +index 36c222f..dc2149a 100644 +--- third_party/WebKit/Source/devtools/front_end/inspector.json ++++ third_party/WebKit/Source/devtools/front_end/inspector.json +@@ -1,6 +1,6 @@ + { + "modules" : [ +- { "name": "screencast", "type": "remote" } ++ { "name": "screencast", "type": "autostart" } + ], + "extends": "devtools_app", + "has_html": true +diff --git third_party/WebKit/Source/devtools/front_end/main/Main.js third_party/WebKit/Source/devtools/front_end/main/Main.js +index 4c9d9aa..e6d73b1 100644 +--- third_party/WebKit/Source/devtools/front_end/main/Main.js ++++ third_party/WebKit/Source/devtools/front_end/main/Main.js +@@ -212,19 +212,8 @@ + this._registerForwardedShortcuts(); + this._registerMessageSinkListener(); + +- // Pick first app we could instantiate (for test harness). +- for (const extension of self.runtime.extensions(Common.AppProvider)) { +- try { +- const instance = await extension.instance(); +- if (instance) { +- this._showAppUI(instance); +- break; +- } +- } catch (e) { +- console.error(e); +- } +- } + Main.Main.timeEnd('Main._createAppUI'); ++ this._showAppUI(await self.runtime.extension(Common.AppProvider).instance()); + } + + /**