mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
style: Force to stop computing children if we find the parent has display: none.
This commit is contained in:
parent
436c1b3089
commit
544a117911
9 changed files with 254 additions and 116 deletions
|
@ -15,6 +15,7 @@ use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, R
|
|||
use selector_impl::ElementExt;
|
||||
use selectors::matching::DeclarationBlock;
|
||||
use sink::Push;
|
||||
use std::fmt::Debug;
|
||||
use std::ops::BitOr;
|
||||
use std::sync::Arc;
|
||||
use string_cache::{Atom, Namespace};
|
||||
|
@ -44,7 +45,7 @@ impl OpaqueNode {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait TRestyleDamage : BitOr<Output=Self> + Copy {
|
||||
pub trait TRestyleDamage : Debug + BitOr<Output=Self> + Copy {
|
||||
/// The source for our current computed values in the cascade. This is a
|
||||
/// ComputedValues in Servo and a StyleContext in Gecko.
|
||||
///
|
||||
|
@ -58,6 +59,8 @@ pub trait TRestyleDamage : BitOr<Output=Self> + Copy {
|
|||
fn compute(old: Option<&Self::PreExistingComputedValues>,
|
||||
new: &Arc<ComputedValues>) -> Self;
|
||||
|
||||
fn empty() -> Self;
|
||||
|
||||
fn rebuild_and_reflow() -> Self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue