Skip to content

Commit

Permalink
Bug 1223838 - enable perElementReferrer by default. r=hsivonen
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer committed Dec 2, 2015
1 parent 83ab2f2 commit cbf1554
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dom/base/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3772,7 +3772,7 @@ Element::FontSizeInflation()
net::ReferrerPolicy
Element::GetReferrerPolicyAsEnum()
{
if (Preferences::GetBool("network.http.enablePerElementReferrer", false) &&
if (Preferences::GetBool("network.http.enablePerElementReferrer", true) &&
IsHTMLElement()) {
const nsAttrValue* referrerValue = GetParsedAttr(nsGkAtoms::referrerpolicy);
if (referrerValue && referrerValue->Type() == nsAttrValue::eEnum) {
Expand Down
2 changes: 1 addition & 1 deletion modules/libpref/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ pref("network.http.referer.XOriginPolicy", 0);
pref("network.http.sendSecureXSiteReferrer", true);

// Controls whether referrer attributes in <a>, <img>, <area>, and <iframe> are honoured
pref("network.http.enablePerElementReferrer", false);
pref("network.http.enablePerElementReferrer", true);

// Maximum number of consecutive redirects before aborting.
pref("network.http.redirection-limit", 20);
Expand Down
2 changes: 1 addition & 1 deletion parser/html/nsHtml5TreeOpExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ nsHtml5TreeOpExecutor::PreloadImage(const nsAString& aURL,
// use document wide referrer policy
mozilla::net::ReferrerPolicy referrerPolicy = mSpeculationReferrerPolicy;
// if enabled in preferences, use the referrer attribute from the image, if provided
bool referrerAttributeEnabled = Preferences::GetBool("network.http.enablePerElementReferrer", false);
bool referrerAttributeEnabled = Preferences::GetBool("network.http.enablePerElementReferrer", true);
if (referrerAttributeEnabled) {
mozilla::net::ReferrerPolicy imageReferrerPolicy = mozilla::net::ReferrerPolicyFromString(aImageReferrerPolicy);
if (imageReferrerPolicy != mozilla::net::RP_Unset) {
Expand Down

0 comments on commit cbf1554

Please sign in to comment.