зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1340958 - Allocate StyleRule only if we need to compose styles. r=birtles
MozReview-Commit-ID: 6ucsxBAaYRp --HG-- extra : rebase_source : ec0bd4627d40335c353b79720f7dfb2e4f3c304c
This commit is contained in:
Родитель
a3c9c5051e
Коммит
faa7a6f3cb
|
@ -440,7 +440,7 @@ KeyframeEffectReadOnly::GetUnderlyingStyle(
|
|||
{
|
||||
StyleAnimationValue result;
|
||||
|
||||
if (aAnimationRule->HasValue(aProperty)) {
|
||||
if (aAnimationRule && aAnimationRule->HasValue(aProperty)) {
|
||||
// If we have already composed style for the property, we use the style
|
||||
// as the underlying style.
|
||||
DebugOnly<bool> success = aAnimationRule->GetValue(aProperty, result);
|
||||
|
@ -623,11 +623,6 @@ KeyframeEffectReadOnly::ComposeStyle(
|
|||
} else {
|
||||
// Gecko backend
|
||||
|
||||
if (!aStyleRule.mGecko) {
|
||||
// Allocate the style rule now that we know we have animation data.
|
||||
aStyleRule.mGecko = new AnimValuesStyleRule();
|
||||
}
|
||||
|
||||
StyleAnimationValue fromValue =
|
||||
CompositeValue(prop.mProperty, aStyleRule.mGecko,
|
||||
segment->mFromValue.mGecko,
|
||||
|
@ -640,6 +635,11 @@ KeyframeEffectReadOnly::ComposeStyle(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!aStyleRule.mGecko) {
|
||||
// Allocate the style rule now that we know we have animation data.
|
||||
aStyleRule.mGecko = new AnimValuesStyleRule();
|
||||
}
|
||||
|
||||
// Iteration composition for accumulate
|
||||
if (mEffectOptions.mIterationComposite ==
|
||||
IterationCompositeOperation::Accumulate &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче