Skip adding/accumulating the values which corresponding rect offset is auto.

This patch will skip add_weighted() when self_portion + other_portion not equal
to zero. (i.e. adding or accumulating).
Gecko does same behavior since we can't add two auto value.
This commit is contained in:
Mantaroh Yoshinaga 2017-08-24 10:23:48 +09:00
parent 76e77be041
commit 8fc7d28758
2 changed files with 22 additions and 1 deletions

View file

@ -439,7 +439,7 @@ pub type NonNegativeLengthOrPercentageOrNumber = Either<NonNegativeNumber, NonNe
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Eq, PartialEq)]
#[derive(Clone, ComputeSquaredDistance, Copy, Debug, Eq, PartialEq)]
/// A computed cliprect for clip and image-region
pub struct ClipRect {
pub top: Option<Au>,