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

LibWeb: Give DOM::Document some default style properties

Add StyleResolver::create_document_style() to help in creating an
"empty" style with nothing but default values.
This commit is contained in:
Andreas Kling 2021-09-23 19:48:41 +02:00
parent c5b4928f4a
commit 1ca33598da
3 changed files with 31 additions and 21 deletions

View file

@ -451,7 +451,7 @@ void Document::update_style()
RefPtr<Layout::Node> Document::create_layout_node()
{
return adopt_ref(*new Layout::InitialContainingBlock(*this, CSS::StyleProperties::create()));
return adopt_ref(*new Layout::InitialContainingBlock(*this, style_resolver().create_document_style()));
}
void Document::set_link_color(Color color)