Bug 1422636: Inline Gecko_Namespace. r=xidorn

MozReview-Commit-ID: FFdmaYCDxnv
This commit is contained in:
Emilio Cobos Álvarez 2017-12-04 00:19:44 +01:00
Родитель 08252773dc
Коммит 0deac30454
4 изменённых файлов: 7 добавлений и 15 удалений

Просмотреть файл

@ -43,15 +43,12 @@ public:
// Returns the atom for the namespace URI associated with the given ID. The
// ID must be within range and not be kNameSpaceID_None (i.e. zero);
//
// NB: The requirement of mapping from the first entry to the empty atom is
// necessary for Servo, though it can be removed if needed adding a branch in
// GeckoElement::get_namespace().
nsAtom* NameSpaceURIAtom(int32_t aNameSpaceID) {
MOZ_ASSERT(aNameSpaceID > 0);
return NameSpaceURIAtomForServo(aNameSpaceID);
}
// NB: This function should only be called by Servo code (and the above
// accessor), which uses the empty atom to represent kNameSpaceID_None.
nsAtom* NameSpaceURIAtomForServo(int32_t aNameSpaceID) {
MOZ_ASSERT(aNameSpaceID >= 0);
MOZ_ASSERT((int64_t) aNameSpaceID < (int64_t) mURIArray.Length());
return mURIArray.ElementAt(aNameSpaceID);
}

Просмотреть файл

@ -323,13 +323,6 @@ Gecko_MatchesElement(CSSPseudoClassType aType,
return nsCSSPseudoClasses::MatchesElement(aType, aElement).value();
}
nsAtom*
Gecko_Namespace(RawGeckoElementBorrowed aElement)
{
int32_t id = aElement->NodeInfo()->NamespaceID();
return nsContentUtils::NameSpaceManager()->NameSpaceURIAtomForServo(id);
}
// Dirtiness tracking.
void
Gecko_SetNodeFlags(RawGeckoNodeBorrowed aNode, uint32_t aFlags)

Просмотреть файл

@ -181,7 +181,6 @@ Gecko_LoadStyleSheet(mozilla::css::Loader* loader,
uint64_t Gecko_ElementState(RawGeckoElementBorrowed element);
bool Gecko_IsRootElement(RawGeckoElementBorrowed element);
bool Gecko_MatchesElement(mozilla::CSSPseudoClassType type, RawGeckoElementBorrowed element);
nsAtom* Gecko_Namespace(RawGeckoElementBorrowed element);
bool Gecko_MatchLang(RawGeckoElementBorrowed element,
nsAtom* override_lang, bool has_override_lang,
const char16_t* value);

Просмотреть файл

@ -75,6 +75,8 @@ headers = [
"mozilla/SizeOfState.h",
"nsCSSCounterStyleRule.h",
"nsCSSFontFaceRule.h",
"nsContentUtils.h",
"nsNameSpaceManager.h",
"nsMediaFeatures.h",
"nsXBLBinding.h",
]
@ -206,6 +208,7 @@ whitelist-vars = [
"kNameSpaceID_.*",
"kGenericFont_.*",
"kPresContext_.*",
"nsContentUtils_.*",
]
whitelist-types = [
"RawGecko.*",