summaryrefslogtreecommitdiff
path: root/dom/canvas/ImageBitmap.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-02-14 11:46:21 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-02-14 11:46:21 +0100
commit958d1db73a62e29db690ede216dd6a2de3d7798b (patch)
tree48d925ea0d3123ef18d8a810724b3cdf7ad3b734 /dom/canvas/ImageBitmap.h
parent5f4c26310c898986efff21c041706f648ddf6647 (diff)
downloadaura-central-958d1db73a62e29db690ede216dd6a2de3d7798b.tar.gz
Implement origin-clean algorithm for ImageBitmap.
This resolves %973.
Diffstat (limited to 'dom/canvas/ImageBitmap.h')
-rw-r--r--dom/canvas/ImageBitmap.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/dom/canvas/ImageBitmap.h b/dom/canvas/ImageBitmap.h
index 2119c6bda..25084b6ac 100644
--- a/dom/canvas/ImageBitmap.h
+++ b/dom/canvas/ImageBitmap.h
@@ -65,6 +65,7 @@ struct ImageBitmapCloneData final
gfx::IntRect mPictureRect;
bool mIsPremultipliedAlpha;
bool mIsCroppingAreaOutSideOfSourceImage;
+ bool mWriteOnly;
};
/*
@@ -161,6 +162,10 @@ public:
template<typename T>
friend class MapDataIntoBufferSource;
+ bool IsWriteOnly() const {
+ return mWriteOnly;
+ }
+
// Mozilla Extensions
ImageBitmapFormat
FindOptimalFormat(const Optional<Sequence<ImageBitmapFormat>>& aPossibleFormats,
@@ -197,6 +202,7 @@ protected:
* CreateInternal(from ImageData) method.
*/
ImageBitmap(nsIGlobalObject* aGlobal, layers::Image* aData,
+ bool aWriteOnly,
bool aIsPremultipliedAlpha = true);
virtual ~ImageBitmap();
@@ -280,6 +286,12 @@ protected:
*/
bool mIsCroppingAreaOutSideOfSourceImage;
+ /*
+ * Write-Only flag is set to true if this image has been generated from a
+ * cross-origin source. This is the opposite of what is called 'origin-clean'
+ * in the spec.
+ */
+ bool mWriteOnly;
};
} // namespace dom