mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -323,6 +323,7 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + NodeInfo + PartialEq + Sized {
|
|||
/// element style is precomputed, not from general layout itself.
|
||||
#[inline]
|
||||
fn resolved_style(&self) -> Arc<ServoComputedValues> {
|
||||
// FIXME(bholley): This should move to Element and lose the text node check.
|
||||
if self.is_text_node() {
|
||||
return self.style_for_text_node();
|
||||
}
|
||||
|
@ -338,6 +339,7 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + NodeInfo + PartialEq + Sized {
|
|||
|
||||
#[inline]
|
||||
fn selected_style(&self, _context: &SharedStyleContext) -> Arc<ServoComputedValues> {
|
||||
// FIXME(bholley): This should move to Element and lose the text node check.
|
||||
if self.is_text_node() {
|
||||
return self.style_for_text_node();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue