Commit Graph

5260 Commits

Author SHA1 Message Date
Masatoshi Kimura
eed4479c2c Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Cameron McCormack
2bdad13a2e Bug 1182964 - Replace use of nsTHashtable::EnumerateEntries with nsTHashtable::Iterator in layout/{style,svg}/. r=njn 2015-07-14 10:13:32 +10:00
Birunthan Mohanathas
e52329c788 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Birunthan Mohanathas
05bb4139e0 Bug 1167418 - Check AppendElement call in MediaQueryList. r=heycam
This preemptively silences an unused result warning.
2015-07-12 23:19:12 -07:00
Birunthan Mohanathas
e8f9af4d5d Bug 1167418 - Use nsTArray instead of FallibleTArray in MediaQueryList. r=heycam
We already use the mozilla::fallible parameter when we want fallibility so
this doesn't actually change anything.
2015-07-12 23:19:12 -07:00
Geoff Brown
495b7cbfe1 Bug 1026290 - Update mochitest-chrome manifests for android; r=jgriffin 2015-07-10 14:41:59 -06:00
Hiroyuki Ikezoe
59df058305 Bug 1181905 - Animation::IsPlaying should check playbackRate != 0 to stop playing on compositor animation. r=bbirtles 2015-07-09 20:54:00 +02:00
Wilmer Paulino
0dfa67cac6 Bug 1081362 - Change nsStyleBasicShape pointer to an nsRefPtr, to avoid leak in unexpected case. r=dholbert 2015-07-09 10:56:31 -04:00
Masatoshi Kimura
af0110bbd1 Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Brian Birtles
12879b1348 Bug 1150810 part 7 - Add Animation::SetTimeline; r=jwatt 2015-04-28 17:21:58 +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
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
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
Carsten "Tomcat" Book
8c7c890ce6 Backed out changeset 42e80a07acd6 (bug 1177563) for bustage on a CLOSED TREE 2015-07-08 09:44:16 +02: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
Ryan VanderMeulen
18afe1cb5f Merge m-c to inbound. a=merge
CLOSED TREE
2015-07-07 13:38:10 -04:00
Hiroyuki Ikezoe
a98fa02cfd Bug 1175751 - Apply playback rate to compositor animations. r=bbirtles 2015-07-06 19:05:00 +02: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
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
Carsten "Tomcat" Book
a6970a6f1a Backed out changeset 22cafa2fd162 (bug 1179111) 2015-07-07 14:21:33 +02:00
Emanuel Hoogeveen
31c0c961cd Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Cameron McCormack
0731f8ce65 Bug 1179675 - Make FontFaceSet.cpp compile as part of UNIFIED_SOURCES. r=jdaggett 2015-07-02 00:45:00 +02:00
Brian Birtles
b37a7e8f43 Bug 1179111 part 5 - Remove Name() methods; r=jwatt 2015-07-01 15:19:04 +09:00
Brian Birtles
81eb6fc9be Bug 1179111 part 2 - Implement CSSTransition.transitionProperty; r=smaug, r=jwatt 2015-07-01 12:27:48 +09:00
Brian Birtles
1724363311 Bug 1179111 part 1 - Implement CSSAnimation.animationName; r=smaug, r=jwatt 2015-07-01 12:15:42 +09:00
Brian Birtles
9addf1c96b Bug 1178186 part 1 - Add CSSAnimation and CSSTransition interfaces; r=smaug 2015-06-30 10:00:39 +09:00
Cameron McCormack
d0f46ef66b Bug 1180083 - Avoid shadowing info() in test_property_database.html. r=dbaron 2015-07-07 09:50:53 +10:00
Jonathan Kew
69e22e37f0 Bug 1177076 patch 3 - Change the initial value of 'caption-side' from 'top' (physical) to 'block-start' (logical). r=heycam 2015-07-03 11:37:44 +01:00
Jonathan Kew
56a16aa2e5 Bug 1177076 patch 1 - Add logical values for the caption-side property (though not yet handled by layout code). r=heycam 2015-07-03 11:37:25 +01:00