mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Fix ::marker placement in tree
Fixes ::marker (pseudo-element) placement in the tree for list-items. Previously: - ::before - content - ::marker - ::after Now (matches Firefox, afaik per-spec): - ::marker - ::before - content - ::after
This commit is contained in:
parent
bc8f8676cc
commit
b272bb3373
Notes:
github-actions[bot]
2025-03-27 23:11:17 +00:00
Author: https://github.com/CanadaHonk 🔰
Commit: b272bb3373
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4130
Reviewed-by: https://github.com/gmta ✅
8 changed files with 83 additions and 34 deletions
|
@ -222,7 +222,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Ps
|
|||
marker_style);
|
||||
static_cast<ListItemBox&>(*pseudo_element_node).set_marker(list_item_marker);
|
||||
element.set_pseudo_element_node({}, CSS::PseudoElement::Marker, list_item_marker);
|
||||
pseudo_element_node->append_child(*list_item_marker);
|
||||
pseudo_element_node->prepend_child(*list_item_marker);
|
||||
}
|
||||
|
||||
auto generated_for = CSS::to_generated_pseudo_element(pseudo_element).release_value();
|
||||
|
@ -702,7 +702,7 @@ void TreeBuilder::update_layout_tree_after_children(DOM::Node& dom_node, GC::Ref
|
|||
auto list_item_marker = document.heap().allocate<ListItemMarkerBox>(document, layout_node->computed_values().list_style_type(), layout_node->computed_values().list_style_position(), element, marker_style);
|
||||
static_cast<ListItemBox&>(*layout_node).set_marker(list_item_marker);
|
||||
element.set_pseudo_element_node({}, CSS::PseudoElement::Marker, list_item_marker);
|
||||
layout_node->append_child(*list_item_marker);
|
||||
layout_node->prepend_child(*list_item_marker);
|
||||
}
|
||||
|
||||
if (is<SVG::SVGGraphicsElement>(dom_node)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue