Bug 1107694 - Make sure to set the referrer-policy for font-face source URLs. r=sstamm
authorJonathan Kew <jkew@mozilla.com>
Fri, 09 Jan 2015 12:24:47 +0000
changeset 236013 f8466e0caae10b3bd3625354822cc8fcf1b3b61a
parent 236012 a9321d31e47cc00d0550ba76f2041c0d7ca3585f
child 236014 f61a4592da851ede0e4b6d1dd9dcb7dac432d310
push id384
push usermartin.thomson@gmail.com
push dateFri, 09 Jan 2015 21:26:39 +0000
reviewerssstamm
bugs1107694
milestone37.0a1
Bug 1107694 - Make sure to set the referrer-policy for font-face source URLs. r=sstamm
layout/style/FontFaceSet.cpp
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -915,16 +915,17 @@ FontFaceSet::FindOrCreateUserFontEntryFr
           face->mSourceType = gfxFontFaceSrc::eSourceType_Local;
           face->mURI = nullptr;
           face->mFormatFlags = 0;
           break;
         case eCSSUnit_URL:
           face->mSourceType = gfxFontFaceSrc::eSourceType_URL;
           face->mURI = val.GetURLValue();
           face->mReferrer = val.GetURLStructValue()->mReferrer;
+          face->mReferrerPolicy = mDocument->GetReferrerPolicy();
           face->mOriginPrincipal = val.GetURLStructValue()->mOriginPrincipal;
           NS_ASSERTION(face->mOriginPrincipal, "null origin principal in @font-face rule");
 
           // agent and user stylesheets are treated slightly differently,
           // the same-site origin check and access control headers are
           // enforced against the sheet principal rather than the document
           // principal to allow user stylesheets to include @font-face rules
           face->mUseOriginPrincipal = (aSheetType == nsStyleSet::eUserSheet ||