Граф коммитов

159 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe 00e2f46aeb Bug 1268385 - Clear isRunningOnCompositor for script animations if associated nsIFrame is destroyed. r=birtles
MozReview-Commit-ID: 3tTkDtxkHcT

--HG--
extra : rebase_source : 388f548cb30f5384cceb620a595dd10b5fd22e4e
2016-05-16 16:25:46 +09:00
Brian Birtles 90fb66a530 Bug 1271904 - Rename KeyframeEffectReadOnly.getFrames() and KeyframeEffect.setFrames() to getKeyframes()/setKeyframes(); r=hiro, r=smaug
MozReview-Commit-ID: GwLLY39l1KE

--HG--
rename : dom/animation/test/css-animations/file_keyframeeffect-getframes.html => dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-animations/test_keyframeeffect-getframes.html => dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/file_keyframeeffect-getframes.html => dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/test_keyframeeffect-getframes.html => dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html
rename : testing/web-platform/meta/web-animations/keyframe-effect/setFrames.html.ini => testing/web-platform/meta/web-animations/keyframe-effect/setKeyframes.html.ini
rename : testing/web-platform/tests/web-animations/keyframe-effect/setFrames.html => testing/web-platform/tests/web-animations/keyframe-effect/setKeyframes.html
2016-05-13 09:40:52 +09:00
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
Hiroyuki Ikezoe 8fd021fbd4 Bug 1235002 - Skip requesting a restyle when mProperties is empty. r=birtles
The test case here does not check whether requesting restyles for empty
properties are skipped or not.  It just checks that whether restyles happen or
not because there is no way to check each request for restyles yet.

MozReview-Commit-ID: I5XMYfCTYU8

--HG--
extra : rebase_source : 893aaaf2c47e05f37bce9913df4f14e3021f215a
2016-05-09 12:33:52 +09:00
Hiroyuki Ikezoe 3e6aae0a2d Bug 1267937 - Part 1: Clear mProgressOnLastCompose once we are not in effect. r=birtles
--HG--
extra : amend_source : 2b1b5d22fdb559c940629fe4536369d95ca29306
2016-04-30 07:08:10 +09:00
Boris Chiou 44367b12f2 Bug 1067769 - Part 12: Use Maybe<OwningAnimationTarget> in KeyframeEffect(ReadOnly) constructors. r=birtles
MozReview-Commit-ID: Euv76D6sIFX

--HG--
extra : rebase_source : 7ef6e5d70104942b21671e2143c107e678f400a7
2016-04-28 23:22:44 +08:00
Boris Chiou 43960e1a63 Bug 1067769 - Part 11: Implement animation mutation observer while setting the target. r=birtles
MozReview-Commit-ID: EjgbslUwPKw

--HG--
extra : rebase_source : a93b08d48769c1e73fccb420553b41d06fbc8e16
2016-04-28 23:22:43 +08:00
Boris Chiou 6b5b1483f8 Bug 1067769 - Part 10: Implement SetTarget(). r=birtles
MozReview-Commit-ID: GW3Ujn5cbY3

--HG--
extra : rebase_source : ffc006c67d5b0dd712c4d7d3f938c37b8167ad58
2016-04-28 23:22:43 +08:00
Boris Chiou cba7a5b73d Bug 1067769 - Part 9: Wrap RequestRestyle and UnregisterTarget. r=birtles
We will need to request a restyle and unregister the current target in
SetTarget(), and there are many duplicate code segments for them now, so wrap
them for reusing the code.

MozReview-Commit-ID: 33XoNspZme3

--HG--
extra : rebase_source : 881aa13d79ccc75872a6cc48d0a1da71cfdff2ae
2016-04-28 23:22:43 +08:00
Boris Chiou 0937d3158e Bug 1067769 - Part 8: Add ConvertTarget function. r=birtles
Use ConvertTarget() to convert Nullabe<ElementOrCSSPseudoElement> into
Maybe<OwningAnimationTarget>, so SetTarget() can use it as well. The return type
of ConvertTarget is not Maybe<NonOwningAnimationTarget> because we need to
compare the return type with KeyframeEffectReadOnly::mTarget, so using the same
type would be easier to implement.

MozReview-Commit-ID: GskbydOMoo0

