mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove unneeded clones and add some comments.
This commit is contained in:
parent
26cf00ef4e
commit
71758643dc
4 changed files with 10 additions and 3 deletions
|
@ -619,6 +619,10 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
|||
&Some(ref mut layout_data) => {
|
||||
match self.type_id() {
|
||||
Some(TextNodeTypeId) => {
|
||||
// Text nodes get a copy of the parent style. This ensures
|
||||
// that during fragment construction any non-inherited
|
||||
// CSS properties (such as vertical-align) are correctly
|
||||
// set on the fragment(s).
|
||||
let cloned_parent_style = parent_style.unwrap().clone();
|
||||
layout_data.shared_data.style = Some(cloned_parent_style);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue