зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1370502 - stylo: Implement ServoStyleRule::SelectorMatchesElement. r=emilio
MozReview-Commit-ID: JMoBRHzDQZq --HG-- extra : rebase_source : eed6bdf6a64ee10464abdcb7b120ecdd6a2698a7
This commit is contained in:
Родитель
cc0418b831
Коммит
9e515dc3c7
|
@ -157,6 +157,9 @@ SERVO_BINDING_FUNC(Servo_StyleRule_GetSpecificityAtIndex, void,
|
|||
uint64_t* specificity)
|
||||
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorCount, void,
|
||||
RawServoStyleRuleBorrowed rule, uint32_t* count)
|
||||
SERVO_BINDING_FUNC(Servo_StyleRule_SelectorMatchesElement, bool,
|
||||
RawServoStyleRuleBorrowed, RawGeckoElementBorrowed,
|
||||
uint32_t index, mozilla::CSSPseudoElementType pseudo_type)
|
||||
SERVO_BINDING_FUNC(Servo_ImportRule_GetHref, void,
|
||||
RawServoImportRuleBorrowed rule, nsAString* result)
|
||||
SERVO_BINDING_FUNC(Servo_ImportRule_GetSheet,
|
||||
|
|
|
@ -279,7 +279,14 @@ ServoStyleRule::SelectorMatchesElement(Element* aElement,
|
|||
const nsAString& aPseudo,
|
||||
bool* aMatches)
|
||||
{
|
||||
// TODO Bug 1370502
|
||||
nsCOMPtr<nsIAtom> pseudoElt = NS_Atomize(aPseudo);
|
||||
const CSSPseudoElementType pseudoType =
|
||||
nsCSSPseudoElements::GetPseudoType(pseudoElt,
|
||||
CSSEnabledState::eIgnoreEnabledState);
|
||||
*aMatches = Servo_StyleRule_SelectorMatchesElement(mRawRule,
|
||||
aElement,
|
||||
aSelectorIndex,
|
||||
pseudoType);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче