Commit Graph

251990 Commits

Author SHA1 Message Date
Andrea Marchesini
7df0c76d82 Bug 1181595 - Improve null checks in MessagePort::RemoveDocFromBFCache, r=smaug 2015-07-09 01:34:37 +01:00
Ted Mielczarek
8c993ef449 bug 890026 - Add mozcrash.kill_and_get_minidump r=jimm 2013-07-31 10:41:33 -04:00
Chris Manchester
03bff54a5c Bug 1181732 - Fix invocations of gen_test_packages_manifest.py to create destination directory before attempting to write output file. r=glandium 2015-07-08 13:51:32 -07:00
Brian Birtles
df99d6e31d Bug 1150810 part 16 - Add tests for AnimationTimeline.getAnimations(); r=jwatt 2015-06-15 11:05:43 +09:00
Brian Birtles
728332e869 Bug 1150810 part 15 - Add a comment about need to store more than just relevant animations; r=jwatt
We'll likely address this as part of bug 1151731 when we sample animations from
their timeline.
2015-06-15 11:05:43 +09:00
Brian Birtles
b3b286bc91 Bug 1150810 part 14 - Don't return animations targetting pseudo-elements; r=jwatt 2015-06-15 11:05:43 +09:00
Brian Birtles
8e773aba10 Bug 1150810 part 13 - Sort the result of AnimationTimeline::GetAnimations; r=jwatt 2015-06-15 11:05:43 +09:00
Brian Birtles
1044b8c708 Bug 1150810 part 12 - Flush styles in AnimationTimeline::GetAnimations(); r=jwatt 2015-06-15 11:05:43 +09:00
Brian Birtles
b6e612666f Bug 1150810 part 11 - Add some assertions to AnimationTimeline::GetAnimations; r=jwatt 2015-06-15 11:05:43 +09:00
Brian Birtles
f967d3dad9 Bug 1150810 part 10 - Add AnimationTimeline::GetAnimations; r=jwatt; r=smaug
This patch also removes the (commented-out) play() method from the
AnimationTimeline.webidl since it has been removed from the spec.
2015-06-15 11:05:43 +09:00
Brian Birtles
b28f292a64 Bug 1150810 part 9 - Add relevant animations to timeline; r=jwatt
We only store relevant animations on the timeline. Relevant animations are
any animations that are running or yet to run ("current animations") or
which have finished but are still applying a fill mode ("in effect animations").

AnimationTimeline.getAnimations() only ever returns relevant animations so
this is the minimum set we need to keep track of. Keeping track of any more
than this would prevent us from garbage-collecting any no longer relevant
animations since we keep a strong reference to this animations.

The reason we keep a strong reference is that if an animation is attached to
a timeline, even if there are no references to it from script or markup it
needs to be kept alive in order to dispatch events or resolve promises. An
irrelevant animation however is not going to do either of these things without
outside intervention so we don't need to keep it alive.
2015-06-15 11:05:43 +09:00
Brian Birtles
986793f780 Bug 1150810 part 8 - Add AnimationTimeline::AddAnimations/RemoveAnimations; r=jwatt 2015-04-28 16:41:09 +09:00
Brian Birtles
12879b1348 Bug 1150810 part 7 - Add Animation::SetTimeline; r=jwatt 2015-04-28 17:21:58 +09:00
Brian Birtles
ad5ac012b2 Bug 1150810 part 6 - Rename Timeline() to GetTimeline(); r=smaug
This is in anticipation of adding Animation::SetTimeline(). Once we set the
timeline out of band, there's a chance that getting it could return null so
this patch makes the WebIDL and method name reflect that.
2015-04-28 16:25:07 +09:00
Brian Birtles
d3efa42100 Bug 1150810 part 5 - Handle Timeline() returning null; r=jwatt 2015-04-28 12:49:12 +09:00
Brian Birtles
cd630f438e Bug 1150810 part 4 - Store global on Animation; r=smaug, jwatt
The connection between an Animation and an AnimationTimeline is optional. That
is, it is possible to have an Animation without an AnimationTimeline. Until now
we have often just assumed the timeline will be set but eventually we need to
support the possibility of the timeline being null. Indeed, later in this patch
series we will set the timeline out-of-band (i.e. not in the constructor) using
SetTimeline which opens up the possibility that timeline will be null for
a period of time.

