1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibWeb: Add new property 'text-decoration-style'

This patch makes the property 'text-decoration-style' known throughout
all the places in LibWeb that care.
This commit is contained in:
Tobias Christiansen 2022-01-20 20:27:55 +01:00 committed by Ali Mohammad Pur
parent 5348c67ba4
commit 69aac6ecd7
Notes: sideshowbarker 2024-07-17 20:24:20 +09:00
6 changed files with 57 additions and 0 deletions

View file

@ -645,6 +645,27 @@ Optional<CSS::TextDecorationLine> StyleProperties::text_decoration_line() const
}
}
Optional<CSS::TextDecorationStyle> StyleProperties::text_decoration_style() const
{
auto value = property(CSS::PropertyID::TextDecorationStyle);
if (!value.has_value())
return {};
switch (value.value()->to_identifier()) {
case CSS::ValueID::Solid:
return CSS::TextDecorationStyle::Solid;
case CSS::ValueID::Double:
return CSS::TextDecorationStyle::Double;
case CSS::ValueID::Dotted:
return CSS::TextDecorationStyle::Dotted;
case CSS::ValueID::Dashed:
return CSS::TextDecorationStyle::Dashed;
case CSS::ValueID::Wavy:
return CSS::TextDecorationStyle::Wavy;
default:
return {};
}
}
Optional<CSS::TextTransform> StyleProperties::text_transform() const
{
auto value = property(CSS::PropertyID::TextTransform);