LibWeb: Make display: foo box constructors take the Element by pointer

This means we can instantiate them for pseudo-elements, which don't have
an associated Element. They all pass it to their parent as a
`Layout::Node*` and handle a lack of `layout_node()` already so this
won't affect any functionality.
This commit is contained in:
Sam Atkins 2022-02-23 20:25:35 +00:00 committed by Andreas Kling
commit 7bb721bea2
Notes: sideshowbarker 2024-07-17 18:18:06 +09:00
7 changed files with 13 additions and 13 deletions

View file

@ -13,7 +13,7 @@ namespace Web::Layout {
class ListItemBox final : public BlockContainer {
public:
ListItemBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>);
ListItemBox(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
virtual ~ListItemBox() override;
DOM::Element& dom_node() { return static_cast<DOM::Element&>(*BlockContainer::dom_node()); }