Bug 1161366 - Correctly set referrer when loading fonts with |new FontFace()|. r=dbaron

This commit is contained in:
Cameron McCormack 2015-05-05 19:55:28 +10:00
parent 37d0283698
commit 8dbfa8b82a
3 changed files with 10 additions and 1 deletions

View File

@ -485,10 +485,11 @@ FontFace::ParseDescriptor(nsCSSFontDesc aDescID,
nsCOMPtr<nsIPrincipal> principal = global->PrincipalOrNull();
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(mParent);
nsCOMPtr<nsIURI> docURI = window->GetDocumentURI();
nsCOMPtr<nsIURI> base = window->GetDocBaseURI();
if (!parser.ParseFontFaceDescriptor(aDescID, aString,
nullptr, // aSheetURL
docURI, // aSheetURL
base,
principal,
aResult)) {

View File

@ -0,0 +1,7 @@
<script>
var f = new FontFace("x", "url(x.ttf)", { unicodeRange: "U+0041" });
f.load();
document.fonts.add(f);
f = new FontFace("x", "url(x.ttf)", { unicodeRange: "U+0042" });
f.load();
</script>

View File

@ -113,5 +113,6 @@ load 1074651-1.html
pref(dom.webcomponents.enabled,true) load 1089463-1.html
pref(layout.css.expensive-style-struct-assertions.enabled,true) load 1136010-1.html
load 1153693-1.html
load 1161366-1.html
load large_border_image_width.html
load border-image-visited-link.html