LibWeb: Don't use image source URL as backup alt attribute

This was a non-standard behavior of ours that broke layout on many pages
where an image failed to load for some reason.
This commit is contained in:
Andreas Kling 2023-03-25 12:06:35 +01:00
parent 7d08d5ad6f
commit a15a44cfc8
Notes: sideshowbarker 2024-07-18 03:23:00 +09:00

View File

@ -63,8 +63,6 @@ void ImageBox::prepare_for_replaced_layout()
auto& image_element = verify_cast<HTML::HTMLImageElement>(dom_node());
auto& font = Platform::FontPlugin::the().default_font();
auto alt = image_element.alt();
if (alt.is_empty())
alt = image_element.src();
CSSPixels alt_text_width = 0;
if (!m_cached_alt_text_width.has_value())