Commit 9cdf4320 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

[BlinkGenPropertyTrees] Fully control blink flag via feature setting

When BlinkGenPropertyTrees was moved from status=experimental to
status=stable in https://crrev.com/633410, there became no way to
disable the feature with chrome's feature setting. This is because
runtime_features.cc had this bad logic:
if (base::FeatureList::IsEnabled(blink::features::kBlinkGenPropertyTrees))
  WebRuntimeFeatures::EnableFeatureFromString("BlinkGenPropertyTrees", true);

Because finch uses feature settings, this affects the control group of
the BlinkGenPropertyTrees finch trial. This patch updates the runtime
enabled feature to be fully controlled by the chrome feature setting.

Tested the following scenarios:
+------------------------------------------------+-----------+------------+
|                      flag                      | pre-patch | post-patch |
+------------------------------------------------+-----------+------------+
|                     no flag                    | BGPT on   |  BGPT on   |
| --enable-features=BlinkGenPropertyTrees        | BGPT on   |  BGPT on   |
| --disable-features=BlinkGenPropertyTrees       | BGPT on   |  BGPT off  |
| --enable-blink-features=BlinkGenPropertyTrees  | BGPT on   |  BPGT on   |
| --disable-blink-features=BlinkGenPropertyTrees | BGPT off  |  BGPT off  |
+------------------------------------------------+-----------+------------+

Bug: 935195
Change-Id: Iba560582e3b2b2377f6b4af31a4c6263215467fa
Reviewed-on: https://chromium-review.googlesource.com/c/1485491Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Auto-Submit: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635262}
parent 076e7da5
......@@ -225,8 +225,9 @@ void SetIndividualRuntimeFeatures(
if (base::FeatureList::IsEnabled(features::kScrollAnchorSerialization))
WebRuntimeFeatures::EnableScrollAnchorSerialization(true);
if (base::FeatureList::IsEnabled(blink::features::kBlinkGenPropertyTrees))
WebRuntimeFeatures::EnableFeatureFromString("BlinkGenPropertyTrees", true);
WebRuntimeFeatures::EnableFeatureFromString(
"BlinkGenPropertyTrees",
base::FeatureList::IsEnabled(blink::features::kBlinkGenPropertyTrees));
WebRuntimeFeatures::EnablePassiveDocumentEventListeners(
base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners));
......
......@@ -48,7 +48,7 @@ const base::Feature kJankTrackingSweepLine{"JankTrackingSweepLine",
// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
// generates the compositor property trees. See: https://crbug.com/836884.
const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
base::FEATURE_DISABLED_BY_DEFAULT};
base::FEATURE_ENABLED_BY_DEFAULT};
// Enable LayoutNG.
const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment