Auto merge of #13934 - bholley:skip_text_nodes, r=emilio

Only traverse elements from style

This is part of the new incremental restyle architecture work. I have patches to element-ify things more, but want to get this in the tree first.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13934)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-27 12:32:45 -05:00 committed by GitHub
commit 87ef548717
13 changed files with 264 additions and 305 deletions

View file

@ -1084,18 +1084,6 @@ impl ComputedValues {
}
}
pub fn style_for_child_text_node(parent: &Arc<Self>) -> Arc<Self> {
// Text nodes get a copy of the parent style. Inheriting all non-
// inherited properties into the text node is odd from a CSS
// perspective, but makes fragment construction easier (by making
// properties like vertical-align on fragments have values that
// match the parent element). This is an implementation detail of
// Servo layout that is not central to how fragment construction
// works, but would be difficult to change. (Text node style is
// also not visible to script.)
parent.clone()
}
pub fn initial_values() -> &'static Self { &*INITIAL_SERVO_VALUES }
#[inline]