mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1187357 - rename referrer attribute to referrerpolicy. r=hsivonen
This commit is contained in:
parent
f83443eb1d
commit
2050e99124
@ -13486,7 +13486,7 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent,
|
||||
// if per element referrer is enabled, the element referrer overrules
|
||||
// the document wide referrer
|
||||
if (IsElementAnchor(aContent)) {
|
||||
net::ReferrerPolicy refPolEnum = aContent->AsElement()->GetReferrerPolicy();
|
||||
net::ReferrerPolicy refPolEnum = aContent->AsElement()->GetReferrerPolicyAsEnum();
|
||||
if (refPolEnum != net::RP_Unset) {
|
||||
refererPolicy = refPolEnum;
|
||||
}
|
||||
|
@ -3606,11 +3606,11 @@ Element::FontSizeInflation()
|
||||
}
|
||||
|
||||
net::ReferrerPolicy
|
||||
Element::GetReferrerPolicy()
|
||||
Element::GetReferrerPolicyAsEnum()
|
||||
{
|
||||
if (Preferences::GetBool("network.http.enablePerElementReferrer", false) &&
|
||||
IsHTMLElement()) {
|
||||
const nsAttrValue* referrerValue = GetParsedAttr(nsGkAtoms::referrer);
|
||||
const nsAttrValue* referrerValue = GetParsedAttr(nsGkAtoms::referrerpolicy);
|
||||
if (referrerValue && referrerValue->Type() == nsAttrValue::eEnum) {
|
||||
return net::ReferrerPolicy(referrerValue->GetEnumValue());
|
||||
}
|
||||
|
@ -1074,7 +1074,7 @@ public:
|
||||
*/
|
||||
float FontSizeInflation();
|
||||
|
||||
net::ReferrerPolicy GetReferrerPolicy();
|
||||
net::ReferrerPolicy GetReferrerPolicyAsEnum();
|
||||
|
||||
protected:
|
||||
/*
|
||||
|
@ -411,7 +411,7 @@ nsFrameLoader::ReallyStartLoadingInternal()
|
||||
net::ReferrerPolicy referrerPolicy = mOwnerContent->OwnerDoc()->GetReferrerPolicy();
|
||||
HTMLIFrameElement* iframe = HTMLIFrameElement::FromContent(mOwnerContent);
|
||||
if (iframe) {
|
||||
net::ReferrerPolicy iframeReferrerPolicy = iframe->GetReferrerPolicy();
|
||||
net::ReferrerPolicy iframeReferrerPolicy = iframe->GetReferrerPolicyAsEnum();
|
||||
if (iframeReferrerPolicy != net::RP_Unset) {
|
||||
referrerPolicy = iframeReferrerPolicy;
|
||||
}
|
||||
|
@ -594,6 +594,7 @@ GK_ATOM(menuseparator, "menuseparator")
|
||||
GK_ATOM(message, "message")
|
||||
GK_ATOM(meta, "meta")
|
||||
GK_ATOM(referrer, "referrer")
|
||||
GK_ATOM(referrerpolicy, "referrerpolicy")
|
||||
GK_ATOM(meter, "meter")
|
||||
GK_ATOM(method, "method")
|
||||
GK_ATOM(microdataProperties, "microdataProperties")
|
||||
|
@ -121,13 +121,13 @@ public:
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::rel, aValue, rv);
|
||||
}
|
||||
void SetReferrer(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
void SetReferrerPolicy(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::referrer, aValue, rv);
|
||||
SetHTMLAttr(nsGkAtoms::referrerpolicy, aValue, rv);
|
||||
}
|
||||
void GetReferrer(nsAString& aReferrer)
|
||||
void GetReferrerPolicy(nsAString& aReferrer)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::referrer, aReferrer);
|
||||
GetHTMLAttr(nsGkAtoms::referrerpolicy, aReferrer);
|
||||
}
|
||||
nsDOMTokenList* RelList();
|
||||
void GetHreflang(DOMString& aValue)
|
||||
|
@ -125,13 +125,13 @@ public:
|
||||
}
|
||||
nsDOMTokenList* RelList();
|
||||
|
||||
void SetReferrer(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
void SetReferrerPolicy(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::referrer, aValue, rv);
|
||||
SetHTMLAttr(nsGkAtoms::referrerpolicy, aValue, rv);
|
||||
}
|
||||
void GetReferrer(nsAString& aReferrer)
|
||||
void GetReferrerPolicy(nsAString& aReferrer)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::referrer, aReferrer);
|
||||
GetHTMLAttr(nsGkAtoms::referrerpolicy, aReferrer);
|
||||
}
|
||||
|
||||
// The Link::GetOrigin is OK for us
|
||||
|
@ -159,13 +159,13 @@ public:
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::marginheight, aMarginHeight, aError);
|
||||
}
|
||||
void SetReferrer(const nsAString& aReferrer, ErrorResult& aError)
|
||||
void SetReferrerPolicy(const nsAString& aReferrer, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::referrer, aReferrer, aError);
|
||||
SetHTMLAttr(nsGkAtoms::referrerpolicy, aReferrer, aError);
|
||||
}
|
||||
void GetReferrer(nsAString& aReferrer)
|
||||
void GetReferrerPolicy(nsAString& aReferrer)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::referrer, aReferrer);
|
||||
GetHTMLAttr(nsGkAtoms::referrerpolicy, aReferrer);
|
||||
}
|
||||
|
||||
nsIDocument* GetSVGDocument()
|
||||
|
@ -189,19 +189,19 @@ public:
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::border, aBorder, aError);
|
||||
}
|
||||
void SetReferrer(const nsAString& aReferrer, ErrorResult& aError)
|
||||
void SetReferrerPolicy(const nsAString& aReferrer, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::referrer, aReferrer, aError);
|
||||
SetHTMLAttr(nsGkAtoms::referrerpolicy, aReferrer, aError);
|
||||
}
|
||||
void GetReferrer(nsAString& aReferrer)
|
||||
void GetReferrerPolicy(nsAString& aReferrer)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::referrer, aReferrer);
|
||||
GetHTMLAttr(nsGkAtoms::referrerpolicy, aReferrer);
|
||||
}
|
||||
|
||||
net::ReferrerPolicy
|
||||
GetImageReferrerPolicy() override
|
||||
{
|
||||
return GetReferrerPolicy();
|
||||
return GetReferrerPolicyAsEnum();
|
||||
}
|
||||
|
||||
int32_t X();
|
||||
|
@ -1003,7 +1003,7 @@ nsGenericHTMLElement::ParseAttribute(int32_t aNamespaceID,
|
||||
return aResult.ParseIntValue(aValue);
|
||||
}
|
||||
|
||||
if (aAttribute == nsGkAtoms::referrer) {
|
||||
if (aAttribute == nsGkAtoms::referrerpolicy) {
|
||||
return ParseReferrerAttribute(aValue, aResult);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ interface HTMLAnchorElement : HTMLElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString rel;
|
||||
[SetterThrows, Pref="network.http.enablePerElementReferrer"]
|
||||
attribute DOMString referrer;
|
||||
attribute DOMString referrerPolicy;
|
||||
readonly attribute DOMTokenList relList;
|
||||
[SetterThrows]
|
||||
attribute DOMString hreflang;
|
||||
|
@ -29,7 +29,7 @@ interface HTMLAreaElement : HTMLElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString rel;
|
||||
[SetterThrows, Pref="network.http.enablePerElementReferrer"]
|
||||
attribute DOMString referrer;
|
||||
attribute DOMString referrerPolicy;
|
||||
readonly attribute DOMTokenList relList;
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@ interface HTMLIFrameElement : HTMLElement {
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString height;
|
||||
[SetterThrows, Pure, Pref="network.http.enablePerElementReferrer"]
|
||||
attribute DOMString referrer;
|
||||
attribute DOMString referrerPolicy;
|
||||
readonly attribute Document? contentDocument;
|
||||
readonly attribute WindowProxy? contentWindow;
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ interface HTMLImageElement : HTMLElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString useMap;
|
||||
[SetterThrows, Pref="network.http.enablePerElementReferrer"]
|
||||
attribute DOMString referrer;
|
||||
attribute DOMString referrerPolicy;
|
||||
[SetterThrows]
|
||||
attribute boolean isMap;
|
||||
[SetterThrows]
|
||||
|
@ -128,7 +128,7 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace, nsIAtom* aName,
|
||||
nsString* crossOrigin =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_CROSSORIGIN);
|
||||
nsString* referrerPolicy =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_REFERRER);
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_REFERRERPOLICY);
|
||||
nsString* sizes =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_SIZES);
|
||||
mSpeculativeLoadQueue.AppendElement()->
|
||||
|
Loading…
Reference in New Issue
Block a user