diff options
Diffstat (limited to 'layout')
-rw-r--r-- | layout/generic/nsFlexContainerFrame.cpp | 6 | ||||
-rw-r--r-- | layout/generic/nsHTMLCanvasFrame.cpp | 1 | ||||
-rw-r--r-- | layout/generic/nsVideoFrame.cpp | 6 | ||||
-rw-r--r-- | layout/xul/nsImageBoxFrame.cpp | 3 |
4 files changed, 8 insertions, 8 deletions
diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index a76097e1e..a03d777e7 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 032b95e5b..f40f799ba 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 6bd6395a3..0472ebe62 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, diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index 5286b6d88..aa00c5174 100644 --- a/layout/xul/nsImageBoxFrame.cpp +++ b/layout/xul/nsImageBoxFrame.cpp @@ -407,8 +407,7 @@ nsImageBoxFrame::PaintImage(nsRenderingContext& aRenderingContext, // Image has a valid size; use it as intrinsic size & ratio. intrinsicSize.width.SetCoordValue(mIntrinsicSize.width); intrinsicSize.height.SetCoordValue(mIntrinsicSize.height); - intrinsicRatio = - AspectRatio::FromSize(mIntrinsicSize); + intrinsicRatio = AspectRatio::FromSize(mIntrinsicSize); } else { // Image doesn't have a (valid) intrinsic size. // Try to look up intrinsic ratio and use that at least. |