LibWeb: Avoid potential infinite recursion in Document::update_layout

This commit is contained in:
Shannon Booth 2024-11-01 02:05:00 +13:00 committed by Andreas Kling
parent 15c15116dd
commit aa585c4182

View File

@ -1144,7 +1144,7 @@ void Document::update_layout()
// NOTE: If our parent document needs a relayout, we must do that *first*.
// This is necessary as the parent layout may cause our viewport to change.
if (navigable->container())
if (navigable->container() && &navigable->container()->document() != this)
navigable->container()->document().update_layout();
update_style();