From fe13e800cd953f1e24443b8b7bce9da6571c5865 Mon Sep 17 00:00:00 2001 From: Sangwoo Ko Date: Tue, 22 Aug 2023 08:54:16 +0900 Subject: [PATCH] Hide more items from Devtools > Application tab (#19649) Hide following items that we've disabled * interest groups * shared storage * Background Fetch/Sync * Periodic Background Sync * Reporting API In order to keep the patch file single line, dynamically removes elements instead of commenting out the code. --- ...application-ApplicationPanelSidebar.ts.patch | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch b/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch index 12cc0debf956..13571506ee8f 100644 --- a/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch +++ b/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch @@ -1,13 +1,12 @@ diff --git a/front_end/panels/application/ApplicationPanelSidebar.ts b/front_end/panels/application/ApplicationPanelSidebar.ts -index 6d2b584f4779e6bc10de5558ca0f46fa80b2abaa..218e6f0f2044d189bf13c32e1a5979bc79d3cdef 100644 +index 6d2b584f4779e6bc10de5558ca0f46fa80b2abaa..c4b297b812d066059f0b42e6d99a07da8ef0188b 100644 --- a/front_end/panels/application/ApplicationPanelSidebar.ts +++ b/front_end/panels/application/ApplicationPanelSidebar.ts -@@ -357,7 +357,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe - storageTreeElement.appendChild(this.cookieListTreeElement); +@@ -468,6 +468,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe + // Work-around for crbug.com/1152713: Something is wrong with custom scrollbars and size containment. + // @ts-ignore + this.contentElement.style.contain = 'layout style'; ++ [this.trustTokensTreeElement, this.interestGroupTreeElement, this.sharedStorageListTreeElement].forEach(e => storageTreeElement.removeChild(e)); [this.backgroundFetchTreeElement, this.backgroundSyncTreeElement, this.periodicBackgroundSyncTreeElement, this.reportingApiTreeElement].forEach(e => backgroundServiceTreeElement.removeChild(e)); + } - this.trustTokensTreeElement = new TrustTokensTreeElement(panel); -- storageTreeElement.appendChild(this.trustTokensTreeElement); -+ // storageTreeElement.appendChild(this.trustTokensTreeElement); - - this.interestGroupTreeElement = new InterestGroupTreeElement(panel); - storageTreeElement.appendChild(this.interestGroupTreeElement); + private addSidebarSection(title: string): UI.TreeOutline.TreeElement {