aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-03-29 03:32:57 +0200
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-03-30 14:28:13 +0200
commit4460712a8f00772f60ed066caa1e9471e8fc19a8 (patch)
treec63a9ae543483b5672a70f2715133760ea660656
parent359f7b79531051e1ba7c00c071e95fbd47d3fd5d (diff)
downloadservo-4460712a8f00772f60ed066caa1e9471e8fc19a8.tar.gz
servo-4460712a8f00772f60ed066caa1e9471e8fc19a8.zip
layout: Propagate selected_style to InlineFragmentNodeInfo
-rw-r--r--components/layout/construct.rs4
-rw-r--r--components/layout/inline.rs1
2 files changed, 3 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 6d9c1f29766..d9727e5c8d9 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -217,6 +217,7 @@ impl InlineFragmentsAccumulator {
address: node.opaque(),
pseudo: node.get_pseudo_element_type().strip(),
style: node.style().clone(),
+ selected_style: node.selected_style().clone(),
flags: InlineFragmentNodeFlags::empty(),
}),
bidi_control_chars: None,
@@ -1867,8 +1868,7 @@ fn control_chars_to_fragment(node: &InlineFragmentNodeInfo,
Fragment::from_opaque_node_and_style(node.address,
node.pseudo,
style.clone(),
- // TODO(emilio): Selected style?
- style,
+ node.selected_style.clone(),
restyle_damage,
info)
}
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index 7cfa976de4b..c0e209d5f78 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -1854,6 +1854,7 @@ impl fmt::Debug for InlineFlow {
pub struct InlineFragmentNodeInfo {
pub address: OpaqueNode,
pub style: Arc<ServoComputedValues>,
+ pub selected_style: Arc<ServoComputedValues>,
pub pseudo: PseudoElementType<()>,
pub flags: InlineFragmentNodeFlags,
}