Commit 5b7019ed authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Prepare CSSKeyframesMemoryReduction for finch experiment

This patch adds a Chromium feature for CSSKeyframesMemoryReduction and
enables it in field trial testing config. This is preparation for a
Canary/Dev finch experiment.

Bug: 1141814
Change-Id: I03c1c9beca18bdf4b286704f60b6895f60835d12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518097Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824639}
parent b73428c2
......@@ -338,6 +338,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
{"BlockHTMLParserOnStyleSheets",
blink::features::kBlockHTMLParserOnStyleSheets},
{"CSSColorSchemeUARendering", features::kCSSColorSchemeUARendering},
{"CSSKeyframesMemoryReduction",
blink::features::kCSSKeyframesMemoryReduction},
{"CSSReducedFontLoadingLayoutInvalidations",
blink::features::kCSSReducedFontLoadingLayoutInvalidations},
{"CSSMatchedPropertiesCacheDependencies",
......
......@@ -1235,6 +1235,27 @@
]
}
],
"CSSKeyframesMemoryReduction": [
{
"platforms": [
"android",
"android_weblayer",
"android_webview",
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"CSSKeyframesMemoryReduction"
]
}
]
}
],
"CSSMatchedPropertiesCacheDependencies": [
{
"platforms": [
......
......@@ -798,5 +798,12 @@ const base::Feature kWebRtcLibvpxEncodeNV12{"WebRtcLibvpxEncodeNV12",
// the page is frozen.
const base::Feature kLoadingTasksUnfreezable{"LoadingTasksUnfreezable",
base::FEATURE_DISABLED_BY_DEFAULT};
// Changes ScopedStyleResolve and StyleEngine to use the already stored
// StyleSheetCollection to find @keyframes rules instead of creating their
// own hashmaps, so that we can save memory when there are web components
// with @keyframes rules in their stylesheets.
const base::Feature kCSSKeyframesMemoryReduction{
"CSSKeyframesMemoryReduction", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace features
} // namespace blink
......@@ -327,6 +327,8 @@ BLINK_COMMON_EXPORT extern const base::Feature kWebAppEnableProtocolHandlers;
BLINK_COMMON_EXPORT extern const base::Feature kWebRtcLibvpxEncodeNV12;
BLINK_COMMON_EXPORT extern const base::Feature kLoadingTasksUnfreezable;
BLINK_COMMON_EXPORT extern const base::Feature kCSSKeyframesMemoryReduction;
} // namespace features
} // namespace blink
......
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