зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1422636: Inline Gecko_Namespace. r=xidorn
MozReview-Commit-ID: FFdmaYCDxnv
This commit is contained in:
Родитель
08252773dc
Коммит
0deac30454
|
@ -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.*",
|
||||
|
|
Загрузка…
Ссылка в новой задаче