mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
LibWeb: Use a switch to handle TextTransform values
This makes it more obvious that we're missing some of these. (And makes it easier to find this code when searching for a specific value.)
This commit is contained in:
parent
f7209fb9d4
commit
ce775ea701
1 changed files with 11 additions and 3 deletions
|
@ -34,11 +34,19 @@ static bool is_all_whitespace(StringView string)
|
||||||
|
|
||||||
static ErrorOr<DeprecatedString> apply_text_transform(DeprecatedString const& string, CSS::TextTransform text_transform)
|
static ErrorOr<DeprecatedString> apply_text_transform(DeprecatedString const& string, CSS::TextTransform text_transform)
|
||||||
{
|
{
|
||||||
if (text_transform == CSS::TextTransform::Uppercase)
|
switch (text_transform) {
|
||||||
|
case CSS::TextTransform::Uppercase:
|
||||||
return Unicode::to_unicode_uppercase_full(string);
|
return Unicode::to_unicode_uppercase_full(string);
|
||||||
if (text_transform == CSS::TextTransform::Lowercase)
|
case CSS::TextTransform::Lowercase:
|
||||||
return Unicode::to_unicode_lowercase_full(string);
|
return Unicode::to_unicode_lowercase_full(string);
|
||||||
return string;
|
case CSS::TextTransform::None:
|
||||||
|
return string;
|
||||||
|
case CSS::TextTransform::Capitalize:
|
||||||
|
case CSS::TextTransform::FullSizeKana:
|
||||||
|
case CSS::TextTransform::FullWidth:
|
||||||
|
// FIXME: Implement these!
|
||||||
|
return string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextNode::invalidate_text_for_rendering()
|
void TextNode::invalidate_text_for_rendering()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue