Bug 1345841 - Stop using Maybe<const T>. r=mats

This commit is contained in:
Jonathan Watt 2017-02-07 11:52:22 +00:00
parent fd1c7c2bfb
commit ca0876480e
3 changed files with 5 additions and 5 deletions

View File

@ -6503,7 +6503,7 @@ DrawImageInternal(gfxContext& aContext,
const nsRect& aFill,
const nsPoint& aAnchor,
const nsRect& aDirty,
const Maybe<const SVGImageContext>& aSVGContext,
const Maybe<SVGImageContext>& aSVGContext,
uint32_t aImageFlags,
ExtendMode aExtendMode = ExtendMode::CLAMP,
float aOpacity = 1.0)
@ -6539,7 +6539,7 @@ DrawImageInternal(gfxContext& aContext,
destCtx->SetMatrix(params.imageSpaceToDeviceSpace);
Maybe<const SVGImageContext> fallbackContext;
Maybe<SVGImageContext> 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<const SVGImageContext>& aSVGContext,
const Maybe<SVGImageContext>& aSVGContext,
uint32_t aImageFlags,
const nsPoint* aAnchorPoint,
const nsRect* aSourceArea)

View File

@ -1888,7 +1888,7 @@ public:
const SamplingFilter aSamplingFilter,
const nsRect& aDest,
const nsRect& aDirty,
const mozilla::Maybe<const SVGImageContext>& aSVGContext,
const mozilla::Maybe<SVGImageContext>& aSVGContext,
uint32_t aImageFlags,
const nsPoint* aAnchorPoint = nullptr,
const nsRect* aSourceArea = nullptr);

View File

@ -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<const SVGImageContext> context(
const Maybe<SVGImageContext> context(
Some(SVGImageContext(Some(CSSIntSize::Truncate(width, height)),
Some(imgElem->mPreserveAspectRatio.GetAnimValue()),
1.0, /* aIsPaintingSVGImageElement */ true)));