From 2cf5d69a670a2989598ae9afb657fbee3241c7aa Mon Sep 17 00:00:00 2001 From: Conrad Pankoff Date: Sun, 6 Oct 2019 23:32:04 +1100 Subject: [PATCH] LibHTML: Use current style's text colour for alt text on images --- Libraries/LibHTML/Layout/LayoutImage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibHTML/Layout/LayoutImage.cpp b/Libraries/LibHTML/Layout/LayoutImage.cpp index 2e286e5023..d81e2e7b6a 100644 --- a/Libraries/LibHTML/Layout/LayoutImage.cpp +++ b/Libraries/LibHTML/Layout/LayoutImage.cpp @@ -40,7 +40,7 @@ void LayoutImage::render(RenderingContext& context) auto alt = node().alt(); if (alt.is_empty()) alt = node().src(); - context.painter().draw_text(rect(), alt, TextAlignment::Center, Color::Black, TextElision::Right); + context.painter().draw_text(rect(), alt, TextAlignment::Center, style().color_or_fallback("color", document(), Color::Black), TextElision::Right); } else { context.painter().draw_scaled_bitmap(rect(), *node().bitmap(), node().bitmap()->rect()); }