Commit Graph

26766 Commits

Author SHA1 Message Date
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
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
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
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
James Graham
94f282388b Bug 1181521 - Reformat runreftest.py according to PEP8 rules, r=Ms2ger,jmaher 2015-07-08 11:58:56 +01:00
Benoit Girard
7bb9c7cdd7 Bug 1103106 - Change will-change to be first-come, first-served. r=roc 2015-07-06 16:32:53 -04:00
Julien Pagès
6a595c1c90 Bug 1091274 - Move leak log functions out of automationutils and into mozbase. r=jgriffin 2015-07-03 07:04:22 +02:00
Cameron McCormack
46d4c64434 Bug 1177563 - Test that we share agent rule processors across different documents. r=dbaron 2015-07-08 15:57:31 +10:00
Jonathan Kew
311e472d52 Bug 1177690 - part 3 - Reftests for bevelled corners on collapsed table border. r=dholbert 2015-07-08 09:07:52 +01:00
Jonathan Kew
79183edc5e Bug 1177690 - part 2 - Tidy up the use of DrawTableBorderSegment similarly in BCInlineDirSeg::Paint. r=dholbert 2015-07-08 09:07:52 +01:00
Jonathan Kew
d18a5a493c Bug 1177690 - part 1 - Bevel the correct ends of horizontal collapsed-border segments in vertical-rl writing mode. r=dholbert 2015-07-08 09:07:52 +01:00
Jonathan Kew
ed3b1406cb Bug 1177690 - part 0 - Tidy up some erratic whitespace. r=dholbert 2015-07-08 09:07:52 +01:00
Carsten "Tomcat" Book
8c7c890ce6 Backed out changeset 42e80a07acd6 (bug 1177563) for bustage on a CLOSED TREE 2015-07-08 09:44:16 +02:00
Karl Tomlinson
b381002885 Bug 888164 - additional logging to debug bug 888164. r=karlt 2015-07-08 14:39:48 +12:00
Cameron McCormack
798468ef97 Bug 1163257 - Only fail test_bug1160724.xul if we get a console warning about parsing 'transform'. r=dbaron 2015-07-08 16:53:45 +10:00
Cameron McCormack
1d79225991 Bug 1099448 - Don't accept box properties with invalid calc() or rgb() etc. function values. r=dbaron 2015-07-08 16:28:03 +10:00
Cameron McCormack
383dc1b8dc Bug 1177563 - Test that we share agent rule processors across different documents. r=dbaron 2015-07-08 15:57:31 +10:00
Nicholas Nethercote
24ab7bcdca Bug 1179071 - Merge RemovingIterator into Iterator. r=froydnj.
The original motivation for the Iterator/RemovingIterator split was that
PLDHashTable Checker class would treat them differently. But that didn't end up
happening (see bug 1131308). So this patch merges them. This is a small code
size win now but it will become bigger when I add iterators to nsTHashTable and
nsBaseHashtable.

