diff options
author | Andy <webmaster@RealityRipple.com> | 2020-07-31 13:01:18 -0700 |
---|---|---|
committer | Andy <webmaster@RealityRipple.com> | 2020-07-31 13:01:18 -0700 |
commit | 232f987cf45aad65d20e79d283f14c72771c9bc8 (patch) | |
tree | 1a794fa80b38b0248439085c8ce76b6dfce1cb3a /image/ClippedImage.cpp | |
parent | 091749192cc7595a0013850fb450a5c1b6dde20b (diff) | |
download | uxp-232f987cf45aad65d20e79d283f14c72771c9bc8.tar.gz |
Issue #1619 - Convert Intrinsic Ratio to Float
https://bugzilla.mozilla.org/show_bug.cgi?id=1547792
Aspect Ratio handling simplified by using floating point integers:
- Multiplication of value (or inverse value) to a known side for Scaling
- No unequal equal values such as "4/3" vs "8/6" vs "20/15"
- Truly "Empty" aspect ratios, even if one dimension is not 0
Diffstat (limited to 'image/ClippedImage.cpp')
-rw-r--r-- | image/ClippedImage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/image/ClippedImage.cpp b/image/ClippedImage.cpp index 5394718512..6372f59505 100644 --- a/image/ClippedImage.cpp +++ b/image/ClippedImage.cpp @@ -242,13 +242,13 @@ ClippedImage::GetIntrinsicSize(nsSize* aSize) } NS_IMETHODIMP -ClippedImage::GetIntrinsicRatio(nsSize* aRatio) +ClippedImage::GetIntrinsicRatio(AspectRatio* aRatio) { if (!ShouldClip()) { return InnerImage()->GetIntrinsicRatio(aRatio); } - *aRatio = nsSize(mClip.width, mClip.height); + *aRatio = AspectRatio::FromSize(mClip.width, mClip.height); return NS_OK; } |