зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1408019 - Code clean up for sSupportedRelValues. r=bz
This commit is contained in:
Родитель
031b782d8e
Коммит
a1b076412f
|
@ -378,7 +378,8 @@ HTMLLinkElement::GetLinkTarget(nsAString& aTarget)
|
|||
|
||||
static const DOMTokenListSupportedToken sSupportedRelValues[] = {
|
||||
// Keep this in sync with ToLinkMask in nsStyleLinkElement.cpp.
|
||||
// "import" must come first because it's conditional.
|
||||
// "preload" must come first because it can be disabled.
|
||||
"preload",
|
||||
"prefetch",
|
||||
"dns-prefetch",
|
||||
"stylesheet",
|
||||
|
@ -387,23 +388,9 @@ static const DOMTokenListSupportedToken sSupportedRelValues[] = {
|
|||
"preconnect",
|
||||
"icon",
|
||||
"search",
|
||||
"preload",
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const DOMTokenListSupportedToken sSupportedRelValuesNoPreload[] = {
|
||||
// Keep this in sync with ToLinkMask in nsStyleLinkElement.cpp.
|
||||
// "import" must come first because it's conditional.
|
||||
"prefetch",
|
||||
"dns-prefetch",
|
||||
"stylesheet",
|
||||
"next",
|
||||
"alternate",
|
||||
"preconnect",
|
||||
"icon",
|
||||
"search",
|
||||
nullptr
|
||||
};
|
||||
nsDOMTokenList*
|
||||
HTMLLinkElement::RelList()
|
||||
{
|
||||
|
@ -411,7 +398,7 @@ HTMLLinkElement::RelList()
|
|||
if (Preferences::GetBool("network.preload")) {
|
||||
mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues);
|
||||
} else {
|
||||
mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValuesNoPreload);
|
||||
mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, &sSupportedRelValues[1]);
|
||||
}
|
||||
}
|
||||
return mRelList;
|
||||
|
|
Загрузка…
Ссылка в новой задаче