mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Avoid getting shorthand property from ComputedProperties
ComputedProperties only includes longhands so we shouldn't try to get shorthands - this will be asserted in a later commit.
This commit is contained in:
parent
1ba64a1d7e
commit
9f5696e9c5
|
|
@ -184,10 +184,13 @@ RefPtr<StyleValue const> StylePropertyMapReadOnly::get_style_value(Source& sourc
|
|||
return registered_custom_property.value()->initial_style_value();
|
||||
return nullptr;
|
||||
}
|
||||
// FIXME: This will only ever be null for pseudo-elements. What should we do in that case?
|
||||
// The property's value is also sometimes null. Is that correct?
|
||||
if (auto computed_properties = element.computed_properties())
|
||||
return computed_properties->maybe_null_property(property_id.value());
|
||||
|
||||
if (*property_id >= first_longhand_property_id && *property_id <= last_longhand_property_id) {
|
||||
// FIXME: This will only ever be null for pseudo-elements. What should we do in that case?
|
||||
if (auto computed_properties = element.computed_properties())
|
||||
return computed_properties->property(property_id.value());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
},
|
||||
[&property](GC::Ref<CSSStyleDeclaration>& declaration) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user