mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
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:
parent
7d08d5ad6f
commit
a15a44cfc8
1 changed files with 0 additions and 2 deletions
|
@ -63,8 +63,6 @@ void ImageBox::prepare_for_replaced_layout()
|
||||||
auto& image_element = verify_cast<HTML::HTMLImageElement>(dom_node());
|
auto& image_element = verify_cast<HTML::HTMLImageElement>(dom_node());
|
||||||
auto& font = Platform::FontPlugin::the().default_font();
|
auto& font = Platform::FontPlugin::the().default_font();
|
||||||
auto alt = image_element.alt();
|
auto alt = image_element.alt();
|
||||||
if (alt.is_empty())
|
|
||||||
alt = image_element.src();
|
|
||||||
|
|
||||||
CSSPixels alt_text_width = 0;
|
CSSPixels alt_text_width = 0;
|
||||||
if (!m_cached_alt_text_width.has_value())
|
if (!m_cached_alt_text_width.has_value())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue