mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Make RestyleDamage::compute take no optional argument, delegate the handling to the caller.
This commit is contained in:
parent
6b60383f24
commit
1c322f35a6
5 changed files with 79 additions and 65 deletions
|
@ -45,7 +45,7 @@ impl OpaqueNode {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait TRestyleDamage : Debug + BitOr<Output=Self> + Copy {
|
||||
pub trait TRestyleDamage : Debug + PartialEq + 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.
|
||||
///
|
||||
|
@ -56,7 +56,7 @@ pub trait TRestyleDamage : Debug + BitOr<Output=Self> + Copy {
|
|||
/// This should be obtained via TNode::existing_style_for_restyle_damage
|
||||
type PreExistingComputedValues;
|
||||
|
||||
fn compute(old: Option<&Self::PreExistingComputedValues>,
|
||||
fn compute(old: &Self::PreExistingComputedValues,
|
||||
new: &Arc<ComputedValues>) -> Self;
|
||||
|
||||
fn empty() -> Self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue