Skip to content

Commit

Permalink
Remove flags CSSDisplayAnimation + CSSTransitionDiscrete
Browse files Browse the repository at this point in the history
CSSDisplayAnimation was enabled by default in M116
CSSTransitionDiscrete was enabled by default in M117

Bug: 1453112
Change-Id: Ia7a5f518a169685e1cbe278396d691f631e47f74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5495004
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293956}
  • Loading branch information
josepharhar authored and Chromium LUCI CQ committed Apr 29, 2024
1 parent 2d5d989 commit 55ba8ab
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 35 deletions.
12 changes: 1 addition & 11 deletions third_party/blink/renderer/core/animation/css/css_animations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1632,8 +1632,7 @@ void CSSAnimations::CalculateAnimationUpdate(

if (animation_data &&
(style_builder.Display() != EDisplay::kNone ||
(RuntimeEnabledFeatures::CSSDisplayAnimationEnabled() && old_style &&
old_style->Display() != EDisplay::kNone))) {
(old_style && old_style->Display() != EDisplay::kNone))) {
const Vector<AtomicString>& name_list = animation_data->NameList();
for (wtf_size_t i = 0; i < name_list.size(); ++i) {
AtomicString name = name_list[i];
Expand Down Expand Up @@ -2366,7 +2365,6 @@ void CSSAnimations::CalculateTransitionUpdateForPropertyHandle(
}

if (!start || !end) {
DCHECK(RuntimeEnabledFeatures::CSSTransitionDiscreteEnabled());
const Document& document = state.animating_element.GetDocument();
const CSSValue* start_css_value =
AnimationUtils::KeyframeValueFromComputedStyle(
Expand Down Expand Up @@ -2540,11 +2538,6 @@ void CSSAnimations::CalculateTransitionUpdateForStandardProperty(
writing_direction.GetWritingMode());
PropertyHandle property_handle = PropertyHandle(property);

if (!RuntimeEnabledFeatures::CSSTransitionDiscreteEnabled() &&
!animate_all && !property.IsInterpolable()) {
continue;
}

CalculateTransitionUpdateForPropertyHandle(
state, transition_property.property_type, property_handle,
transition_index, animate_all);
Expand Down Expand Up @@ -3165,9 +3158,6 @@ bool CSSAnimations::IsAnimationAffectingProperty(const CSSProperty& property) {
case CSSPropertyID::kWillChange:
case CSSPropertyID::kWritingMode:
return true;
case CSSPropertyID::kDisplay:
case CSSPropertyID::kContentVisibility:
return !RuntimeEnabledFeatures::CSSDisplayAnimationEnabled();
default:
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,10 @@ const InterpolationTypes& CSSInterpolationTypesMap::Get(
std::make_unique<CSSBasicShapeInterpolationType>(used_property));
break;
case CSSPropertyID::kDisplay:
DCHECK(RuntimeEnabledFeatures::CSSDisplayAnimationEnabled());
applicable_types->push_back(
std::make_unique<CSSDisplayInterpolationType>(used_property));
break;
case CSSPropertyID::kContentVisibility:
DCHECK(RuntimeEnabledFeatures::CSSDisplayAnimationEnabled());
applicable_types->push_back(
std::make_unique<CSSContentVisibilityInterpolationType>(
used_property));
Expand Down
1 change: 0 additions & 1 deletion third_party/blink/renderer/core/css/css_properties.json5
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,6 @@
is_animation_property: true,
// Animation properites are never incremental.
supports_incremental_style: false,
runtime_flag: "CSSTransitionDiscrete",
},
{
name: "transition-timing-function",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ namespace blink {
// change the spec to use this order, see:
// https://github.com/w3c/csswg-drafts/issues/4223
const StylePropertyShorthand& transitionShorthandForParsing() {
static const CSSProperty* kTransitionProperties[] = {
&GetCSSPropertyTransitionDuration(),
&GetCSSPropertyTransitionTimingFunction(),
&GetCSSPropertyTransitionDelay(), &GetCSSPropertyTransitionProperty()};
static StylePropertyShorthand transition_longhands(
CSSPropertyID::kTransition, kTransitionProperties,
std::size(kTransitionProperties));

static const CSSProperty* kTransitionPropertiesWithAnimationType[] = {
&GetCSSPropertyTransitionBehavior(), &GetCSSPropertyTransitionDuration(),
&GetCSSPropertyTransitionTimingFunction(),
Expand All @@ -45,9 +37,7 @@ const StylePropertyShorthand& transitionShorthandForParsing() {
CSSPropertyID::kTransition, kTransitionPropertiesWithAnimationType,
std::size(kTransitionPropertiesWithAnimationType));

return RuntimeEnabledFeatures::CSSTransitionDiscreteEnabled()
? transition_longhands_with_animation_type
: transition_longhands;
return transition_longhands_with_animation_type;
}

unsigned indexOfShorthandForLonghand(
Expand Down
3 changes: 1 addition & 2 deletions third_party/blink/renderer/core/dom/element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3955,8 +3955,7 @@ StyleRecalcChange Element::RecalcOwnStyle(
// display:none. If new_style is otherwise set to display:none, then it
// means an animation set display:none, and an animation shouldn't
// cancel itself in this case.
if (base_is_display_none ||
!RuntimeEnabledFeatures::CSSDisplayAnimationEnabled()) {
if (base_is_display_none) {
element_animations->CssAnimations().Cancel();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,6 @@
name: "CSSCustomStateNewSyntax",
status: "stable",
},
{
name: "CSSDisplayAnimation",
status: "stable",
},
{
name: "CSSDisplayModePictureInPicture",
status: "stable",
Expand Down Expand Up @@ -1047,10 +1043,6 @@
name: "CSSTextSpacingTrim",
status: "stable",
},
{
name: "CSSTransitionDiscrete",
status: "stable",
},
{
// Support for tree-scoped [1] timeline names (e.g. produced by
// scroll-timeline).
Expand Down

0 comments on commit 55ba8ab

Please sign in to comment.