Truly independent web browser
LibWeb: Remove leftovers of the C++ cascade in the style computer
Aliaksandr Kalenikf4cc3c92d846
diff --git a/Libraries/LibWeb/CSS/CascadeOrigin.h b/Libraries/LibWeb/CSS/CascadeOrigin.hindex 60c250a8aa5..8b006346c54 100644--- a/Libraries/LibWeb/CSS/CascadeOrigin.h+++ b/Libraries/LibWeb/CSS/CascadeOrigin.h@@ -15,8 +15,6 @@ enum class CascadeOrigin : u8 {AuthorPresentationalHint,User,UserAgent,- Animation,- Transition,};}diff --git a/Libraries/LibWeb/CSS/CountersSet.h b/Libraries/LibWeb/CSS/CountersSet.hindex f8c3eae0935..fd6081b0801 100644--- a/Libraries/LibWeb/CSS/CountersSet.h+++ b/Libraries/LibWeb/CSS/CountersSet.h@@ -13,11 +13,6 @@namespace Web::CSS {-// "UAs may have implementation-specific limits on the maximum or minimum value of a counter.-// If a counter reset, set, or increment would push the value outside of that range, the value-// must be clamped to that range." - https://drafts.csswg.org/css-lists-3/#auto-numbering-using CounterValue = i32;-// NB: The CSS counters sets live in the layout node arena, which resolves them during the layout tree build from the// style each element installed, so whether an element's innermost list-item counter is its own forward one is// read from that style.diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cppindex b01d44a5c33..77ff92339c1 100644--- a/Libraries/LibWeb/CSS/StyleComputer.cpp+++ b/Libraries/LibWeb/CSS/StyleComputer.cpp@@ -574,13 +574,8 @@ struct StyleComputer::AnimationSample {ComputedValuesFFI::FfiHostAnimationSample input {};};-void StyleComputer::collect_animations_into(Layout::BegunRead const& read, DOM::AbstractElement abstract_element, ReadonlySpan<GC::Ref<Animations::KeyframeEffect>> effects, ComputedStyleWorkingSet& computed_properties, AnimationRefresh refresh) const+void StyleComputer::collect_animations_into(Layout::BegunRead const& read, DOM::AbstractElement abstract_element, ReadonlySpan<GC::Ref<Animations::KeyframeEffect>> effects, ComputedStyleWorkingSet& computed_properties) const{- if (refresh == AnimationRefresh::No) {- collect_animation_effects_into(read, abstract_element, effects, computed_properties, {});- publish_animated_custom_properties(read, computed_properties, abstract_element);- return;- }m_keyframes_inherited_non_inherited_style_groups = 0;// A refresh samples over the record the element holds, which the working set was reconstructed from.collect_animation_effects_into(read, abstract_element, effects, computed_properties, abstract_element.style_record_identity());@@ -1311,7 +1306,7 @@ RefPtr<ComputedStyleWorkingSet> StyleComputer::start_needed_transitions(Layout::return Animations::KeyframeEffect::composite_order(a, b) < 0;});if (!remaining_effects.is_empty())- collect_animations_into(read, abstract_element, remaining_effects.span(), *new_style, AnimationRefresh::Yes);+ collect_animations_into(read, abstract_element, remaining_effects.span(), *new_style);}if (!newly_started_transition_effects.is_empty()) {diff --git a/Libraries/LibWeb/CSS/StyleComputer.h b/Libraries/LibWeb/CSS/StyleComputer.hindex a57b5cde769..f02b1251158 100644--- a/Libraries/LibWeb/CSS/StyleComputer.h+++ b/Libraries/LibWeb/CSS/StyleComputer.h@@ -128,14 +128,9 @@ public:// the identity is no engine environment or was resolved over another.[[nodiscard]] RefPtr<CustomPropertyData const> engine_custom_property_environment(Layout::BegunRead const& read, u64 identity, RefPtr<CustomPropertyData const> const& inherited) const;- // Whether the collection refreshes a previously published style outside the drive; a refresh- // re-runs the animated element style adjustments and leaves the non-inherited-property- // inheritance invalidation mark itself.- enum class AnimationRefresh {- No,- Yes,- };- void collect_animations_into(Layout::BegunRead const& read, DOM::AbstractElement, ReadonlySpan<GC::Ref<Animations::KeyframeEffect>>, ComputedStyleWorkingSet&, AnimationRefresh) const;+ // Refreshes a previously published style outside the drive: re-runs the animated element style+ // adjustments and leaves the non-inherited-property inheritance invalidation mark itself.+ void collect_animations_into(Layout::BegunRead const& read, DOM::AbstractElement, ReadonlySpan<GC::Ref<Animations::KeyframeEffect>>, ComputedStyleWorkingSet&) const;// One element's animations, refreshed over the record it holds as `collect_animations_into()` refreshes them.struct AnimationRefreshRequest {DOM::AbstractElement abstract_element;