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

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
parent e452550fda
commit c772134e25

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();
}