This patch paves the way for having an optional timeline by storing the global
used for, e.g. creating promises, on the Animation object itself.
2015-04-28 15:48:35 +09:00
Brian Birtles
70ca5ce014 Bug 1150810 part 3 - Make IsPossiblyOrphanedPendingAnimation return true when there is no rendered doc; r=jwatt
This appears to be an existing bug.
2015-04-28 15:47:45 +09:00
Brian Birtles
128bbb53ef Bug 1150810 part 2 - Replace references to DocumentTimeline with AnimationTimeline; r=jwatt
This is needed not only for supporting other kinds of timelines, but also for
when we come to implement SetTimeline(AnimationTimeline* aTimeline).
2015-04-28 11:29:13 +09:00
Brian Birtles
3b62eec6f6 Bug 1150810 part 1 - Move DocumentTimeline methods up to AnimationTimeline; r=jwatt
This is not strictly necessary yet but we will want to implement methods
like GetAnimations() on the base class, AnimationTimeline, so we may as well do
that now rather than adding that code to DocumentTimeline and moving it later.
2015-04-28 11:17:10 +09:00
Brian Birtles
c4f8b27475 Bug 1171817 part 16 - Always cancel transitions before removing them; r=dbaron
Earlier in this patch series we added an assertion to the destructor for
CSSAnimation and CSSTransition to check that the owning element has been
cleared when the animation is destroyed.

This assertion fails, however, for transitions because there are a two
code paths where a transition may be destroyed without being cancelled.
This patch adjusts those two code paths to ensure transitions are always
cancelled before being destroyed.
2015-07-09 08:05:16 +09:00
Brian Birtles
7d4395728f Bug 1171817 part 15 - Factor out common code for comparing owning elements into a separate class; r=dbaron 2015-06-09 11:13:54 +09:00
Brian Birtles
a44ee78b26 Bug 1171817 part 14 - Add AnimationPtrComparator class; r=dbaron
Having created composite ordering methods for the different kinds of animations
this patch adds a Comparator class so that they can be used to sort an
array of such animations.

This patch uses this Comparator object to sort the results returned by
Element.getAnimations. For this case, the order in which we create animations
and transitions happens to almost perfectly correspond with the composite
ordering defined so that no sorting is necessary.

One exception is that some -moz-* transitions may be created after transitions
that they should sort before when sorting by transition property. In this
case the sorting added in this patch should ensure they are returned in the
correct sequence.

