summaryrefslogtreecommitdiff
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
parentf47d45be4b6c8a1fc758d50497a964fc7a75154b (diff)
downloaduxp-3f1ef7a67d42d5dfd93088d74480222e781e3840.tar.gz
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.
-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 4849fda57e..111519c719 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.");