summaryrefslogtreecommitdiffstats
path: root/dom/canvas
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-05 22:11:53 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-05 22:11:53 +0200
commit3f1ef7a67d42d5dfd93088d74480222e781e3840 (patch)
treeb375e5754933b45384869a04742bb7f29623c3b3 /dom/canvas
parentf47d45be4b6c8a1fc758d50497a964fc7a75154b (diff)
downloadUXP-3f1ef7a67d42d5dfd93088d74480222e781e3840.tar
UXP-3f1ef7a67d42d5dfd93088d74480222e781e3840.tar.gz
UXP-3f1ef7a67d42d5dfd93088d74480222e781e3840.tar.lz
UXP-3f1ef7a67d42d5dfd93088d74480222e781e3840.tar.xz
UXP-3f1ef7a67d42d5dfd93088d74480222e781e3840.zip
Improve `origin-clean` algorithm based on our previous changes.
- Instead of trying the failing refactored Mozilla way, simply add a check where needed building on what was put in place previously.
Diffstat (limited to 'dom/canvas')
-rw-r--r--dom/canvas/CanvasRenderingContext2D.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
index 4849fda57..111519c71 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -4219,6 +4219,12 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcess
if (state->gradientStyles[style]) { // Gradient
pattern = GetGradientFor(style);
} else if (state->patternStyles[style]) { // Pattern
+ if (mCtx->mCanvasElement) {
+ CanvasUtils::DoDrawImageSecurityCheck(
+ mCtx->mCanvasElement, state->patternStyles[style]->mPrincipal,
+ state->patternStyles[style]->mForceWriteOnly,
+ state->patternStyles[style]->mCORSUsed);
+ }
pattern = GetPatternFor(style);
} else {
MOZ_ASSERT(false, "Should never reach here.");