aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2016-01-25 08:51:44 -0700
committerMichael Howell <michael@notriddle.com>2016-03-19 16:02:11 -0700
commit9d9c5398a84c11fdabf991e20362f8225dd1ea02 (patch)
tree39971d774e2eb8053dc3174d2a267d6095574af4 /components/layout/construct.rs
parente551ea73226404152e02c3445f4f91e639bf66ce (diff)
downloadservo-9d9c5398a84c11fdabf991e20362f8225dd1ea02.tar.gz
servo-9d9c5398a84c11fdabf991e20362f8225dd1ea02.zip
Get the fundamentals of the HTMLDetailsElement rendering stuff working.
Still need to implement the style invalidation. Part of #9395
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 3f91bdad3d5..25988b7eb11 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -676,7 +676,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
HTMLElementTypeId::HTMLInputElement))) ||
node.type_id() == Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
HTMLElementTypeId::HTMLTextAreaElement)));
- if node.get_pseudo_element_type() != PseudoElementType::Normal ||
+ if node.get_pseudo_element_type().is_before_or_after() ||
node_is_input_or_text_area {
// A TextArea's text contents are displayed through the input text
// box, so don't construct them.
@@ -1461,6 +1461,8 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
PseudoElementType::Normal => display::T::inline,
PseudoElementType::Before(display) => display,
PseudoElementType::After(display) => display,
+ PseudoElementType::DetailsContent(display) => display,
+ PseudoElementType::DetailsSummary(display) => display,
};
(display, style.get_box().float, style.get_box().position)
}
@@ -1646,6 +1648,8 @@ impl<ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNode
match self.get_pseudo_element_type() {
PseudoElementType::Before(_) => &mut data.before_flow_construction_result,
PseudoElementType::After (_) => &mut data.after_flow_construction_result,
+ PseudoElementType::DetailsSummary(_) => &mut data.details_summary_flow_construction_result,
+ PseudoElementType::DetailsContent(_) => &mut data.details_content_flow_construction_result,
PseudoElementType::Normal => &mut data.flow_construction_result,
}
}