mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Reject non-exclusive none in text-decoration-line
This updates the `parse_text_decoration_line_value` to reject values which non-exclusively include `none` e.g. `underline none`. It also simplifies handling by always producing a Vector (except for `none`) and adding VERIFY_NOT_REACHED in more places which shouldn't be reachable.
This commit is contained in:
parent
5c0fdd371a
commit
d6bb247bf7
Notes:
github-actions[bot]
2025-11-13 09:16:20 +00:00
Author: https://github.com/Calme1709
Commit: d6bb247bf7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6808
Reviewed-by: https://github.com/gmta ✅
4 changed files with 20 additions and 13 deletions
|
|
@ -1225,6 +1225,9 @@ Vector<TextDecorationLine> ComputedProperties::text_decoration_line() const
|
|||
{
|
||||
auto const& value = property(PropertyID::TextDecorationLine);
|
||||
|
||||
if (value.to_keyword() == Keyword::None)
|
||||
return {};
|
||||
|
||||
if (value.is_value_list()) {
|
||||
Vector<TextDecorationLine> lines;
|
||||
auto& values = value.as_value_list().values();
|
||||
|
|
@ -1234,14 +1237,7 @@ Vector<TextDecorationLine> ComputedProperties::text_decoration_line() const
|
|||
return lines;
|
||||
}
|
||||
|
||||
if (value.is_keyword()) {
|
||||
if (value.to_keyword() == Keyword::None)
|
||||
return {};
|
||||
return { keyword_to_text_decoration_line(value.to_keyword()).release_value() };
|
||||
}
|
||||
|
||||
dbgln("FIXME: Unsupported value for text-decoration-line: {}", value.to_string(SerializationMode::Normal));
|
||||
return {};
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
TextDecorationStyle ComputedProperties::text_decoration_style() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue