mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibWeb: Add helper for creating <dimension>
CSS tokens
This commit is contained in:
parent
27ddfa84fa
commit
2c7603f2ae
Notes:
sideshowbarker
2024-07-17 03:35:16 +09:00
Author: https://github.com/AtkinsSJ
Commit: 2c7603f2ae
Pull-request: https://github.com/SerenityOS/serenity/pull/20683
1 changed files with 9 additions and 0 deletions
|
@ -175,6 +175,15 @@ public:
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Token create_dimension(double value, FlyString unit)
|
||||||
|
{
|
||||||
|
Token token;
|
||||||
|
token.m_type = Type::Dimension;
|
||||||
|
token.m_number_value = Number(Number::Type::Number, value);
|
||||||
|
token.m_value = move(unit);
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Type m_type { Type::Invalid };
|
Type m_type { Type::Invalid };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue