1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

LibWeb: Implement ImageStyleValue parsing

Later we will want to make a distinction between URL and Image values,
but this works for now.
This commit is contained in:
Sam Atkins 2021-07-22 13:00:29 +01:00 committed by Andreas Kling
parent 82f3228dd2
commit 6e08b200d4
3 changed files with 36 additions and 6 deletions

View file

@ -76,6 +76,12 @@ public:
return m_value.string_view();
}
StringView url() const
{
VERIFY(m_type == Type::Url);
return m_value.string_view();
}
bool is(NumberType number_type) const { return is(Token::Type::Number) && m_number_type == number_type; }
int integer() const