From ca0876480e52d0fab509eec26350cb7c7a569de1 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Tue, 7 Feb 2017 11:52:22 +0000 Subject: [PATCH] Bug 1345841 - Stop using Maybe. r=mats --- layout/base/nsLayoutUtils.cpp | 6 +++--- layout/base/nsLayoutUtils.h | 2 +- layout/svg/nsSVGImageFrame.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index f38d13503011..d157dc48880d 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6503,7 +6503,7 @@ DrawImageInternal(gfxContext& aContext, const nsRect& aFill, const nsPoint& aAnchor, const nsRect& aDirty, - const Maybe& aSVGContext, + const Maybe& aSVGContext, uint32_t aImageFlags, ExtendMode aExtendMode = ExtendMode::CLAMP, float aOpacity = 1.0) @@ -6539,7 +6539,7 @@ DrawImageInternal(gfxContext& aContext, destCtx->SetMatrix(params.imageSpaceToDeviceSpace); - Maybe fallbackContext; + Maybe fallbackContext; if (!aSVGContext) { // Use the default viewport. fallbackContext.emplace(Some(params.svgViewportSize)); @@ -6600,7 +6600,7 @@ nsLayoutUtils::DrawSingleImage(gfxContext& aContext, const SamplingFilter aSamplingFilter, const nsRect& aDest, const nsRect& aDirty, - const Maybe& aSVGContext, + const Maybe& aSVGContext, uint32_t aImageFlags, const nsPoint* aAnchorPoint, const nsRect* aSourceArea) diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index 7fa5337ebf10..9069c901b1a4 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -1888,7 +1888,7 @@ public: const SamplingFilter aSamplingFilter, const nsRect& aDest, const nsRect& aDirty, - const mozilla::Maybe& aSVGContext, + const mozilla::Maybe& aSVGContext, uint32_t aImageFlags, const nsPoint* aAnchorPoint = nullptr, const nsRect* aSourceArea = nullptr); diff --git a/layout/svg/nsSVGImageFrame.cpp b/layout/svg/nsSVGImageFrame.cpp index c736fa52e2ed..3002d597161b 100644 --- a/layout/svg/nsSVGImageFrame.cpp +++ b/layout/svg/nsSVGImageFrame.cpp @@ -398,7 +398,7 @@ nsSVGImageFrame::PaintSVG(gfxContext& aContext, // come from width/height *attributes* in SVG). They influence the region // of the SVG image's internal document that is visible, in combination // with preserveAspectRatio and viewBox. - const Maybe context( + const Maybe context( Some(SVGImageContext(Some(CSSIntSize::Truncate(width, height)), Some(imgElem->mPreserveAspectRatio.GetAnimValue()), 1.0, /* aIsPaintingSVGImageElement */ true)));