Unfortunately, we can't easily test this since the test files we have are
intended to be cross-browser (where -moz-* properties won't be supported).

Once we implement AnimationTimeline.getAnimations (bug 1150810) we'll have
a better opportunity to test this sorting. For now, the added tests in this
patch just serve as a regression test that the sorting hasn't upset the
already correct order (and an interop test in future once we move them to
web-platform-tests).
2015-06-09 11:13:54 +09:00
Brian Birtles
fd2b3e028b Bug 1171817 part 13 - Add override of HasLowerCompositeOrderThan for CSS transitions; r=dbaron
This patch is quite similar to the code added for CSS animations. We'll factor
out some the common code in a subsequent patch in this series.
2015-06-09 11:13:54 +09:00
Brian Birtles
35fb376dab Bug 1171817 part 11 - Add CSSTransition::TransitionProperty(); r=dbaron
This patch adds a convenience method for getting the transition property for
a CSS transition (so we can use this when ordering CSS transitions).

We already have ElementPropertyTransition::TransitionProperty() so this might
seem to be redundant, however we add this now because:

* In the proposed CSS Transitions <-> Web Animations integration, the
  CSSTransition interface has a transitionProperty member so we'll need this
  function for that.
* Once we allow script to modify the transition, we'll need to track the
  original transition property for sorting purposes which is what this method
  should do.
* We'll possibly drop ElementPropertyTransition::TransitionProperty() in the
  future.
2015-06-09 11:13:54 +09:00
Brian Birtles
beb2db121a Bug 1171817 part 10 - Override sequence numbers for transitions; r=dbaron
Similar to the earlier patch in this series that changed the sequence number
handling for animations, this patch re-uses Animation::mSequenceNum to store
the animation generation number when each transition was generated. When the
transition is cancelled it reverts to using the default animation composite
ordering.
2015-06-09 11:13:54 +09:00
Brian Birtles
83a5e09a6a Bug 1171817 part 9 - Add override of HasLowerCompositeOrderThan for CSS animations; r=dbaron
This patch also extends the tests for Element.getAnimations(). It doesn't
actually exercise the code added (it's not actually called yet since it doesn't
need to be for Element.getAnimations) but simply provides a useful regression
and interop test.
2015-06-09 11:13:54 +09:00
Brian Birtles
0e6a90b51b Bug 1171817 part 8 - Override sequence numbers for CSS animations; r=dbaron
This patch re-uses Animation::mSequenceNum to store the index of CSS animations
within their corresponding animation-name property. When the animation is
removed from an animation-name property it reverts to using the default
animation composite order.

This patch also updates Animation::DoCancel to call UpdateTiming instead of
UpdateEffect. This is because UpdateTiming is responsible for updating the
sequence number (when custom composite order is not in effect). When we remove
an animation from animation-name it will be cancelled and at that point we
expect its sequence number to be cleared which will only happen if
UpdateTiming gets called.
2015-06-09 11:13:54 +09:00
Brian Birtles
e1086a0caf Bug 1171817 part 7 - Add Animation::IsUsingCustomCompositeOrder; r=dbaron
Add a virtual method we can use to determine when an animation is having its
sequence number set by some other mechanism than the general logic
defined for animations.

This allows CSS animations and transitions to re-use the sequence number for
their own purposes. Typically what will happen is something like this:

1. A CSSAnimation is created corresponding to an item in the animation-name
   property.

   At this point CSSAnimation::IsUsingCustomCompositeOrder() will return true
   and nsAnimationManager will set the sequence number based on the position of
   the animation in animation-name.

2. If at a later point the animation is removed from the animation-name but kept
   alive by script, CSSAnimation::CancelFromStyle will be called which will
   clear the custom sequence number (i.e. set it to kUnsequenced) and also
   update the CSSAnimation's state such as
   CSSAnimation::IsUsingCustomCompositeOrder() returns false.

3. Then, then the CSSAnimation next transitions out of the idle state it will
   have its sequence number set just like any other Animation and be ordered
   like any other Animation (since we can no longer use animation-name to
   determine its composite order).

This behavior is added in subsequent patches in this series (and likewise for
CSS transitions too).
2015-06-09 11:13:54 +09:00
Brian Birtles
140b2f4296 Bug 1171817 part 6 - Add Animation::HasLowerCompositeOrderThan; r=dbaron
This patch introduces a method that will be used for sorting animations based on
their composite order. The method is based on the API for Comparator objects (as
used by nsTArray and co.) which have a LessThan method. (For the
Comparator::Equals method we can used pointer equality since no two independent
objects should have equal composite order.)
2015-06-09 11:13:53 +09:00
Brian Birtles
fc17420134 Bug 1171817 part 5 - Add a sequence number member to Animations; r=dbaron
Web Animations defines Animations as having a globally unique sequence number
for the purpose of prioritization:

  http://w3c.github.io/web-animations/#animation-sequence-number

As of the writing of this patch, the spec says the sequence number is updated
when the Animation is created. This is problematic and I have proposed that
actually this should be updated from each transition from idle:

  https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0054.html

This doesn't seem to have met any opposition so I will update the spec to
reflect this soon.

This patch implements the behavior of updating the sequence number on each
transition from idle.

To make sure we perform this on each change to timing this patch removes
a couple of instances of early returns to ensure that UpdateTiming is called.

The current maximum sequence number is simply a class static and we make no
attempt to deal with wraparound. This is because we only update this number when
an animation transitions from idle which only happens when an animation is
created or script calls cancel() followed by play() on the animation. Supposing
that across all content this happenned an unlikely 1 billion times a second we
still wouldn't exhaust the range of the unsigned 64-bit int for about 585 years.

We'd like to make kUnsequenced be zero and make the static represent the
current maximum. This would probably be easier to understand and recognize in
a debugger. However, later in this patch series we will make CSS animations and
CSS transitions override this sequencing behavior. If we define kUnsequenced
to be zero and they accidentally assign zero as an actual sequence number then
they'll run into trouble. To avoid that we set kUnsequenced to UINT64_MAX.
2015-06-09 11:13:53 +09:00
Brian Birtles
cbc7cf29d2 Bug 1171817 part 4 - Add const version of AsCSSAnimation/AsCSSTransition methods; r=dbaron
These will be needed for sorting animations and transitions in a const-correct
fashion.
2015-06-09 11:13:53 +09:00
Brian Birtles
e47eb5cc93 Bug 1171817 part 3 - Add CSSTransition::GetOwningElement; r=dbaron
This patch applies the same treatment to CSS transitions that we applied to CSS
animations in the previous patch in this series.
2015-06-09 11:13:53 +09:00
Brian Birtles
0aad11786e Bug 1171817 part 2 - Add CSSAnimation::GetOwningElement; r=dbaron
In order to sort CSS animation objects correctly, we need to know which
element's animation-name property they appear in, if any. Normally that's
simply the target element of the animation's keyframe effect but it can differ
in the following cases:

1) When script modifies a CSSAnimation's effect to target a different element
   (or simply removes the effect altogether). In this case we use the
   *owning* element to determine the priority of the animation, not the target
   element.

   This scenario does not yet occur (bug 1049975).

2) When script creates a CSSAnimation object using the CSSAnimation constructor.
   In this case, the owning element should be empty (null) and we should
   determine the priority of the animation in the same way as any other
   Animation object.

   Again, this is not yet supported (or even specced) but will be eventually.

