mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-02 16:25:34 +03: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
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a15a44cfc8
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user