mirror of
https://github.com/servo/servo.git
synced 2025-08-24 06:45:33 +01:00
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:
commit
87ef548717
13 changed files with 264 additions and 305 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue