mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename NodeData and associated data structures to Element*.
MozReview-Commit-ID: 96VsmsoZtjZ
This commit is contained in:
parent
5442fbec3f
commit
be89f73675
15 changed files with 75 additions and 77 deletions
|
@ -260,9 +260,9 @@ pub extern "C" fn Servo_ComputedValues_Get(node: RawGeckoNodeBorrowed)
|
|||
if node.is_text_node() {
|
||||
error!("Don't call Servo_ComputedValue_Get() for text nodes");
|
||||
let parent = node.parent_node().unwrap().as_element().unwrap();
|
||||
let parent_cv = parent.borrow_data().map_or(Arc::new(ComputedValues::initial_values().clone()),
|
||||
|x| x.get_current_styles().unwrap()
|
||||
.primary.clone());
|
||||
let parent_cv = parent.borrow_data().map_or_else(|| Arc::new(ComputedValues::initial_values().clone()),
|
||||
|x| x.get_current_styles().unwrap()
|
||||
.primary.clone());
|
||||
return ComputedValues::inherit_from(&parent_cv).into_strong();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue