mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 22:49:47 +00:00
LibWeb/CSS: Pull out and expand CSSStyleProperties::get_property()
This awkwardly sat as the internal final API for getting a StyleProperty directly for a given PropertyID, and also the external API for getting the StyleProperty for a PropertyID. For the latter, it lacked support for shorthands, and for both it lacked support for custom properties. This commit: - Moves the code from get_property() into get_direct_property() - Makes get_property() call get_property_internal() to support shorthands - Adds custom property support for get_direct_property() This also wins us some WPT points for StylePropertyMap.
This commit is contained in:
parent
8f456d781c
commit
47062424fb
Notes:
github-actions[bot]
2025-10-02 12:47:56 +00:00
Author: https://github.com/AtkinsSJ
Commit: 47062424fb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6310
10 changed files with 95 additions and 85 deletions
|
@ -4691,7 +4691,6 @@ Optional<NonnullRefPtr<CSS::StyleValue const>> property_in_style_attribute(GC::R
|
|||
if (!inline_style)
|
||||
return {};
|
||||
|
||||
// FIXME: This doesn't support shorthand properties.
|
||||
auto style_property = inline_style->get_property(property_id);
|
||||
if (!style_property.has_value())
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue