mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibWeb: Implement the ::marker pseudo-element
This matches the marker boxes of list-items.
This commit is contained in:
parent
8411ff3f14
commit
817cd13d59
6 changed files with 10 additions and 3 deletions
|
@ -202,7 +202,7 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
|
|||
|
||||
if (is<ListItemBox>(*layout_node)) {
|
||||
int child_index = layout_node->parent()->index_of_child<ListItemBox>(*layout_node).value();
|
||||
auto marker_style = static_cast<DOM::Element const&>(dom_node).specified_css_values();
|
||||
auto marker_style = style_computer.compute_style(static_cast<DOM::Element&>(dom_node), CSS::Selector::PseudoElement::Marker);
|
||||
auto list_item_marker = adopt_ref(*new ListItemMarkerBox(document, layout_node->computed_values().list_style_type(), child_index + 1, *marker_style));
|
||||
if (layout_node->first_child())
|
||||
list_item_marker->set_inline(layout_node->first_child()->is_inline());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue