mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 13:39:25 +00:00
LibWeb/CSS: Use PropertyNameAndID instead of old Variant
This commit is contained in:
parent
3af8e705c1
commit
c0ef7f09e4
Notes:
github-actions[bot]
2025-10-02 12:48:44 +00:00
Author: https://github.com/AtkinsSJ
Commit: c0ef7f09e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6310
5 changed files with 14 additions and 20 deletions
|
@ -42,6 +42,7 @@
|
|||
#include <LibWeb/CSS/InvalidationSet.h>
|
||||
#include <LibWeb/CSS/Parser/ArbitrarySubstitutionFunctions.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/PropertyNameAndID.h>
|
||||
#include <LibWeb/CSS/SelectorEngine.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/CSS/StyleProperty.h>
|
||||
|
@ -791,7 +792,7 @@ void StyleComputer::cascade_declarations(
|
|||
auto property_value = property.value;
|
||||
|
||||
if (property_value->is_unresolved())
|
||||
property_value = Parser::Parser::resolve_unresolved_style_value(Parser::ParsingParams { abstract_element.document() }, abstract_element, property.property_id, property_value->as_unresolved());
|
||||
property_value = Parser::Parser::resolve_unresolved_style_value(Parser::ParsingParams { abstract_element.document() }, abstract_element, PropertyNameAndID::from_id(property.property_id), property_value->as_unresolved());
|
||||
|
||||
if (property_value->is_guaranteed_invalid()) {
|
||||
// https://drafts.csswg.org/css-values-5/#invalid-at-computed-value-time
|
||||
|
@ -1029,7 +1030,7 @@ void StyleComputer::collect_animation_into(DOM::AbstractElement abstract_element
|
|||
continue;
|
||||
|
||||
if (style_value->is_unresolved())
|
||||
style_value = Parser::Parser::resolve_unresolved_style_value(Parser::ParsingParams { abstract_element.document() }, abstract_element, property_id, style_value->as_unresolved());
|
||||
style_value = Parser::Parser::resolve_unresolved_style_value(Parser::ParsingParams { abstract_element.document() }, abstract_element, PropertyNameAndID::from_id(property_id), style_value->as_unresolved());
|
||||
|
||||
for_each_property_expanding_shorthands(property_id, *style_value, [&](PropertyID longhand_id, StyleValue const& longhand_value) {
|
||||
auto physical_longhand_id = map_logical_alias_to_physical_property(longhand_id, LogicalAliasMappingContext { computed_properties.writing_mode(), computed_properties.direction() });
|
||||
|
@ -3137,7 +3138,7 @@ NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_custom_property(
|
|||
return value.release_nonnull();
|
||||
|
||||
auto& unresolved = value->as_unresolved();
|
||||
return Parser::Parser::resolve_unresolved_style_value(Parser::ParsingParams {}, abstract_element, name, unresolved, guarded_contexts);
|
||||
return Parser::Parser::resolve_unresolved_style_value(Parser::ParsingParams {}, abstract_element, PropertyNameAndID::from_name(name).release_value(), unresolved, guarded_contexts);
|
||||
}
|
||||
|
||||
void StyleComputer::compute_custom_properties(ComputedProperties&, DOM::AbstractElement abstract_element) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue