LibWeb: Make update_style() a no-op if there's no browsing context

Style is needed to lay out and paint a document, but we can't do either
those when the document isn't attached to a browsing context.
This commit is contained in:
Andreas Kling 2021-09-26 00:48:30 +02:00
commit c772134e25
Notes: sideshowbarker 2024-07-18 03:27:11 +09:00

View file

@ -445,6 +445,8 @@ static void update_style_recursively(DOM::Node& node)
void Document::update_style()
{
if (!browsing_context())
return;
update_style_recursively(*this);
update_layout();
}