mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:38:13 +00:00
AK+Everywhere: Remove the null state of DeprecatedString
This commit removes DeprecatedString's "null" state, and replaces all its users with one of the following: - A normal, empty DeprecatedString - Optional<DeprecatedString> Note that null states of DeprecatedFlyString/StringView/etc are *not* affected by this commit. However, DeprecatedString::empty() is now considered equal to a null StringView.
This commit is contained in:
parent
daf6d8173c
commit
aeee98b3a1
189 changed files with 597 additions and 652 deletions
|
@ -113,13 +113,15 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const
|
|||
case CSS::ListStyleType::LowerRoman:
|
||||
case CSS::ListStyleType::UpperAlpha:
|
||||
case CSS::ListStyleType::UpperLatin:
|
||||
case CSS::ListStyleType::UpperRoman:
|
||||
if (layout_box().text().is_null())
|
||||
case CSS::ListStyleType::UpperRoman: {
|
||||
auto text = layout_box().text();
|
||||
if (!text.has_value())
|
||||
break;
|
||||
// FIXME: This should use proper text layout logic!
|
||||
// This does not line up with the text in the <li> element which looks very sad :(
|
||||
context.painter().draw_text(device_enclosing.to_type<int>(), layout_box().text(), layout_box().scaled_font(context), Gfx::TextAlignment::Center, color);
|
||||
context.painter().draw_text(device_enclosing.to_type<int>(), *text, layout_box().scaled_font(context), Gfx::TextAlignment::Center, color);
|
||||
break;
|
||||
}
|
||||
case CSS::ListStyleType::None:
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue