mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:17:35 +00:00
LibWeb: Generate layout nodes for shadow subtrees
Elements with shadow roots will now recurse into those shadow trees while building the layout tree. This is the first step towards basic Shadow DOM support. :^)
This commit is contained in:
parent
41ff7268db
commit
e562819a7e
3 changed files with 18 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
#include <LibWeb/Layout/BlockBox.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
|
@ -46,4 +47,9 @@ EventTarget* ShadowRoot::get_parent(const Event& event)
|
|||
return host();
|
||||
}
|
||||
|
||||
RefPtr<Layout::Node> ShadowRoot::create_layout_node()
|
||||
{
|
||||
return adopt(*new Layout::BlockBox(document(), this, CSS::ComputedValues {}));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue