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.
This commit is contained in:
wolfbeast 2019-06-05 22:11:53 +02:00 • committed by Roy Tam
commit c3a85ded77

View file

@ -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.");