1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

LibWeb: Implement CSS::parse_css_value()

A lot of this is not spec-compliant and copied from the old parser.
In future PRs, we can revise it.
This commit is contained in:
Sam Atkins 2021-07-09 21:04:34 +01:00 committed by Andreas Kling
parent c91c00f587
commit 6b6bf4a0aa
3 changed files with 224 additions and 5 deletions

View file

@ -76,6 +76,12 @@ public:
return m_value.string_view();
}
int integer() const
{
VERIFY(m_type == Type::Number && m_number_type == NumberType::Integer);
return m_value.string_view().to_int().value();
}
Type mirror_variant() const;
String bracket_string() const;
String bracket_mirror_string() const;