Bug 1367615 - Part 3: Implement ServoStyleRule::GetSelectorCount and GetSelectorText. r=emilio

MozReview-Commit-ID: 9MIY9ing11V

--HG--
extra : rebase_source : f51e5bef0ea87a78677a08fbd93cdadcc6c9905d
This commit is contained in:
Fernando Jimenez Moreno 2017-06-07 17:48:49 +02:00
Родитель edb7fd5bd3
Коммит 494d25ee08
2 изменённых файлов: 12 добавлений и 1 удалений

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

@ -147,6 +147,11 @@ SERVO_BINDING_FUNC(Servo_StyleRule_SetStyle, void,
RawServoDeclarationBlockBorrowed declarations)
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorText, void,
RawServoStyleRuleBorrowed rule, nsAString* result)
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorTextFromIndex, void,
RawServoStyleRuleBorrowed rule, uint32_t index,
nsAString* result)
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorCount, void,
RawServoStyleRuleBorrowed rule, uint32_t* count)
SERVO_BINDING_FUNC(Servo_ImportRule_GetHref, void,
RawServoImportRuleBorrowed rule, nsAString* result)
SERVO_BINDING_FUNC(Servo_ImportRule_GetSheet, const RawServoStyleSheet*,

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

@ -253,18 +253,23 @@ ServoStyleRule::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
uint32_t
ServoStyleRule::GetSelectorCount()
{
return 0;
uint32_t aCount;
Servo_StyleRule_GetSelectorCount(mRawRule, &aCount);
return aCount;
}
nsresult
ServoStyleRule::GetSelectorText(uint32_t aSelectorIndex, nsAString& aText)
{
Servo_StyleRule_GetSelectorTextFromIndex(mRawRule, aSelectorIndex, &aText);
return NS_OK;
}
nsresult
ServoStyleRule::GetSpecificity(uint32_t aSelectorIndex, uint64_t* aSpecificity)
{
// TODO Bug 1370501
return NS_OK;
}
@ -274,6 +279,7 @@ ServoStyleRule::SelectorMatchesElement(Element* aElement,
const nsAString& aPseudo,
bool* aMatches)
{
// TODO Bug 1370502
return NS_OK;
}