3) When script holds a reference to a CSSAnimation object but then updates the
   animation-name property such that the animation object is cancelled. In this
   case the owning element should be cleared (null) so we know to not to try and
   sort this with regard to any animation-name property.

   This is possible using code such as the following:

     elem.style.animation = 'a 5s';
     var a = elem.getAnimations()[0];
     elem.style.animation = 'b 5s';
     a.play(); // Bring a back to life
     document.timeline.getAnimations();
     // ^ At this point we need to know how to sort 'a' and 'b' which depends
     // on recognizing that a is no longer part of an animation-name list.

Until we implement bug 1049975, we could support sorting animations without
adding the reference to the owning element by setting a flag on the CSSAnimation
object but (having tried this) it turns out to be cleaner to just introduce this
reference now, particularly since we know we will need it later.

Note that we will also need this information in future to dispatch events to the
correct element in circumstances such as (1) once we separate updating timing
information (including events) from applying animation values.
2015-06-09 11:13:53 +09:00
Brian Birtles
8bc8dcf737 Bug 1171817 part 1 - Cancel animations when destroying the property holding them; r=dbaron
Prior to this patch we cancel animations in AnimationCollection::Destroy but
this is not called automatically when the property holding the collection is
destroyed via its destructor. When an element is unbound from the tree we
destroy its animation properties but don't call AnimationCollection::Destroy.
This means, that in such circumstances:

* We won't create animation mutation records for the removed animations
* Once we start registering animations with a timeline they won't have a
  chance to remove themselves from the timeline (meaning
  document.timeline.getAnimations()) will keep returning them
* Once we go to implement the animationcancel and transitioncancel events we
  won't fire them in this case (assuming we implement the queueing/dispatch of
  those events as part of the cancel code)

This patch addresses this by moving the call to cancel each animations to the
property destructor for the animation properties.

We do this first so we can land this change separately to ease bisecting any
regressions it might trigger.
2015-06-09 11:13:53 +09:00
Ehsan Akhgari
31f9459d09 Bug 1180765 - Bump the caches.sqlite version numbers because of the field that was added in bug 1169044; r=jdm 2015-07-08 19:35:29 -04:00
Chris Pearce
d6791892a2 Bug 1180563 - Add pref to delay play of <video>s until they're visible. r=kinetik 2015-07-09 11:10:16 +12:00
Seth Fowler
b06a873fb7 Bug 1180931 (Part 2) - Allow sync size decoding for transient (i.e. multipart) images. r=tn 2015-07-08 15:52:58 -07:00
Seth Fowler
56fb1f882b Bug 1180931 (Part 1) - Allow sync size decoding for single core devices. r=tn 2015-07-08 15:52:51 -07:00
Jeff Walden
aae494716d Bug 1169639 - Make intrinsicsHolder-accesses fallible, now that it's possible to access it without having previously gone through intrinsics-object creation code to ensure its existence. r=shu 2015-06-08 10:55:53 -07:00
Xidorn Quan
75d45d1b36 Bug 1170369 - Enable tests of Fullscreen API and PointerLock API on Windows XP and OS X 10.6+. r=RyanVM 2015-07-09 08:00:33 +10:00
Xidorn Quan
ee2b9ffbaa Bug 1181413 - Use enum to distinguish fullscreen request for Fullscreen Mode and Fullscreen API. r=smaug 2015-07-09 08:00:33 +10:00
Xidorn Quan
ef224aefc6 Bug 1181395 - Avoid runtime conversion or copy of names of window classes on Windows. r=jimm 2015-07-09 08:00:33 +10:00
Julian Seward
f12b593edc Bug 1137169 - Uninitialised value uses related to mozilla::dom::WebAudioUtils::SpeexResamplerProcess. r=rjesup. 2015-07-08 20:11:52 +02:00
Martin Thomson
68c1665b4f Bug 1181262 - Disabling more code under --disable-webrtc, r=dholbert,bwc 2015-07-08 12:27:45 -07:00
George Wright
cc1040a111 Bug 1106527 - Increase the tab timeout for showing the spinner to 400ms and make the spinner smaller to conform to UX's new requirements r=mconley 2015-07-06 17:59:57 -04:00
James Graham
94f282388b Bug 1181521 - Reformat runreftest.py according to PEP8 rules, r=Ms2ger,jmaher 2015-07-08 11:58:56 +01:00
Josh Matthews
89d8021421 Bug 1176542 - Trace the window object in the TCPSocket child proxy. r=mccr8 2015-07-08 16:06:33 -04:00
Mason Chang
5d523b88d8 Bug 1178823. Part 2 - Load sanity test in remote XUL browser. r=mconley 2015-07-08 13:00:17 -07:00
Mason Chang
c23d963bf3 Bug 1178823. Part 1 - Test layers and video rendering. r=dvander 2015-07-08 13:00:17 -07:00
Ben Kelly
072b2e3199 Bug 1181259 Remove stray debugging printf from Cache API. r=froydnj 2015-07-08 12:55:36 -07:00