mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibWeb/CSS: Add a Property -> CalculationContext factory method
We have this code duplicated in multiple places, and we'll want to handle registered custom properties too at some point, so wrap it in a reusable `CalculationContext::for_property()` method. Noticed while doing this that ValueParsingContext will eventually need to take a PropertyNameAndID, not a PropertyID, so I've added a FIXME.
This commit is contained in:
parent
a3e973970a
commit
0afa93e639
Notes:
github-actions[bot]
2025-10-13 09:01:24 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0afa93e639
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6440
6 changed files with 19 additions and 15 deletions
|
@ -566,6 +566,7 @@ private:
|
|||
ShadowBlurRadius,
|
||||
TranslateZArgument
|
||||
};
|
||||
// FIXME: Use PropertyNameAndID instead of PropertyID as the context, for registered custom properties.
|
||||
using ValueParsingContext = Variant<PropertyID, FunctionContext, DescriptorContext, SpecialContext>;
|
||||
Vector<ValueParsingContext> m_value_context;
|
||||
auto push_temporary_value_parsing_context(ValueParsingContext&& context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue