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 222998 f8466e0caae10b3bd3625354822cc8fcf1b3b61a
parent 222997 a9321d31e47cc00d0550ba76f2041c0d7ca3585f
child 222999 f61a4592da851ede0e4b6d1dd9dcb7dac432d310
push id28079
push userryanvm@gmail.com
push dateFri, 09 Jan 2015 19:45:59 +0000
treeherdermozilla-central@086396560012 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstamm
bugs1107694
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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 ||