Bug 1305325 - Part 2: Add AnimValuesStyleRule::GetValue and HasValue to get the last composed style. r=birtles

HasValue() will be used to check that we have already composed style
for a given property or not.

MozReview-Commit-ID: L8lezGyON5o
This commit is contained in:
Hiroyuki Ikezoe 2016-12-04 08:07:39 +09:00
Родитель abe0821c03
Коммит d4826bcff3
2 изменённых файлов: 12 добавлений и 0 удалений

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

@ -83,6 +83,13 @@ AnimValuesStyleRule::AddValue(nsCSSPropertyID aProperty,
nsCachedStyleData::GetBitForSID(nsCSSProps::kSIDTable[aProperty]);
}
bool
AnimValuesStyleRule::GetValue(nsCSSPropertyID aProperty,
StyleAnimationValue& aValue) const
{
return mAnimationValues.Get(aProperty, &aValue);
}
#ifdef DEBUG
void
AnimValuesStyleRule::List(FILE* out, int32_t aIndent) const

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

@ -45,6 +45,11 @@ public:
void AddValue(nsCSSPropertyID aProperty, const StyleAnimationValue &aValue);
void AddValue(nsCSSPropertyID aProperty, StyleAnimationValue&& aValue);
bool HasValue(nsCSSPropertyID aProperty) const {
return mAnimationValues.Contains(aProperty);
}
bool GetValue(nsCSSPropertyID aProperty, StyleAnimationValue& aValue) const;
private:
~AnimValuesStyleRule() {}