summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-22 13:11:18 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-23 02:12:57 +0100
commit2ae457f21e7a60182f884bfdfeaa9d2c127eb8b9 (patch)
tree2fb7f671b70cef1b00adaabaa2921c49d417019b
parent6478daf2988b56ae73f941fd471242b7e92b2a4e (diff)
downloadUXP-2ae457f21e7a60182f884bfdfeaa9d2c127eb8b9.tar
UXP-2ae457f21e7a60182f884bfdfeaa9d2c127eb8b9.tar.gz
UXP-2ae457f21e7a60182f884bfdfeaa9d2c127eb8b9.tar.lz
UXP-2ae457f21e7a60182f884bfdfeaa9d2c127eb8b9.tar.xz
UXP-2ae457f21e7a60182f884bfdfeaa9d2c127eb8b9.zip
Extend origin-clean algorithm (DiD).
-rw-r--r--dom/canvas/CanvasRenderingContext2D.cpp7
-rw-r--r--dom/canvas/CanvasRenderingContext2D.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
index a750c69b0..4849fda57 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -6329,6 +6329,13 @@ CanvasRenderingContext2D::ShouldForceInactiveLayer(LayerManager* aManager)
return !aManager->CanUseCanvasLayerForSize(GetSize());
}
+void CanvasRenderingContext2D::SetWriteOnly() {
+ mWriteOnly = true;
+ if (mCanvasElement) {
+ mCanvasElement->SetWriteOnly();
+ }
+}
+
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release)
diff --git a/dom/canvas/CanvasRenderingContext2D.h b/dom/canvas/CanvasRenderingContext2D.h
index 46758ec88..d4f295a03 100644
--- a/dom/canvas/CanvasRenderingContext2D.h
+++ b/dom/canvas/CanvasRenderingContext2D.h
@@ -1156,9 +1156,7 @@ protected:
// For the origin-clean algorithm (mWriteOnly == !origin-clean)
// See https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html
- void SetWriteOnly() {
- mWriteOnly = true;
- }
+ void SetWriteOnly();
bool IsWriteOnly() const {
return mWriteOnly;