--HG--
extra : rebase_source : d1a8fe2d8fe89e4ffdb79844ab5581a9af3b2ce5
2016-04-28 23:22:43 +08:00
Boris Chiou d423a8f2b2 Bug 1067769 - Part 7: Define OwningAnimationTarget and use it. r=birtles
1. Define OwningAnimationTarget.
2. Replace the KeyframeEffectReadOnly::mTarget/mPseudoType members with
   a Maybe<OwningAnimationTarget> mTarget member.

MozReview-Commit-ID: 65qOoNyDRSy

--HG--
extra : rebase_source : b938dbc00c918861d4141128fad8e30f61668e40
2016-04-28 23:22:43 +08:00
Boris Chiou 57a8894260 Bug 1067769 - Part 5: Support setting KeyframeEffect.target webidl interface. r=smaug
MozReview-Commit-ID: 9494jdI97MT

--HG--
extra : rebase_source : 4c8fa7bfb6502c78a96e1af1e2a6d98d7708d7dd
2016-04-28 23:22:43 +08:00
Boris Chiou ea72ffdf23 Bug 1067769 - Part 2: Support nullable target in KeyframeEffect(ReadOnly) constructor. r=birtles
We set a null target only from Web Animations API, so make sure
KeyframeEffectReadOnly::ConstructKeyframeEffect() can handle null target
properly.

MozReview-Commit-ID: D6PoV7PGFj3

--HG--
extra : rebase_source : 4ba2d616d6b2cdfe7985ced29e4454e818d076b8
2016-04-28 23:22:42 +08:00
Boris Chiou ce16585e39 Bug 1067769 - Part 1: Avoid doing RequestRestyle and mutation batch for null target. r=birtles
We don't need to restyle if mTarget is nullptr, so skip it. For
nsAutoAnimationMutationBatch, we also skip it if mTarget is nullptr.

AnimationColletion, nsAnimationManager and nsTransitionManger are for
CSS Animations and CSS Transtions, so the effect should have an effective
target. Therefore, I think we don't have to revise them for
nsAutoAnimationMutationBatch.

MozReview-Commit-ID: Egzr1QVEa0v

--HG--
extra : rebase_source : 2f9125f71f67a3d50f2126fed4d1b459d938de22
2016-04-28 23:22:42 +08:00
Ryo Kato ed3e9e9db3 Bug 1244591 - Part 1: Implement KeyframeEffect.setFrames r=birtles,smaug
WebIDL referes to KeyframeEffect::SetFrames(), which is derived from
KeyframeEffectReadOnly::SetFrames() in terms of implementation.

In addition, make KeyframeEffectReadOnly::ConstructKeyframeEffect call
KeyframeEffectReadOnly::SetFrames() to simplify the code.

MozReview-Commit-ID: 7ASbtoN7Tnp

--HG--
extra : rebase_source : c398ff7154c4533255f56c7ca13314e440eb6258
2016-04-09 15:33:34 +09:00
Brian Birtles 1e1f683439 Bug 1266257 - Revise timing model calculations to use fraction-based approach; r=hiro
As per updates to Web Animations spec:

  https://github.com/w3c/web-animations/compare/10fc97366041%5E...b9a721e6536ae27c37df1e3948b013c6a52d5f4c

MozReview-Commit-ID: 5NHnF56aETJ
2016-04-21 14:51:36 +09:00
Hiroyuki Ikezoe 1b7f619907 Bug 1263063 - Part 5: Introduce TimingParams::EndTime(). r=dholbert
MozReview-Commit-ID: 6dpnb65vndl

--HG--
extra : rebase_source : b4c0046b893bf78ebec91d3308fcbfccf48a79d1
2016-04-14 19:39:42 +09:00
Hiroyuki Ikezoe ffc5ef3515 Bug 1263063 - Part 4: Move ActiveDuration() into TimingParams. r=dholbert
MozReview-Commit-ID: 4HS8vTJYtDe

--HG--
extra : rebase_source : 5ccdc1aa1ffe0c33a0d334cf2a4736877481cd28
2016-04-14 19:39:39 +09:00
Hiroyuki Ikezoe 6846fc920e Bug 1263063 - Part 3: Change logic in KeyFrameEffect to assume that TimingParams' iteration-count has already been validated as nonnegative & finite. r=dholbert
MozReview-Commit-ID: 9mbBHvyjNZg

--HG--
extra : rebase_source : 8e371d2349095ab924ca0be241eccf28e092bdb7
2016-04-14 19:36:03 +09:00
Hiroyuki Ikezoe 99b87b0281 Bug 1263063 - Part 1: Remove unnecessary clamping of TimingParams::mIterationStart, since it's guaranteed to be nonnegative. r=dholbert
MozReview-Commit-ID: ApQVt39jasa

--HG--
extra : rebase_source : e247683aa727f7e331fc4a559032f7c636ea834c
2016-04-14 19:35:59 +09:00
Boris Chiou 1decf4e780 Bug 1249564 - Part 2: Cycle collect AnimationEffectTimingReadOnly. r=birtles
Add KeyframeEffectReadOnly::mTiming into the list of cycle collection to
avoid any possible memory leak.

MozReview-Commit-ID: C5mFQ7TsqC7

--HG--
extra : rebase_source : 8ee1e58d69a3becb0b8566fa3529154bb66d3064
2016-04-13 18:20:46 +08:00
Boris Chiou c5c62dc083 Bug 1249564 - Part 1: Assign the parent object of AnimationEffectTiming(ReadOnly). r=birtles,bz
Use the current document as the parent object of
AnimationEffectTiming(ReadOnly).

MozReview-Commit-ID: JfPLk95hsJ1

--HG--
extra : rebase_source : ee068d0eb8e26f4c1e83b87049be8060fcd27813
2016-04-10 13:51:32 +08:00
Brian Birtles 1bf99cf79f Bug 1260983 - Allow creating animations with a target element not bound to a document; r=heycam
MozReview-Commit-ID: HHqHWikZ3zp
2016-04-01 09:32:26 +09:00
Brian Birtles 1a98da1bd9 Bug 1260976 - Remove the old AnimationProperty-based GetFrames; r=heycam
MozReview-Commit-ID: FoEf7DymVDm
2016-04-01 09:29:31 +09:00
Brian Birtles 9552e36446 Bug 1260655 - Drop some no-longer-needed code for setting up CSS animations using AnimationProperty objects; r=heycam
MozReview-Commit-ID: JDzvQIxlsX6
2016-03-30 13:01:20 +09:00
Brian Birtles 87d20ddd2f 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
2016-03-30 08:59:08 +09:00
Brian Birtles bdacb97d48 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
2016-03-30 08:59:08 +09:00
Brian Birtles 99a1a632e3 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
2016-03-30 08:59:08 +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
Daisuke Akatsuka 6c89bdf21b Bug 1248532 - Part 1: steps-start does not produce correct value at the beginning of the interval. r=birtles
MozReview-Commit-ID: F9b1HCfEqU6

--HG--
extra : transplant_source : %22xJ1%EBa%D6%7D%87%03%B84%2A5%CA9%93N%8A%16
2016-04-01 14:00:57 +09:00
Brian Birtles 81c73a9b4b Bug 1245748 - Use Keyframe-based utility functions when constructing KeyframeEffect(ReadOnly); r=heycam
MozReview-Commit-ID: 72vLatkFqMq

--HG--
extra : rebase_source : 5b40afe6e12b3bcb3a57ed294fc582bf7e40ba18
2016-03-22 16:35:53 +09:00
Brian Birtles 9ccb67c08b Bug 1245748 - Move keyframe handling code to a separate KeyframeUtils class; r=heycam
MozReview-Commit-ID: 2r27vCLcOhs

--HG--
extra : rebase_source : 6ba24ece944543e250728cf2b18370c277e746d0
2016-03-22 16:20:37 +09:00
Brian Birtles 84a59825cc Bug 1245748 - Update handling of 'composite' dictionary members to match changes to the spec; r=heycam, r=bz
Specifically, for the 'composite' member on keyframes, we now indicate "use the
composite value specified on the effect" using a missing/undefined 'composite'
member as opposed to a null value.

MozReview-Commit-ID: ZH45GvCTlP

--HG--
extra : rebase_source : 5acf081fb844f81280765a87ec019b7847ca1885
2016-03-22 16:18:22 +09:00
Brian Birtles e8806251b8 Bug 1245748 - Rename Keyframe-related IDL types to match changes to Web Animations spec; r=heycam, r=bz
In particular, the spec no longer has Keyframe and PropertyIndexedKeyframes
types but rather deals with objects. The algorithms for processing these
objects, however, define various Base* types:

  https://w3c.github.io/web-animations/#dictdef-basepropertyindexedkeyframe
  https://w3c.github.io/web-animations/#dictdef-basekeyframe
  https://w3c.github.io/web-animations/#dictdef-basecomputedkeyframe

MozReview-Commit-ID: 3RqoEO66kJ

--HG--
rename : dom/webidl/Keyframe.webidl => dom/webidl/BaseKeyframeTypes.webidl
extra : rebase_source : 35a586584934170c5427138a85d167258cb34993
2016-03-22 16:16:39 +09:00
Daisuke Akatsuka f479d03a6b Bug 1253470 - Part 4: Produce console warnings for invalid easing. r=birtles 2016-03-18 16:28:22 +09:00
Boris Chiou 956b429475 Bug 1249219 - Part 6: Support pseudo elements in Animation Mutation Observer. r=heycam
We use the parent element of a pseudo element as the subject to be notified.

Usage:
We record animations targeting to pseudo elements by setting subtree attribute
to true.

MutationObserver(Node, { subtree: ture });

So all the animations targeting to the pseudo elements whose parentElement is
the first argument will be recorded.

--HG--
extra : rebase_source : 3dc87802b65c74c3e5f2ed4504652ba14465fc02
2016-03-21 16:49:50 +08:00
Brian Birtles d13c3ccf41 Bug 1254419 - Throw if we fail to allocate memory for a values array in getProperties(); r=bz
MozReview-Commit-ID: BmDC51qWXcu

--HG--
extra : rebase_source : 77e7656dc92c834980a83eaeb18c3fc87de16e80
extra : histedit_source : 900c1c301e1fed8a8744244c6d8a14ee1b27e9b9
2016-03-17 12:47:14 +08:00
Brian Birtles 936358e5da Bug 1254419 - Make always-set members of AnimationProperty(Value)Details required; r=bz
At the same time we also make the 'warning' member of AnimationPropertyDetails
no longer nullable and simply use the absence of the member to indicate "no
warning" (which is what we were already doing -- we were never actually setting
it to null).

MozReview-Commit-ID: HdRDbqhCdmw

--HG--
extra : rebase_source : 0282bd9f0e213aa0e1ed1f5b25d58b10fb3dbc0b
extra : histedit_source : 7d1f81dc57e2a55ab0ed6c4919a25b87819d9d58
2016-03-17 10:13:50 +08:00
Brian Birtles 85fb62f571 Bug 1254419 - Fill in values sequence in getProperties(); r=heycam
MozReview-Commit-ID: 1qMmy14R4DG

--HG--
extra : rebase_source : 258cb800de10b29250efd9daa77c8ac95864a640
2016-03-15 21:42:14 +08:00
Brian Birtles eeca04ee3b Bug 1254419 - Return animation property information from getProperties() even if the property is overridden; r=hiro
I think the reason we originally didn't do this is that the
"isRunningOnCompositor" status might be misleading for animations that are
being overridden. That is, there are some animations we don't send to the
compositor because they are being overridden by another animation (e.g. a
CSS animation touching the 'transform' animation will cause a CSS transition
on the same property not to run, despite the fact that transitions apply
higher in the cascade). This is not merely a performance optimization but means
we don't have to do the cascade on the compositor.

In the future, once we introduce additive animation, we won't be able to handle
this so simply since it an animation will be able to be partially overridden.
Instead, consumers of this API will need to look at the 'composite' member of
the various animation values to see if an animation is being fully or partially
overridden.

As a result, this API really should return all running animations, even if they
are currently being overridden.

MozReview-Commit-ID: DwmbXdCqF32

--HG--
extra : rebase_source : 14e5412015b6c2c7ec6b7e105d414a89fc746c77
2016-03-13 19:22:35 +08:00
Brian Birtles 6dcebb234a Bug 1254419 - Rename getPropertyState() to getProperties(); r=heycam, r=bz
We are now extending this API to include more than just metadata about each
animated property but also the property values themselves.

Note that we can't use the name AnimationProperty for the dictionary since
we already use that name internally and [BinaryName] doesn't seem to apply to
dictionaries.

MozReview-Commit-ID: AcXeN4fsgTz

--HG--
extra : rebase_source : 714fdf85484775244daad6aaa288b1ec73ad6793
2016-03-13 19:10:10 +08:00
Brian Birtles 55ce436b8a Bug 1254419 - Move GetPropertyState alongside GetFrames; r=hiro
This better matches the order in the WebIDL and, once we rename
GetPropertyState to GetProperties it will make sense for GetFrames and
GetProperties to be side-by-side.

MozReview-Commit-ID: 67s9WGksPFv

--HG--
extra : rebase_source : f38ea60c0fec2f063126a0aa73422230189afbf5
2016-03-15 21:18:50 +08:00
Brian Birtles 9f1ba68aef Bug 1254419 - Fix zero-length segment handling; r=heycam
Later in this patch series when we convert tests from web-platform tests to
mochitest-chrome tests, some of the test cases that use zero-length segments
(overlapping keyframes at certain offsets) would trigger failed assertions
in KeyframeEffectReadOnly::ComposeStyle. This is because this method was
originally written with CSS animations in mind where segments cannot be
zero-length. Furthermore, when these same tests cases are run as
web-platform-tests, the failed assertions are not visible.

This patch adjusts the handling of segments to allow zero-length segments and
adds a test to check that the handling matches that defined in Web Animations
which is summarized in the following informative note,

  "this procedure permits overlapping keyframes. The behavior is that at the
  point of overlap the output value jumps to the value of the last defined
  keyframe at that offset. For overlapping frames at 0 or 1, the output value
  for iteration progress values less than 0 or greater than or equal to 1 is the
  value of the first keyframe or the last keyframe in keyframes
  respectively."[1]

[1] https://w3c.github.io/web-animations/#the-effect-value-of-a-keyframe-animation-effect

MozReview-Commit-ID: JdyYbGZtbot

--HG--
extra : rebase_source : 00502ec8aec423196376e29bf4b70ef0ff178e29
2016-03-15 21:13:46 +08:00
Hiroyuki Ikezoe 45a7f9a679 Bug 1218620 - Allow opacity animation running on compositor even if the frame has any restricted transforms. r=birtles
The type name has been changed and re-ordered.

MozReview-Commit-ID: 78jrJ6a9Pro

--HG--
extra : rebase_source : f47e6bf27d8e48d10b3af123308c2ab89e71d8e1
2016-03-14 09:07:48 +09:00
Brian Birtles 107642839f Bug 1246320 part 5 - Simplify KeyframeEffect(ReadOnly) Constructor overloads further; r=hiro
As well as generally simplifying the different KeyframeEffect(ReadOnly)
constructor methods, this patch also means we will use the realm document for
parsing timing functions in all cases. Although this currently doesn't have
any impact (the current set of timing functions are expected to be parsed
identically regardless of the document used) it may become significant if, in
future, it becomes possible to register hooks with certain documents for
parsing CSS properties as part of the houdini efforts.

MozReview-Commit-ID: 4gAZi1G1uAD

--HG--
extra : rebase_source : f619592a02ddcbe56835344ec1fb3023219cd2d3
2016-03-12 22:14:10 +09:00
Brian Birtles 6846d9e23b Bug 1246320 part 4 - Pass a document to TimingParams; r=hiro
MozReview-Commit-ID: 9Sh8eWHdDD6

--HG--
extra : rebase_source : 2dc0da7076b8acaaca257583f3780266ae62b430
2016-03-11 17:27:34 +09:00
Brian Birtles 036f647012 Bug 1246320 part 3 - Rework KeyframeEffect(ReadOnly) constructor helpers; r=hiro
Once we update TimingParams to take a document, we will need to get an
appropriate document within the various constructor methods. This complicates
these methods and suggests they should be pushed into the .cpp file where
we can hide the complexity more easily and templatize the type of the options
argument so that we can share the document-fetching code.

By moving all uses of the declared template methods to the .cpp file we
can drop the explicit instantiations.

(We still need to declare the templated methods in the header file since
these methods need to be protected methods of KeyframeEffectReadOnly in
order to construct a KeyframeEffectReadOnly since its constructor is
protected.)

MozReview-Commit-ID: 8KrCWrWIb7X

--HG--
extra : rebase_source : c5b550b271cc68ceeb60a25243268a17b3ab7f65
2016-03-11 17:27:16 +09:00
Brian Birtles 3edb5638a1 Bug 1246320 part 2 - Pass document to ParseEasing; r=hiro
MozReview-Commit-ID: KWW53htO0Jj

--HG--
extra : rebase_source : 85aaa0a66cae7623fa06ebf31e0b8481ee05bbde
2016-03-11 17:21:03 +09:00
Daisuke Akatsuka 2d2c72ccbf Bug 1237173 - Part3: Throw TypeError if duration is NaN, negative value or not 'auto' string. r=birtles, r=smaug 2016-03-09 14:01:45 +09:00
Daisuke Akatsuka cb51780a6e Bug 1237173 - Part2: Change type of duration to Maybe<StickyTimeDuration>. r=birtles 2016-03-09 14:14:20 +09:00