diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-05-06 16:27:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-06 14:27:51 +0000 |
commit | d5e008fd6aaa44d19686390b6fde4a111e99649a (patch) | |
tree | 754e159dbd7b029d1e8f0625734a155e2ea37fd7 /components/layout/flow/inline/construct.rs | |
parent | 51b95a62465d2034fb64f785fb1d731c30755c17 (diff) | |
download | servo-main.tar.gz servo-main.zip |
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/flow/inline/construct.rs')
-rw-r--r-- | components/layout/flow/inline/construct.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/components/layout/flow/inline/construct.rs b/components/layout/flow/inline/construct.rs index 61292701a9f..74b0cf4ea7d 100644 --- a/components/layout/flow/inline/construct.rs +++ b/components/layout/flow/inline/construct.rs @@ -17,7 +17,6 @@ use super::{InlineBox, InlineBoxIdentifier, InlineBoxes, InlineFormattingContext use crate::PropagatedBoxTreeData; use crate::cell::ArcRefCell; use crate::context::LayoutContext; -use crate::dom::NodeExt; use crate::dom_traversal::NodeAndStyleInfo; use crate::flow::float::FloatBox; use crate::formatting_contexts::IndependentFormattingContext; @@ -225,11 +224,7 @@ impl InlineFormattingContextBuilder { (identifier, block_in_inline_splits) } - pub(crate) fn push_text<'dom, Node: NodeExt<'dom>>( - &mut self, - text: Cow<'dom, str>, - info: &NodeAndStyleInfo<Node>, - ) { + pub(crate) fn push_text<'dom>(&mut self, text: Cow<'dom, str>, info: &NodeAndStyleInfo<'dom>) { let white_space_collapse = info.style.clone_white_space_collapse(); let collapsed = WhitespaceCollapse::new( text.chars(), |