Bug 1615156 - Don't return true from KeyframeEffect::ContainsAnimatedScale if there is no base style. r=boris

The base style is not set in cases where there is no additive/accumulative
animation.

Differential Revision: https://phabricator.services.mozilla.com/D62691

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2020-02-13 19:13:39 +00:00
parent 337c4eea4d
commit 11c48a531c

View File

@ -1788,14 +1788,11 @@ bool KeyframeEffect::ContainsAnimatedScale(const nsIFrame* aFrame) const {
}
AnimationValue baseStyle = BaseStyle(prop.mProperty);
if (baseStyle.IsNull()) {
// If we failed to get the base style, we consider it has scale value
// here just to be safe.
return true;
}
gfx::Size size = baseStyle.GetScaleValue(aFrame);
if (size != gfx::Size(1.0f, 1.0f)) {
return true;
if (!baseStyle.IsNull()) {
gfx::Size size = baseStyle.GetScaleValue(aFrame);
if (size != gfx::Size(1.0f, 1.0f)) {
return true;
}
}
// This is actually overestimate because there are some cases that combining