mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Rename get_inherit_value to get_non_animated_inherit_value
This more acurately represents what it does.
This commit is contained in:
parent
3b6d17cd42
commit
b80e6a4d30
|
|
@ -71,7 +71,7 @@ static NonnullRefPtr<StyleValue const> with_keyword_values_resolved(DOM::Element
|
|||
case Keyword::Unset:
|
||||
return property_initial_value(property_id);
|
||||
case Keyword::Inherit:
|
||||
return StyleComputer::get_inherit_value(property_id, { element });
|
||||
return StyleComputer::get_non_animated_inherit_value(property_id, { element });
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,7 @@ void StyleComputer::collect_animation_into(DOM::AbstractElement abstract_element
|
|||
if (auto inherited_animated_value = get_animated_inherit_value(longhand_id, abstract_element); inherited_animated_value.has_value())
|
||||
return inherited_animated_value.value();
|
||||
|
||||
return get_inherit_value(longhand_id, abstract_element);
|
||||
return get_non_animated_inherit_value(longhand_id, abstract_element);
|
||||
}
|
||||
|
||||
if (longhand_value.is_initial() || longhand_value.is_unset())
|
||||
|
|
@ -1623,7 +1623,7 @@ GC::Ref<CascadedProperties> StyleComputer::compute_cascaded_values(DOM::Abstract
|
|||
return cascaded_properties;
|
||||
}
|
||||
|
||||
NonnullRefPtr<StyleValue const> StyleComputer::get_inherit_value(PropertyID property_id, DOM::AbstractElement abstract_element)
|
||||
NonnullRefPtr<StyleValue const> StyleComputer::get_non_animated_inherit_value(PropertyID property_id, DOM::AbstractElement abstract_element)
|
||||
{
|
||||
auto parent_element = abstract_element.element_to_inherit_style_from();
|
||||
|
||||
|
|
@ -2560,7 +2560,7 @@ GC::Ref<ComputedProperties> StyleComputer::compute_properties(DOM::AbstractEleme
|
|||
|
||||
// FIXME: Logical properties should inherit from their parent's equivalent unmapped logical property.
|
||||
if (should_inherit) {
|
||||
value = get_inherit_value(property_id, abstract_element);
|
||||
value = get_non_animated_inherit_value(property_id, abstract_element);
|
||||
animated_value = get_animated_inherit_value(property_id, abstract_element);
|
||||
inherited = ComputedProperties::Inherited::Yes;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class WEB_API StyleComputer final : public GC::Cell {
|
|||
|
||||
public:
|
||||
static void for_each_property_expanding_shorthands(PropertyID, StyleValue const&, Function<void(PropertyID, StyleValue const&)> const& set_longhand_property);
|
||||
static NonnullRefPtr<StyleValue const> get_inherit_value(PropertyID, DOM::AbstractElement);
|
||||
static NonnullRefPtr<StyleValue const> get_non_animated_inherit_value(PropertyID, DOM::AbstractElement);
|
||||
static Optional<NonnullRefPtr<StyleValue const>> get_animated_inherit_value(PropertyID, DOM::AbstractElement);
|
||||
|
||||
static Optional<String> user_agent_style_sheet_source(StringView name);
|
||||
|
|
|
|||
|
|
@ -829,7 +829,7 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_inherited_style()
|
|||
else if (old_animated_value && computed_properties->is_animated_property_inherited(property_id))
|
||||
computed_properties->remove_animated_property(property_id);
|
||||
|
||||
RefPtr new_value = CSS::StyleComputer::get_inherit_value(property_id, { *this });
|
||||
RefPtr new_value = CSS::StyleComputer::get_non_animated_inherit_value(property_id, { *this });
|
||||
computed_properties->set_property(property_id, *new_value, CSS::ComputedProperties::Inherited::Yes);
|
||||
invalidation |= CSS::compute_property_invalidation(property_id, old_value, new_value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user