aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow/inline/construct.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/flow/inline/construct.rs
parent51b95a62465d2034fb64f785fb1d731c30755c17 (diff)
downloadservo-main.tar.gz
servo-main.zip
layout: Use `ServoLayoutNode` directly instead of a generic `impl` (#36876)HEADmain
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.rs7
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(),