Explorar o código

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.
Andreas Kling %!s(int64=2) %!d(string=hai) anos
pai
achega
a15a44cfc8
Modificáronse 1 ficheiros con 0 adicións e 2 borrados
  1. 0 2
      Userland/Libraries/LibWeb/Layout/ImageBox.cpp

+ 0 - 2
Userland/Libraries/LibWeb/Layout/ImageBox.cpp

@@ -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())