diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-05-27 19:19:27 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-05-28 18:19:59 +0200 |
commit | e69b3f567c4b8957cc09ba4359e84939f77781c5 (patch) | |
tree | fb7fda7196c860870510dccc421cc1224db08352 /layout | |
parent | bce405101e67cbcae222fbc5e96d682aff981372 (diff) | |
download | UXP-e69b3f567c4b8957cc09ba4359e84939f77781c5.tar UXP-e69b3f567c4b8957cc09ba4359e84939f77781c5.tar.gz UXP-e69b3f567c4b8957cc09ba4359e84939f77781c5.tar.lz UXP-e69b3f567c4b8957cc09ba4359e84939f77781c5.tar.xz UXP-e69b3f567c4b8957cc09ba4359e84939f77781c5.zip |
Improve origin-clean algorithm
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 07befdc81..17ece8e61 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -8,6 +8,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" +#include "mozilla/dom/CanvasUtils.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/EffectCompositor.h" #include "mozilla/EffectSet.h" @@ -7285,10 +7286,10 @@ nsLayoutUtils::SurfaceFromElement(nsIImageLoadingContent* aElement, } result.mPrincipal = principal.forget(); - // no images, including SVG images, can load content from another domain. - result.mIsWriteOnly = false; result.mImageRequest = imgRequest.forget(); return result; + result.mIsWriteOnly = + CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal); } nsLayoutUtils::SurfaceFromElementResult @@ -7400,7 +7401,8 @@ nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement, result.mHasSize = true; result.mSize = result.mLayersImage->GetSize(); result.mPrincipal = principal.forget(); - result.mIsWriteOnly = false; + result.mIsWriteOnly = + CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal); return result; } |