1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibWeb: Support both ::before/::after pseudo elements on button elements

This was mainly a matter of deferring the wrapping of the button's
children until after its internal layout tree has been constructed.
That way we don't lose any pseudo elements spawned along the way.

Fixes #2397.
Fixes #2399.
This commit is contained in:
Andreas Kling 2025-02-03 12:23:15 +01:00 committed by Andreas Kling
parent 0f17ad9ebc
commit 4fa372564d
Notes: github-actions[bot] 2025-02-03 15:00:37 +00:00
7 changed files with 124 additions and 80 deletions

View file

@ -31,6 +31,7 @@ private:
void update_layout_tree_before_children(DOM::Node&, GC::Ref<Layout::Node>, Context&, bool element_has_content_visibility_hidden);
void update_layout_tree_after_children(DOM::Node&, GC::Ref<Layout::Node>, Context&, bool element_has_content_visibility_hidden);
void wrap_in_button_layout_tree_if_needed(DOM::Node&, GC::Ref<Layout::Node>);
enum class MustCreateSubtree {
No,
Yes,