1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibWeb: Visit ImageProvider from Layout::ImageBox

Adds missing visit of HTMLElement that serves as image provider of
image layout node.
This commit is contained in:
Aliaksandr Kalenik 2024-02-26 17:36:48 +01:00 committed by Andreas Kling
parent 9fa22b60cf
commit ef01c735cd
6 changed files with 13 additions and 0 deletions

View file

@ -22,6 +22,12 @@ ImageBox::ImageBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr
ImageBox::~ImageBox() = default;
void ImageBox::visit_edges(JS::Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_image_provider.to_html_element());
}
void ImageBox::prepare_for_replaced_layout()
{
set_natural_width(m_image_provider.intrinsic_width());