Add a new Chromium feature for partial style recalc after font loading
This patch adds a new Chromium feature to control the Blink runtime
enabled feature CSSReducedFontLoadingInvalidations. This allows us to
study performance impacts of the feature via finch experiments.
Bug: 441925
Change-Id: Icba6f1f1899af0bcecc12cf570786a07364f4fab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040616
Reviewed-by: Kentaro Hara <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#738864}
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 21ebf85..bb75180 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -358,6 +358,9 @@
kEnableOnly},
{"HTMLImports", blink::features::kWebComponentsV0Enabled,
kEnableOnly},
+ {"CSSReducedFontLoadingInvalidations",
+ blink::features::kCSSReducedFontLoadingInvalidations,
+ kUseFeatureState},
};
for (const auto& mapping : runtimeFeatureNameToChromiumFeatureMapping) {
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
index 3929f2d..6a8c93c5 100644
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -453,5 +453,8 @@
const base::Feature kForceExtraRenderingToTrackStickyFrame{
"ForceExtraRenderingToTrackStickyFrame", base::FEATURE_DISABLED_BY_DEFAULT};
+const base::Feature kCSSReducedFontLoadingInvalidations{
+ "CSSReducedFontLoadingInvalidations", base::FEATURE_DISABLED_BY_DEFAULT};
+
} // namespace features
} // namespace blink
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
index 8fe175a..e1b4d28 100644
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -146,6 +146,9 @@
BLINK_COMMON_EXPORT extern const base::Feature
kForceExtraRenderingToTrackStickyFrame;
+BLINK_COMMON_EXPORT extern const base::Feature
+ kCSSReducedFontLoadingInvalidations;
+
} // namespace features
} // namespace blink