mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibWeb: Implement the "The html element fills the viewport quirk"
Fixes #18037.
This commit is contained in:
parent
508927cae2
commit
590723aa3b
69 changed files with 97 additions and 67 deletions
|
@ -867,6 +867,13 @@ void Document::update_layout()
|
|||
viewport_state.set_content_width(viewport_rect.width());
|
||||
viewport_state.set_content_height(viewport_rect.height());
|
||||
|
||||
if (auto* document_element = this->document_element()) {
|
||||
VERIFY(document_element->layout_node());
|
||||
auto& icb_state = layout_state.get_mutable(verify_cast<Layout::NodeWithStyleAndBoxModelMetrics>(*document_element->layout_node()));
|
||||
icb_state.set_content_width(viewport_rect.width());
|
||||
icb_state.set_content_height(viewport_rect.height());
|
||||
}
|
||||
|
||||
root_formatting_context.run(
|
||||
*m_layout_root,
|
||||
Layout::LayoutMode::Normal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue