summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsContentUtils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
index 49fe5143f..3696195dd 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7609,7 +7609,8 @@ nsContentUtils::CalculateBufferSizeForImage(const uint32_t& aStride,
return NS_ERROR_FAILURE;
}
*aMaxBufferSize = requiredBytes.value();
- *aUsedBufferSize = *aMaxBufferSize - aStride + (aImageSize.width * BytesPerPixel(aFormat));
+ *aUsedBufferSize = *aMaxBufferSize - aStride +
+ (aImageSize.width * BytesPerPixel(aFormat));
return NS_OK;
}
@@ -7633,7 +7634,8 @@ nsContentUtils::DataTransferItemToImage(const IPCDataTransferItem& aItem,
size_t maxBufLen = 0;
nsresult rv = CalculateBufferSizeForImage(imageDetails.stride(),
size,
- imageDetails.format(),
+ static_cast<SurfaceFormat>(
+ imageDetails.format()),
&maxBufLen,
&imageBufLen);
if (NS_FAILED(rv)) {