mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Add a special, explicit path for lazy style resolution and use it for GetComputedStyle.
MozReview-Commit-ID: KAM9mVoxCHE
This commit is contained in:
parent
7e3c9e2197
commit
ab71b29959
7 changed files with 176 additions and 119 deletions
|
@ -709,13 +709,13 @@ pub trait MatchMethods : TElement {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe fn cascade_node(&self,
|
||||
context: &StyleContext<Self>,
|
||||
mut data: &mut AtomicRefMut<ElementData>,
|
||||
parent: Option<Self>,
|
||||
primary_rule_node: StrongRuleNode,
|
||||
pseudo_rule_nodes: PseudoRuleNodes,
|
||||
primary_is_shareable: bool)
|
||||
fn cascade_node(&self,
|
||||
context: &StyleContext<Self>,
|
||||
mut data: &mut AtomicRefMut<ElementData>,
|
||||
parent: Option<Self>,
|
||||
primary_rule_node: StrongRuleNode,
|
||||
pseudo_rule_nodes: PseudoRuleNodes,
|
||||
primary_is_shareable: bool)
|
||||
{
|
||||
// Get our parent's style.
|
||||
let parent_data = parent.as_ref().map(|x| x.borrow_data().unwrap());
|
||||
|
@ -770,10 +770,12 @@ pub trait MatchMethods : TElement {
|
|||
pseudo_rule_nodes,
|
||||
&mut possibly_expired_animations);
|
||||
|
||||
self.as_node().set_can_be_fragmented(parent.map_or(false, |p| {
|
||||
p.as_node().can_be_fragmented() ||
|
||||
parent_style.unwrap().is_multicol()
|
||||
}));
|
||||
unsafe {
|
||||
self.as_node().set_can_be_fragmented(parent.map_or(false, |p| {
|
||||
p.as_node().can_be_fragmented() ||
|
||||
parent_style.unwrap().is_multicol()
|
||||
}));
|
||||
}
|
||||
|
||||
damage
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue