mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibHTML: Move layout root from HtmlView to Document
The layout root is now kept alive via Document::m_layout_root. This will allow us to do more layout-related things inside the inner layer of LibHTML without reaching out to the HtmlView. I'd like to keep HtmlView at a slightly higher level, to prevent it from getting too complex. This patch also fixes accidental disconnection of the layout tree from the DOM after doing a layout tree rebuild. ~LayoutNode() now only unsets the DOM node's layout_node() if it's itself.
This commit is contained in:
parent
48ef1d1bd1
commit
49ac0c2e24
6 changed files with 51 additions and 20 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <LibHTML/Dump.h>
|
||||
#include <LibHTML/HtmlView.h>
|
||||
#include <LibHTML/Layout/LayoutBlock.h>
|
||||
#include <LibHTML/Layout/LayoutDocument.h>
|
||||
#include <LibHTML/Layout/LayoutInline.h>
|
||||
#include <LibHTML/Layout/LayoutNode.h>
|
||||
#include <LibHTML/Parser/CSSParser.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue