diff options
author | Moonchild <moonchild@palemoon.org> | 2020-08-08 19:59:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-08 19:59:24 +0000 |
commit | 666e370292fc20813e885f8d88ad7ac384790627 (patch) | |
tree | 72d7c3850d18118ba0f3eb571ebf27f3a11d5373 /layout/svg | |
parent | b5762c6c27c3d2de499c5f8ea6e10bed445b7455 (diff) | |
parent | 05ee48943cdf2c48c24a43bdb289eabb1cd08e9a (diff) | |
download | UXP-666e370292fc20813e885f8d88ad7ac384790627.tar UXP-666e370292fc20813e885f8d88ad7ac384790627.tar.gz UXP-666e370292fc20813e885f8d88ad7ac384790627.tar.lz UXP-666e370292fc20813e885f8d88ad7ac384790627.tar.xz UXP-666e370292fc20813e885f8d88ad7ac384790627.zip |
Merge pull request #1613 from RealityRipple/AspectRatio
[Image/CSS] Intrinsic Aspect Ratio
Diffstat (limited to 'layout/svg')
-rw-r--r-- | layout/svg/nsSVGOuterSVGFrame.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index d8cd2cb77..3f68245e2 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -234,22 +234,14 @@ nsSVGOuterSVGFrame::GetIntrinsicSize() /* virtual */ AspectRatio nsSVGOuterSVGFrame::GetIntrinsicRatio() -{ - // 2020-07-14 (RealityRipple) Firefox Uses a new IsReplacedAndContainSize(this) - // function call [Line 96-99 on trunk]. +{ + // When 'contain: size' is implemented, make sure to check for it. /* - static inline bool IsReplacedAndContainSize(const nsSVGOuterSVGFrame* aFrame) { - return aFrame->GetContent->GetParent() && - aFrame->StyleDisplay()->IsContainSize(); - } - */ - // but since contain: size doesn't exist in Pale Moon yet... -/* - if (IsReplacedAndContainSize(this)) { + if (this->GetContent->GetParent() && this->StyleDisplay()->IsContainSize()) { return AspectRatio(); } */ - + // We only have an intrinsic size/ratio if our width and height attributes // are both specified and set to non-percentage values, or we have a viewBox // rect: http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing |