mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb/CSS: Introduce helper methods for parsing numeric values
"Parse a style value for <foo>", where we don't care if it's a literal <foo> or a calculated one, is a really common thing that we previously didn't have methods for. A couple of methods we had have been extended to parse calc(), and the others have been filled in. The method for parsing the `flex` property's value is renamed `parse_flex_shorthand_value()` as it conflicted.
This commit is contained in:
parent
79bd942dd1
commit
27be8678c9
Notes:
github-actions[bot]
2024-08-21 09:52:50 +00:00
Author: https://github.com/AtkinsSJ
Commit: 27be8678c9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1091
3 changed files with 207 additions and 30 deletions
|
@ -117,6 +117,8 @@ public:
|
|||
Optional<double> resolve_number() const;
|
||||
Optional<i64> resolve_integer() const;
|
||||
|
||||
bool resolves_to_dimension() const { return m_resolved_type.matches_dimension(); }
|
||||
|
||||
bool contains_percentage() const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue