Commit Graph

5 Commits

Author SHA1 Message Date
Brian Birtles
e518a8a1ed Bug 1263488 - Make AnimValuesStyleRule re-use PropertyStyleAnimationValuePair; r=hiro
Rather than defining the same type redundantly but with a name that overlaps
with a struct in KeyframeEffect.h (that has a different type).

MozReview-Commit-ID: 3MbvXWL8XlL
2016-05-11 16:43:32 +09:00
Brian Birtles
a9d4b99d8d Bug 1260572 - Replace AnimValuesStyleRule::AddEmptyValue with an overload of AddValue that takes an rvalue reference; r=heycam
In the next patch in this series, we would like to update the error handling of
the call to StyleAnimationValue::Interpolate in
KeyframeEffectReadOnly::ComposeStyle. Using AnimValuesStyleRule::AddEmptyValue
there, however, makes handling the error case difficult because we need a means
of clearing the allocated StyleAnimationValue.

However, simply using AnimationValuesStyleRule::AddValue means we will end up
doing needless allocations for StyleAnimationValue objects (the copy
constructor for which can result in performing potentially expensive heap
allocations, such as when lists are deep-copied).

Instead, we add a Move constructor to StyleAnimationValue and add an overload
of AnimValuesStyleRule::AddValue that takes an rvalue reference. This
provides a more consistent interface to AnimValuesStyleRule and avoids the
unnecessary allocations from copying StyleAnimationValue objects.

MozReview-Commit-ID: CaP1uPAgNnm
2016-03-30 08:59:01 +09:00
Ryo Kato
b3baf9a794 Bug 1260353 - Remove unnecessary method AnimValuesStyleRule::AddPropertiesToSet() r=hiro
MozReview-Commit-ID: 3rRvYLNCvXE

--HG--
extra : rebase_source : 9997d72733affd869a09a382820d349f5493b732
2016-03-29 16:12:33 +09:00
Rob McAuley
e11d308ed2 Bug 1259898: use range-based for loop in AnimValuesStyleRule.h r=birtles
MozReview-Commit-ID: HlJ291yiVEp

--HG--
extra : rebase_source : b153563ffce9cf94e5196fc33b9f582b03371525
2016-03-26 16:50:05 +09:00
Brian Birtles
f4eeb573d0 Bug 1232561 part 3 - Move AnimValuesStyleRule to a separate file; r=heycam
As we gradually move logic from layout/style/AnimationCommon.cpp to
dom/animation/EffectSet and EffectCompositor it makes sense to let this class
live in its own file inside dom/animation where it is used.

--HG--
extra : rebase_source : aed0632a19800e0ef9d8fe1d03d0364bf1ccc4dc
2016-01-06 11:04:06 +09:00