1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 04:27:35 +00:00

LibWeb: Remove use of specified_style() in Layout::ImageBox

This commit is contained in:
Andreas Kling 2020-12-15 20:50:58 +01:00
parent 613764b83c
commit 72bd672da0

View file

@ -112,7 +112,7 @@ void ImageBox::paint(PaintContext& context, PaintPhase phase)
auto alt = image_element.alt();
if (alt.is_empty())
alt = image_element.src();
context.painter().draw_text(enclosing_int_rect(absolute_rect()), alt, Gfx::TextAlignment::Center, specified_style().color_or_fallback(CSS::PropertyID::Color, document(), Color::Black), Gfx::TextElision::Right);
context.painter().draw_text(enclosing_int_rect(absolute_rect()), alt, Gfx::TextAlignment::Center, style().color(), Gfx::TextElision::Right);
} else if (auto bitmap = m_image_loader.bitmap()) {
context.painter().draw_scaled_bitmap(enclosing_int_rect(absolute_rect()), *bitmap, bitmap->rect());
}