1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

LibWeb: Save alt text in ImagePaintable

By saving string with alt text, image paintable no longer need to reach
into layout and DOM nodes while painting commands recording.

No behaviour change intended.
This commit is contained in:
Aliaksandr Kalenik 2024-02-26 09:18:31 +01:00 committed by Andreas Kling
parent c2bc07ef7c
commit 9fa22b60cf
2 changed files with 11 additions and 7 deletions

View file

@ -30,7 +30,10 @@ private:
// ^Document::ViewportClient
virtual void did_set_viewport_rect(CSSPixelRect const&) final;
ImagePaintable(Layout::ImageBox const&);
ImagePaintable(Layout::ImageBox const&, String alt_text);
bool m_renders_as_alt_text { false };
String m_alt_text;
};
}