Bug 1839315: part 6) Lift code for fetchpriority attribute from nsGenericHTMLElementWithFetchPriorityAttribute to nsGenericHTMLElement. r=smaug
As requested in the review of part 1. Differential Revision: https://phabricator.services.mozilla.com/D191274
This commit is contained in:
@@ -49,7 +49,7 @@ namespace mozilla::dom {
|
||||
|
||||
HTMLLinkElement::HTMLLinkElement(
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
: nsGenericHTMLElementWithFetchPriorityAttribute(std::move(aNodeInfo)) {}
|
||||
: nsGenericHTMLElement(std::move(aNodeInfo)) {}
|
||||
|
||||
HTMLLinkElement::~HTMLLinkElement() { SupportsDNSPrefetch::Destroyed(*this); }
|
||||
|
||||
@@ -163,10 +163,15 @@ bool HTMLLinkElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
||||
aResult.ParseStringOrAtom(aValue);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (aAttribute == nsGkAtoms::fetchpriority) {
|
||||
ParseFetchPriority(aValue, aResult);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return nsGenericHTMLElementWithFetchPriorityAttribute::ParseAttribute(
|
||||
aNamespaceID, aAttribute, aValue, aMaybeScriptedPrincipal, aResult);
|
||||
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
|
||||
aMaybeScriptedPrincipal, aResult);
|
||||
}
|
||||
|
||||
void HTMLLinkElement::CreateAndDispatchEvent(const nsAString& aEventName) {
|
||||
|
||||
Reference in New Issue
Block a user