0

calc-size + interpolate-size WebDX feature use counters + test mappings

This adds:

* a WebFeature use counter for calc-size()
* a WebDXFeature for both calc-size() and interpolate-size
* WPT test mappings for both WebDX features

The WebDX features are described at:
https://web-platform-dx.github.io/web-features-explorer/features/calc-size/
https://web-platform-dx.github.io/web-features-explorer/features/interpolate-size/
and were added in:
https://github.com/web-platform-dx/web-features/pull/2110
https://github.com/web-platform-dx/web-features/pull/2148

Bug: 313072
Change-Id: Id34d234aab6514b514f012688fafc4d6dec1d991
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6024690
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: Daniil Sakhapov <sakhapov@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1383940}
This commit is contained in:
David Baron
2024-11-16 02:24:20 +00:00
committed by Chromium LUCI CQ
parent 70b72999be
commit 4d9a91f41f
7 changed files with 23 additions and 0 deletions
components/page_load_metrics/browser/observers
third_party/blink
public
renderer
web_tests
external
wpt
css
css-values
tools/metrics/histograms

@ -562,6 +562,7 @@ UseCounterMetricsRecorder::GetWebFeatureToWebDXFeatureMap() {
{WebFeature::kV8Animation_Constructor, WebDXFeature::kWebAnimations},
{WebFeature::kCSSAtRuleViewTransition,
WebDXFeature::kCrossDocumentViewTransition},
{WebFeature::kCSSCalcSizeFunction, WebDXFeature::kCalcSize},
}};
return *kMap;
@ -689,6 +690,7 @@ UseCounterMetricsRecorder::GetCSSProperties2WebDXFeatureMap() {
{CSSSampleId::kViewTimeline, WebDXFeature::kScrollDrivenAnimations},
{CSSSampleId::kViewTimelineName,
WebDXFeature::kScrollDrivenAnimations},
{CSSSampleId::kInterpolateSize, WebDXFeature::kInterpolateSize},
}};
return *kMap;

@ -4566,6 +4566,7 @@ enum WebFeature {
kViewFunctionTimeline = 5192,
kV8Animation_Constructor = 5193,
kV8Element_GetAnimations_Method = 5194,
kCSSCalcSizeFunction = 5195,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. Also don't add extra

@ -289,6 +289,8 @@ enum WebDXFeature {
kWebAnimations = 231,
kCrossDocumentViewTransition = 232,
kDisplayAnimation = 233,
kCalcSize = 234,
kInterpolateSize = 235,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.

@ -3771,6 +3771,7 @@ class CSSMathExpressionNodeParser {
if (RuntimeEnabledFeatures::CSSCalcSizeFunctionEnabled()) {
if (CSSMathExpressionNode* calc_size =
ParseCalcSize(function_id, stream, state)) {
context_.Count(WebFeature::kCSSCalcSizeFunction);
return calc_size;
}
}

@ -0,0 +1,7 @@
features:
- name: interpolate-size
files:
- interpolate-size-*
- name: calc-size
files:
- calc-size-*

@ -0,0 +1,7 @@
features:
- name: interpolate-size
files:
- interpolate-size-*
- name: calc-size
files:
- calc-size-*

@ -10894,6 +10894,7 @@ Called by update_use_counter_feature_enum.py.-->
<int value="5192" label="ViewFunctionTimeline"/>
<int value="5193" label="V8Animation_Constructor"/>
<int value="5194" label="V8Element_GetAnimations_Method"/>
<int value="5195" label="CSSCalcSizeFunction"/>
</enum>
<!-- LINT.ThenChange(//third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom:WebFeature) -->
@ -34000,6 +34001,8 @@ Called by update_use_counter_feature_enum.py.-->
<int value="231" label="WebAnimations"/>
<int value="232" label="CrossDocumentViewTransition"/>
<int value="233" label="DisplayAnimation"/>
<int value="234" label="CalcSize"/>
<int value="235" label="InterpolateSize"/>
</enum>
<!-- LINT.ThenChange(//third_party/blink/public/mojom/use_counter/metrics/webdx_feature.mojom:WebDXFeature) -->