mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +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:
parent
e452550fda
commit
c772134e25
1 changed files with 2 additions and 0 deletions
|
@ -445,6 +445,8 @@ static void update_style_recursively(DOM::Node& node)
|
||||||
|
|
||||||
void Document::update_style()
|
void Document::update_style()
|
||||||
{
|
{
|
||||||
|
if (!browsing_context())
|
||||||
|
return;
|
||||||
update_style_recursively(*this);
|
update_style_recursively(*this);
|
||||||
update_layout();
|
update_layout();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue