mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Don't traverse text nodes during styling.
MozReview-Commit-ID: 6CtQMxbcLnF
This commit is contained in:
parent
1cfd5e8172
commit
1090abae87
7 changed files with 72 additions and 31 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