mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
stylo: Remove a lot of the restyle damage related complexity.
The only reason why we had the `existing_style_for_style_damage` bit is to apply some optimizations that we don't have anymore. I still want to reintroduce a few of them, at least for the non-eager pseudo-element case... But I think I won't need this at all. This allows us to remove a fair amount of Gecko code too.
This commit is contained in:
parent
c1b196b7cb
commit
0f37b209cb
10 changed files with 76 additions and 199 deletions
|
@ -20,7 +20,7 @@ use properties::{AnimationRules, ComputedValues, PropertyDeclarationBlock};
|
|||
#[cfg(feature = "gecko")] use properties::animated_properties::AnimationValue;
|
||||
#[cfg(feature = "gecko")] use properties::animated_properties::TransitionProperty;
|
||||
use rule_tree::CascadeLevel;
|
||||
use selector_parser::{AttrValue, ElementExt, PreExistingComputedValues};
|
||||
use selector_parser::{AttrValue, ElementExt};
|
||||
use selector_parser::{PseudoClassStringArg, PseudoElement};
|
||||
use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode};
|
||||
use selectors::sink::Push;
|
||||
|
@ -378,18 +378,6 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
|||
/// Internal iterator for the classes of this element.
|
||||
fn each_class<F>(&self, callback: F) where F: FnMut(&Atom);
|
||||
|
||||
/// Get the pre-existing style to calculate restyle damage (change hints).
|
||||
///
|
||||
/// This needs to be generic since it varies between Servo and Gecko.
|
||||
///
|
||||
/// XXX(emilio): It's a bit unfortunate we need to pass the current computed
|
||||
/// values as an argument here, but otherwise Servo would crash due to
|
||||
/// double borrows to return it.
|
||||
fn existing_style_for_restyle_damage<'a>(&'a self,
|
||||
current_computed_values: &'a ComputedValues,
|
||||
pseudo: Option<&PseudoElement>)
|
||||
-> Option<&'a PreExistingComputedValues>;
|
||||
|
||||
/// Whether a given element may generate a pseudo-element.
|
||||
///
|
||||
/// This is useful to avoid computing, for example, pseudo styles for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue