b5e79510a9b0878d167de5dd725d49937bbca9ed: Bug 1260983 - Add tests for changes to effect value context; r=heycam
Brian Birtles <birtles@gmail.com> - Fri, 01 Apr 2016 11:07:12 +0900 - rev 292573
Push 74890 by bbirtles@mozilla.com at Mon, 11 Apr 2016 07:47:06 +0000
Bug 1260983 - Add tests for changes to effect value context; r=heycam MozReview-Commit-ID: JuTRERHU4xl
357d4ede29718ebe1933892920640c7015355c18: Bug 1260983 - Allow creating animations with a target element not bound to a document; r=heycam
Brian Birtles <birtles@gmail.com> - Fri, 01 Apr 2016 09:32:26 +0900 - rev 292572
Push 74890 by bbirtles@mozilla.com at Mon, 11 Apr 2016 07:47:06 +0000
Bug 1260983 - Allow creating animations with a target element not bound to a document; r=heycam MozReview-Commit-ID: HHqHWikZ3zp
d23ce3108e5c79c031db7a1b531d9c694059e0ca: Bug 1260983 - Update animation properties when the style context changes; r=heycam
Brian Birtles <birtles@gmail.com> - Fri, 01 Apr 2016 09:31:51 +0900 - rev 292571
Push 74890 by bbirtles@mozilla.com at Mon, 11 Apr 2016 07:47:06 +0000
Bug 1260983 - Update animation properties when the style context changes; r=heycam MozReview-Commit-ID: L4ugcD7BxNX
2cf416db49d5503f1b43c6f80fbaa30d12debb7b: Bug 1260976 - Remove the old AnimationProperty-based GetFrames; r=heycam
Brian Birtles <birtles@gmail.com> - Fri, 01 Apr 2016 09:29:31 +0900 - rev 292570
Push 74889 by bbirtles@mozilla.com at Mon, 11 Apr 2016 07:44:07 +0000
Bug 1260976 - Remove the old AnimationProperty-based GetFrames; r=heycam MozReview-Commit-ID: FoEf7DymVDm
3791a7ec5d6f8db7500df9f84d4771ed7a14a36e: Bug 1260976 - Remove some references to properties within nsTransitionManager; r=heycam
Brian Birtles <birtles@gmail.com> - Fri, 01 Apr 2016 09:28:35 +0900 - rev 292569
Push 74889 by bbirtles@mozilla.com at Mon, 11 Apr 2016 07:44:07 +0000
Bug 1260976 - Remove some references to properties within nsTransitionManager; r=heycam Although we know that the animation properties will always be filled in for a transition in the cases where we need to query them (going forward we will have a situation where an animation may only have frames, not properties, but that will only happen when the animation isn't attached to an element or the element is not attached to a document, but we don't run animations in that case and cancel existing ones when we enter that state so although they *can* enter that state, we'll never run these methods on them when they do), we still want to move towards making frames the primary unit for interacting with animation values since frames always exist and represent the public interface. Ultimately it would be good to make the properties array on a KeyframeEffect(ReadOnly) an encapsulated detail so that we can freely change their structure (e.g. segments might not be the best setup, it might be better to just have arrays of free-standing values to avoid the duplication of values when segments are continuous). This patch removes or encapsulates a few references to properties and simplifies the code at the same time. MozReview-Commit-ID: 3II36SYVoRE
82bd962907de50af6516640ef674f0c764480383: Bug 1260976 - Make nsTransitionManager use Keyframe objects to set up transitions; r=heycam
Brian Birtles <birtles@gmail.com> - Fri, 01 Apr 2016 09:27:57 +0900 - rev 292568
Push 74889 by bbirtles@mozilla.com at Mon, 11 Apr 2016 07:44:07 +0000
Bug 1260976 - Make nsTransitionManager use Keyframe objects to set up transitions; r=heycam MozReview-Commit-ID: KHqoMELYyzQ
68ae46f52b62844de2152e6694b2ea150848e3e0: Bug 1261744 - Add two missing null checks for nsStringBuffer::Alloc(). r=erahm.
Nicholas Nethercote <nnethercote@mozilla.com> - Thu, 07 Apr 2016 09:35:50 +1000 - rev 292567
Push 74888 by nnethercote@mozilla.com at Mon, 11 Apr 2016 06:24:33 +0000
Bug 1261744 - Add two missing null checks for nsStringBuffer::Alloc(). r=erahm.
80828d9156c50b1ae7971585b12146b262a6db2e: Bug 1260572 - Restore web-animations/animtaion-effect-timing/delay.html entry to web-platform MANIFEST.json mistakenly removed in changeset ad9b3933f64fcb941fe6be56ebdb1c98326f6b48; r=me
Brian Birtles <birtles@gmail.com> - Mon, 11 Apr 2016 14:57:25 +0900 - rev 292566
Push 74887 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:57:53 +0000
Bug 1260572 - Restore web-animations/animtaion-effect-timing/delay.html entry to web-platform MANIFEST.json mistakenly removed in changeset ad9b3933f64fcb941fe6be56ebdb1c98326f6b48; r=me
52c0128aff10f4c50ae3ab34c64cef8844497942: Bug 1260655 - Drop some no-longer-needed code for setting up CSS animations using AnimationProperty objects; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 13:01:20 +0900 - rev 292565
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Drop some no-longer-needed code for setting up CSS animations using AnimationProperty objects; r=heycam MozReview-Commit-ID: JDzvQIxlsX6
063370aa01ab3d039f132372abd3d8c4adddf73e: Bug 1260655 - Use CSSAnimationBuilder::BuildAnimationFrames to set up CSS animations using Keyframe objects; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 13:01:13 +0900 - rev 292564
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Use CSSAnimationBuilder::BuildAnimationFrames to set up CSS animations using Keyframe objects; r=heycam MozReview-Commit-ID: BMLvYP8iIIa
d846bcdce3e9e8a192042f51834627da6253908e: Bug 1260655 - Add methods to CSSAnimationBuilder to build a set of Keyframe objects; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 12:59:33 +0900 - rev 292563
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Add methods to CSSAnimationBuilder to build a set of Keyframe objects; r=heycam We will call this method in the next patch in this series. MozReview-Commit-ID: E8QnGOIt91
77d2df1822a966b3bae9b8c3a890a081445f21cf: Bug 1260655 - Add a copy constructor and copy assignment operator to Keyframe; r=heycam
Brian Birtles <birtles@gmail.com> - Thu, 31 Mar 2016 16:26:52 +0900 - rev 292562
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Add a copy constructor and copy assignment operator to Keyframe; r=heycam It turns out that std::stable_sort on Mac and Android use this. Bug 1263500 tracks doing something more efficient on those platforms. MozReview-Commit-ID: 3tGbnoW67QP
bd357fbe96883c012177047b9ab10ebb1b8ce944: Bug 1260655 - Add an assignment operator to Keyframe that takes an rvalue reference; r=heycam
Brian Birtles <birtles@gmail.com> - Tue, 29 Mar 2016 11:29:20 +0900 - rev 292561
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Add an assignment operator to Keyframe that takes an rvalue reference; r=heycam This is needed in order to use std::stable_sort with this type since some implementations of std::stable_sort require this (as opposed to simply a move constructor). MozReview-Commit-ID: 5QmcIxkC4aB
51a410cc49c88ae03ca11760f8d914ef206188e4: Bug 1260655 - Allow StyleAnimationValue::UncomputeValue to produce values whose storage is independent of the passed-in computed value; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 12:39:59 +0900 - rev 292560
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Allow StyleAnimationValue::UncomputeValue to produce values whose storage is independent of the passed-in computed value; r=heycam When we go to switch CSS Animations over to using KeyframeEffectReadOnly::SetFrames we will need a way to represent any filled-in from/to values as nsCSSValue objects. These objects are built from the current computed style. We currently use StyleAnimationValue::ExtractComputedValue for this which returns a StyleAnimationValue. In order to convert this to an nsCSSValue we can use StyleAnimationValue::UncomputeValue. However, in some cases, the nsCSSValue objects returned by that method are dependent on the passed-in StyleAnimationValue object. This patch adds an overload to UncomputeValue that takes an rvalue StyleAnimationValue reference and produces an nsCSSValue that is independent of the StyleAnimationValue through a combination of copying data and transferring ownership of data. This patch also adjusts the return value for the case of filter and shadow lists when the list is empty so that we return a none value in this case. These are the only list types which are allowed to have a null list value. Not only does this produce the correct result when these values are serialized (the initial value for 'filter', 'text-shadow', and 'box-shadow' is 'none') it also means that UncomputeValue should never return an nsCSSValue whose unit is null which is important because when we later pass that value to BuildStyleRule it will treat a null nsCSSValue as an error case (specifically, "longhand failed to parse"). MozReview-Commit-ID: 4RoCn39ntiJ
33b9f509fab7b3ee00a2738a5301c24880e3d82a: Bug 1260655 - Return the stored Keyframe objects from GetFrames, when available ; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 08:59:08 +0900 - rev 292559
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Return the stored Keyframe objects from GetFrames, when available ; r=heycam Before switching CSS animations over to using KeyframeEffectReadOnly::SetFrames we update the getFrames() API to return the set frame objects (when available) so that we can test that we are setting the correct frames. MozReview-Commit-ID: 4SpBRM7Ykyv
852340c877fb6cc98612ec43ddb14838068e2470: Bug 1260655 - Update keyframe-effect/constructor.html to no longer refer to PropertyIndexedKeyframes or Keyframe; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 08:59:08 +0900 - rev 292558
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Update keyframe-effect/constructor.html to no longer refer to PropertyIndexedKeyframes or Keyframe; r=heycam These types have been removed from the normative part of the Web Animations spec. MozReview-Commit-ID: LJkWvuDCT55
8272d22371b731282138b3f4862e641ab8d4a6e7: Bug 1260655 - Wrap lines in keyframe-effect/constructor.html to 80 chars; r=whitespace-only
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 08:59:08 +0900 - rev 292557
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Wrap lines in keyframe-effect/constructor.html to 80 chars; r=whitespace-only MozReview-Commit-ID: FMg5uhxuZ6L
5db982657c9b2606d9572fced222741cffb136c1: Bug 1260655 - Add KeyframeEffectReadOnly::SetFrames; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 08:59:08 +0900 - rev 292556
Push 74886 by bbirtles@mozilla.com at Mon, 11 Apr 2016 05:50:31 +0000
Bug 1260655 - Add KeyframeEffectReadOnly::SetFrames; r=heycam Earlier in this patch series we divided keyframe processing into two stages: (1) Turning javascript objects into an array of Keyframe objects (2) Calculating AnimationProperty arrays from the Keyframe objects This patch creates a SetFrames method so that CSS animations and CSS transitions can skip (1) and pass the frames constructed from CSS syntax into (2). It also adds the following additional processing: a. Notifying animation mutation observers when the set of frames has changed. This is currently performed by nsAnimationManager but ultimately we should encapsulate this logic inside the effect itself. Furthermore, it will be needed when we implement effect.setFrames() (i.e. the Javascript-facing wrapper for this method). b. Preserving the mWinsInCascade and mIsRunningOnCompositor state on properties when updating them. This is currently performed by: bool KeyframeEffectReadOnly::UpdateProperties( const InfallibleTArray<AnimationProperty>& aProperties) which is what nsAnimationManager currently uses. We will ultimately remove the above method and here we are just moving this code to the new version of UpdateProperties. c. Requesting a restyle when the set of AnimationProperty objects has changed. Again, this is currently performed by the existing UpdateProperties method so we are just moving it here. This behavior will also be required when we implement effect.setFrames() and when we call UpdateProperties from elsewhere in restyling code. This is bug 1235002 but we fix it here and leave that bug to just do further cleanup work (e.g. re-instating the check for an empty property set before requesting a restyle in NotifyAnimationTimingUpdated). d. Marking the cascade as needing an update when the set of AnimationProperty objects has changed. This is in preparation for calling UpdateProperties from elsewhere in restyling (e.g. when the nsStyleContext is updated). MozReview-Commit-ID: 2ll26lsWZTm
3baed5c339e31188949641cb7bc7178a71070718: Bug 1260572 - Use 50% switch behavior if StyleAnimationValue::Interpolate fails; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 08:59:08 +0900 - rev 292555
Push 74885 by bbirtles@mozilla.com at Mon, 11 Apr 2016 04:45:58 +0000
Bug 1260572 - Use 50% switch behavior if StyleAnimationValue::Interpolate fails; r=heycam In KeyframeEffectReadOnly::ComposeStyle we call StyleAnimationValue::Interpolate but assume that it always passes. That was true when that code was only used for CSS animations and CSS transitions since they check that their animation values can be interpolated before setting up segments. However, when we set up animations using the Web Animations API we don't perform that check so it is possible for this call to fail. In that case, we could just bail, but, according to CSS Transitions we should apply a 50% switch in this case: https://drafts.csswg.org/css-transitions/#step-types (In Web Animations, specifying this is an open issue. See: https://w3c.github.io/web-animations/#specific-animation-behaviors). Bug 1064937 tracks doing this in general (we'll likely need to mark various properties as being no longer unanimatable but instead as supporting discrete animation) but we can start to introduce it now. Later in bug 1245748, CSS animations and transitions will likely start using the same code path as the Web Animations API for setting up keyframes. As a result, unless we take care to add checks that the values we set are interpolable, the 50% switch behavior will begin to apply to CSS animations and transitions too at that point. Some concerns have been raised about possible web compatibility issues around the 50% switch behavior (see [1] and [2]). For CSS animations, Chrome already supports this behavior so it should be ok at least for CSS animations. When we switch CSS transitions over to the same code path, however, we will need to be careful to add checks that the transition endpoints are interpolable (we can investigate introducing this behavior to transitions as a separate bug that can be easily backed out / preffed off). Regarding the naming of the test added here, going forward we would like to restructure the tests under web-platform-tests to better match the structure of the Web Animations since that seems to be the convention there. However, this doesn't *quite* match the structure of the spec since there are upcoming changes to the spec in this area (e.g. renaming animation behaviors to animation types). However, it should be close enough that we don't have to move it around too much in future. [1] https://drafts.csswg.org/css-transitions/#step-types [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1064937#c0 MozReview-Commit-ID: KcxILrckJg9
debc00d94145d59fe5ddc6bc4f5526508745e24c: Bug 1260572 - Replace AnimValuesStyleRule::AddEmptyValue with an overload of AddValue that takes an rvalue reference; r=heycam
Brian Birtles <birtles@gmail.com> - Wed, 30 Mar 2016 08:59:01 +0900 - rev 292554
Push 74885 by bbirtles@mozilla.com at Mon, 11 Apr 2016 04:45:58 +0000
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
(0) -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 tip