Pārlūkot izejas kodu

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 2 gadi atpakaļ
vecāks
revīzija
a15a44cfc8
1 mainītis faili ar 0 papildinājumiem un 2 dzēšanām
  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())