From 74f95383e1e4dcec00bd6e151ca86cce7a291ecc Mon Sep 17 00:00:00 2001 From: Yuzu Saijo Date: Tue, 18 Jan 2022 12:37:22 +0900 Subject: [PATCH] [bfcache] Add an experiment to show frame tree structured reason This CL adds a new experiment on DevTools to show the bfcache blocking reasons in a frame tree strucuture. This will be enabled by default once we have all the reasons reported (currently there's a bug where some reasons are missing). Bug: 1288158 Change-Id: Id778a8b7320ef7092e280297add40cdd2936a299 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3396918 Reviewed-by: Yang Guo Reviewed-by: Wolfgang Beyer Commit-Queue: Yuzu Saijo --- front_end/core/host/UserMetrics.ts | 3 ++- front_end/entrypoints/main/MainImpl.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/front_end/core/host/UserMetrics.ts b/front_end/core/host/UserMetrics.ts index 08d5fc999c..c0653efe4f 100644 --- a/front_end/core/host/UserMetrics.ts +++ b/front_end/core/host/UserMetrics.ts @@ -583,7 +583,8 @@ export enum DevtoolsExperiments { 'groupAndHideIssuesByKind' = 51, 'cssTypeComponentLength' = 52, 'preciseChanges' = 53, - 'MaxValue' = 54, + 'bfcacheDisplayTree' = 54, + 'MaxValue' = 55, } /* eslint-enable @typescript-eslint/naming-convention */ diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts index 3257faf9c2..4a07beaa9e 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts @@ -297,6 +297,10 @@ export class MainImpl { 'keyboardShortcutEditor', 'Enable keyboard shortcut editor', true, 'https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts'); + // Back/forward cache + Root.Runtime.experiments.register( + 'bfcacheDisplayTree', 'Show back/forward cache blocking reasons in the frame tree structure view'); + // Timeline Root.Runtime.experiments.register('timelineEventInitiators', 'Timeline: event initiators'); Root.Runtime.experiments.register('timelineInvalidationTracking', 'Timeline: invalidation tracking', true);