mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibWeb: Don't attempt to paint text shadows for empty text fragments
This avoids the debug spam that happens then the shadow painting fails to allocate a zero sized bitmap.
This commit is contained in:
parent
89e308726e
commit
c6fbeb5845
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ void paint_box_shadow(PaintContext& context, Gfx::IntRect const& content_rect, B
|
||||||
|
|
||||||
void paint_text_shadow(PaintContext& context, Layout::LineBoxFragment const& fragment, Vector<ShadowData> const& shadow_layers)
|
void paint_text_shadow(PaintContext& context, Layout::LineBoxFragment const& fragment, Vector<ShadowData> const& shadow_layers)
|
||||||
{
|
{
|
||||||
if (shadow_layers.is_empty())
|
if (shadow_layers.is_empty() || fragment.text().is_empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto& painter = context.painter();
|
auto& painter = context.painter();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue