summaryrefslogtreecommitdiff
path: root/layout/generic
diff options
context:
space:
mode:
authorAndy <webmaster@RealityRipple.com>2020-08-02 08:01:58 -0700
committerAndy <webmaster@RealityRipple.com>2020-08-02 08:01:58 -0700
commita90b8d98e859ae71c74f2a8cb78b24899d879185 (patch)
tree0abe6cb4d2095121c732dfdcce0a258f51951103 /layout/generic
parentba0a2e796d890109e5ca175c1370709ca2955beb (diff)
downloaduxp-a90b8d98e859ae71c74f2a8cb78b24899d879185.tar.gz
Issue #1619 - Nits Picked
Diffstat (limited to 'layout/generic')
-rw-r--r--layout/generic/nsFlexContainerFrame.cpp6
-rw-r--r--layout/generic/nsHTMLCanvasFrame.cpp1
-rw-r--r--layout/generic/nsVideoFrame.cpp6
3 files changed, 7 insertions, 6 deletions
diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp
index a76097e1ef..a03d777e7e 100644
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1529,9 +1529,9 @@ MainSizeFromAspectRatio(nscoord aCrossSize,
{
MOZ_ASSERT(aIntrinsicRatio,
"Invalid ratio; will divide by 0! Caller should've checked...");
- AspectRatio ratio = aAxisTracker.IsMainAxisHorizontal()
- ? aIntrinsicRatio
- : aIntrinsicRatio.Inverted();
+ AspectRatio ratio = aAxisTracker.IsMainAxisHorizontal() ?
+ aIntrinsicRatio :
+ aIntrinsicRatio.Inverted();
return ratio.ApplyTo(aCrossSize);
}
diff --git a/layout/generic/nsHTMLCanvasFrame.cpp b/layout/generic/nsHTMLCanvasFrame.cpp
index 032b95e5bb..f40f799bab 100644
--- a/layout/generic/nsHTMLCanvasFrame.cpp
+++ b/layout/generic/nsHTMLCanvasFrame.cpp
@@ -199,6 +199,7 @@ nsHTMLCanvasFrame::GetIntrinsicSize()
/* virtual */ AspectRatio
nsHTMLCanvasFrame::GetIntrinsicRatio()
{
+ // When 'contain: size' is implemented, make sure to check for it.
/*
if (StyleDisplay()->IsContainSize()) {
return AspectRatio();
diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp
index 6bd6395a32..0472ebe626 100644
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -531,9 +531,9 @@ nsVideoFrame::ComputeSize(nsRenderingContext *aRenderingContext,
intrinsicSize.height.SetCoordValue(size.height);
// Only video elements have an intrinsic ratio.
- auto intrinsicRatio = HasVideoElement()
- ? AspectRatio::FromSize(size)
- : AspectRatio();
+ auto intrinsicRatio = HasVideoElement() ?
+ AspectRatio::FromSize(size) :
+ AspectRatio();
return ComputeSizeWithIntrinsicDimensions(aRenderingContext, aWM,
intrinsicSize, intrinsicRatio,