mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Don't join anonymous pseudo wrappers for block node insertion
This can happen if pseudo elements are absolutely positioned, they need the nearest non-inline parent to determine their position.
This commit is contained in:
parent
ac829cf60a
commit
c845e2cef7
Notes:
github-actions[bot]
2025-11-11 09:50:52 +00:00
Author: https://github.com/gmta
Commit: c845e2cef7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6739
Reviewed-by: https://github.com/lpas
4 changed files with 74 additions and 7 deletions
|
|
@ -113,8 +113,8 @@ static Layout::Node& insertion_parent_for_block_node(Layout::NodeWithStyle& layo
|
|||
if (!has_inline_or_in_flow_block_children(*new_parent))
|
||||
return *new_parent;
|
||||
|
||||
// If the block is out-of-flow,
|
||||
if (layout_node.is_out_of_flow()) {
|
||||
// If the block is out-of-flow and is not a pseudo element,
|
||||
if (layout_node.is_out_of_flow() && !layout_node.is_generated_for_pseudo_element()) {
|
||||
// And the parent's last child is an anonymous block, join that anonymous block.
|
||||
if (!new_parent->display().is_flex_inside()
|
||||
&& !new_parent->display().is_grid_inside()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue