aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/lists.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-05-06 16:27:51 +0200
committerGitHub <noreply@github.com>2025-05-06 14:27:51 +0000
commitd5e008fd6aaa44d19686390b6fde4a111e99649a (patch)
tree754e159dbd7b029d1e8f0625734a155e2ea37fd7 /components/layout/lists.rs
parent51b95a62465d2034fb64f785fb1d731c30755c17 (diff)
downloadservo-d5e008fd6aaa44d19686390b6fde4a111e99649a.tar.gz
servo-d5e008fd6aaa44d19686390b6fde4a111e99649a.zip
layout: Use `ServoLayoutNode` directly instead of a generic `impl` (#36876)
This makes it so that layout is no longer generic on the node type, depending directly on `script`'s `ServoLayoutNode`. In addition to greatly simplifying layout, this is necessary because incremental layout needs to be able to create pseudo-element styles without having a handle on the original `impl LayoutNode`. We feel this is a reasonable tradeoff. Testing: No functional changes, so covered by existing WPT tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/layout/lists.rs')
-rw-r--r--components/layout/lists.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/components/layout/lists.rs b/components/layout/lists.rs
index d5a1f863865..8c653cb6858 100644
--- a/components/layout/lists.rs
+++ b/components/layout/lists.rs
@@ -7,18 +7,14 @@ use style::properties::style_structs;
use style::values::computed::Image;
use crate::context::LayoutContext;
-use crate::dom::NodeExt;
use crate::dom_traversal::{NodeAndStyleInfo, PseudoElementContentItem};
use crate::replaced::ReplacedContents;
/// <https://drafts.csswg.org/css-lists/#content-property>
-pub(crate) fn make_marker<'dom, Node>(
+pub(crate) fn make_marker<'dom>(
context: &LayoutContext,
- info: &NodeAndStyleInfo<Node>,
-) -> Option<(NodeAndStyleInfo<Node>, Vec<PseudoElementContentItem>)>
-where
- Node: NodeExt<'dom>,
-{
+ info: &NodeAndStyleInfo<'dom>,
+) -> Option<(NodeAndStyleInfo<'dom>, Vec<PseudoElementContentItem>)> {
let marker_info = info.pseudo(context, style::selector_parser::PseudoElement::Marker)?;
let style = &marker_info.style;
let list_style = style.get_list();