Commit e70da10d authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

Add UMA to see impact of changing overscroll behavior root propagation

This CL follows the pattern of:
https://chromium-review.googlesource.com/c/chromium/src/+/1715906

That is, in order to change the viewport style propagation logic
for overscroll behavior, we want to add use counters to understand
the potential breakage.

Bug: 954423
Change-Id: I410aa665873167ffe523911a823e9b47cd117018
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560396
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831204}
parent ec9efc80
...@@ -3062,6 +3062,7 @@ enum WebFeature { ...@@ -3062,6 +3062,7 @@ enum WebFeature {
kAddSourceBufferUsingConfig = 3733, kAddSourceBufferUsingConfig = 3733,
kChangeTypeUsingConfig = 3734, kChangeTypeUsingConfig = 3734,
kV8SourceBuffer_AppendEncodedChunks_Method = 3735, kV8SourceBuffer_AppendEncodedChunks_Method = 3735,
kOversrollBehaviorOnViewportBreaks = 3736,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -2273,6 +2273,22 @@ void Document::PropagateStyleToViewport() { ...@@ -2273,6 +2273,22 @@ void Document::PropagateStyleToViewport() {
PROPAGATE_FROM(overflow_style, OverscrollBehaviorY, SetOverscrollBehaviorY, PROPAGATE_FROM(overflow_style, OverscrollBehaviorY, SetOverscrollBehaviorY,
EOverscrollBehavior::kAuto); EOverscrollBehavior::kAuto);
// Counts any time overscroll behavior break if we change its viewport
// propagation logic. Overscroll behavior only breaks if body has non-none
// type that is different from the document one.
// TODO(954423): Remove once propagation logic change is complete.
if (document_element_style && body_style) {
bool overscroll_behavior_is_different =
body_style->OverscrollBehaviorX() !=
document_element_style->OverscrollBehaviorX() ||
body_style->OverscrollBehaviorY() !=
document_element_style->OverscrollBehaviorY();
if (overscroll_behavior_is_different) {
UseCounter::Count(*this,
WebFeature::kOversrollBehaviorOnViewportBreaks);
}
}
EOverflow overflow_x = EOverflow::kAuto; EOverflow overflow_x = EOverflow::kAuto;
EOverflow overflow_y = EOverflow::kAuto; EOverflow overflow_y = EOverflow::kAuto;
EOverflowAnchor overflow_anchor = EOverflowAnchor::kAuto; EOverflowAnchor overflow_anchor = EOverflowAnchor::kAuto;
......
...@@ -30356,6 +30356,7 @@ Called by update_use_counter_feature_enum.py.--> ...@@ -30356,6 +30356,7 @@ Called by update_use_counter_feature_enum.py.-->
<int value="3733" label="AddSourceBufferUsingConfig"/> <int value="3733" label="AddSourceBufferUsingConfig"/>
<int value="3734" label="ChangeTypeUsingConfig"/> <int value="3734" label="ChangeTypeUsingConfig"/>
<int value="3735" label="V8SourceBuffer_AppendEncodedChunks_Method"/> <int value="3735" label="V8SourceBuffer_AppendEncodedChunks_Method"/>
<int value="3736" label="OversrollBehaviorOnViewportBreaks"/>
</enum> </enum>
<enum name="FeaturePolicyAllowlistType"> <enum name="FeaturePolicyAllowlistType">
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