The only complication is that PLDHashTable::Iter() is now non-const, which is
a problem if you use it in a const method. So I added PLDHashTable::ConstIter()
which is used in just two places. It's a bit of a hack -- effectively a
const_cast -- but I don't think it's too bad.
2015-07-06 22:02:26 -07:00
Cameron McCormack
51862d3a81 Bug 1118103 - Swap the aliasing direction of -moz-margin-start <-> margin-inline-start etc. r=dbaron 2015-07-03 12:22:56 +10:00
Markus Stange
f93bc01b67 Bug 1178382 - Ignore overflow: -moz-hidden-unscrollable on <select size=n> listboxes. r=roc
forms.css sets overflow: -moz-hidden-unscrollable on all select elements.
ApplyOverflowClipping in nsFrame.cpp applies overflow clips that are not managed by scroll frames.
nsCSSFrameConstructor::ConstructSelectFrame creates an nsListControlFrame for listbox select elements.
nsListControlFrame is an nsHTMLScrollFrame.
As a result, the clip as applied twice - once by the nsHTMLScrollFrame, and then again by ApplyOverflowClipping.
Adding an exception for nsListControlFrame to ShouldApplyOverflowClipping gets rid of the double clip.
But we still need to apply the clip when calculating the frame's visual overflow rect, so we add the
list box frame type to the list of special-cased frames in UnionBorderBoxes.
2015-07-06 17:57:37 -04:00
Seth Fowler
8441769275 Bug 1177587 - Detect use of <img> elements for animation and use sync decoding to reduce flicker. r=tn 2015-07-07 14:00:08 -07:00
Timothy Nikkel
7f5c3e114a Bug 1114526. Add reftest. 2015-07-07 13:22:29 -05:00
Ryan VanderMeulen
18afe1cb5f Merge m-c to inbound. a=merge
CLOSED TREE
2015-07-07 13:38:10 -04:00
Ryan VanderMeulen
c076b1148d Merge b2g-inbound to m-c. a=merge 2015-07-07 13:25:39 -04:00
Hiroyuki Ikezoe
a98fa02cfd Bug 1175751 - Apply playback rate to compositor animations. r=bbirtles 2015-07-06 19:05:00 +02:00
Cervantes Yu
d0d380cd18 Bug 1180644: Fix crashes after enabling OOP on B2GDroid. r=snorp 2015-07-06 19:18:20 +08:00
Brian Birtles
1d1182f1ae Bug 1179111 part 5 - Remove Name() methods; r=jwatt 2015-07-01 15:19:04 +09:00
Brian Birtles
cf01e3a000 Bug 1179111 part 2 - Implement CSSTransition.transitionProperty; r=smaug, r=jwatt 2015-07-01 12:27:48 +09:00
Brian Birtles
895e49d97e Bug 1179111 part 1 - Implement CSSAnimation.animationName; r=smaug, r=jwatt 2015-07-01 12:15:42 +09:00
Brian Birtles
a02c9643ee Bug 1178186 part 1 - Add CSSAnimation and CSSTransition interfaces; r=smaug 2015-06-30 10:00:39 +09:00
Timothy Nikkel
25c21aef08 Bug 1114526 - Make sure that CSS image invalidation also notifies rendering observers even if the image isn't visible (because the rendering observers might be visible). r=mattwoodrow
There is no retained rendering data for non-visible images, so FrameLayerBuilder::IterateRetainedData never calls it's callback, the callback is the only thing that calls nsSVGEffects::InvalidateDirectRenderingObservers. We need to call nsSVGEffects::InvalidateDirectRenderingObservers always.
2015-06-25 13:46:00 -04:00
Simon Montagu
005f7b5300 Bug 1180178: Add writing-mode and logical coordinates to frame dumps, r=jfkthame 2015-07-07 06:37:30 -07:00
Jonathan Kew
9f0e1498d2 Bug 1181087 - part 2 - Remove the unused physical setter methods on logical-coordinate classes. r=smontagu 2015-07-07 14:20:09 +01:00
Jonathan Kew
4ece5459c1 Bug 1181087 - part 1 - Eliminate the few callers of physical-coordinate setters on the logical-coordinate geometry classes. r=smontagu 2015-07-07 14:20:09 +01:00
Jonathan Kew
30c31276d6 Bug 1180643 - Fix the SetY() method on LogicalPoint to update the correct field. r=smontagu 2015-07-07 14:20:09 +01:00
Carsten "Tomcat" Book
addd366430 Backed out changeset 1e1ccffd51b8 (bug 1178186) for suspicion of causing bc2 test failures on OSX browser_bug427559.js 2015-07-07 14:22:33 +02:00
Carsten "Tomcat" Book
bb60977948 Backed out changeset 144276fd40a1 (bug 1179111) 2015-07-07 14:21:46 +02:00
Carsten "Tomcat" Book
6799a719d6 Backed out changeset 4eb184faf92c (bug 1179111) 2015-07-07 14:21:42 +02:00