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:
parent
5348c67ba4
commit
69aac6ecd7
Notes:
sideshowbarker
2024-07-17 20:24:20 +09:00
Author: https://github.com/TobyAsE
Commit: 69aac6ecd7
Pull-request: https://github.com/SerenityOS/serenity/pull/12027
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/alimpfard
6 changed files with 57 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue