LibWeb: Extract code for creating a Layout::Node based on display type

We need to run the same logic for creating the ::before and ::after
pseudo-elements, so this saves us from duplicating the code.
This commit is contained in:
Sam Atkins 2022-02-24 11:56:03 +00:00 committed by Andreas Kling
commit 5390e05851
Notes: sideshowbarker 2024-07-17 20:58:35 +09:00
2 changed files with 18 additions and 12 deletions

View file

@ -134,6 +134,8 @@ public:
virtual void did_receive_focus() { }
virtual void did_lose_focus() { }
static RefPtr<Layout::Node> create_layout_node_for_display_type(DOM::Document&, CSS::Display const&, NonnullRefPtr<CSS::StyleProperties>, Element*);
protected:
virtual void children_changed() override;