mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
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:
parent
abe0821c03
commit
d4826bcff3
@ -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() {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user