Commit Graph

5274 Commits

Author SHA1 Message Date
Cameron McCormack
d8b0ee0385 Bug 1181011 - Don't use cached rule node structs for animations within pseudo-elements. r=dbaron a=abillings 2015-07-27 16:43:44 +10:00
Masatoshi Kimura
1e289c54a6 Bug 1186636 - Add a pref to configure -moz prefixed gradients support. r=dholbert 2015-07-24 20:29:52 +09:00
Robert O'Callahan
894a923eda Bug 1172239. Use nsChangeHint_UpdateComputedBSize to only dirty intrinsic sizes when necessary. r=bz 2015-07-22 16:36:56 +12:00
Robert O'Callahan
9a9976f3d7 Bug 1172239. Make vertically-resizing scrollframes reflow their percent-height descendants if necessary, and remove nsChangeHint_NeedDirtyReflow for height changes. r=bz 2015-07-17 17:08:54 +12:00
Robert O'Callahan
9b33bc4826 Bug 1172239. Expand height change hint to its components. r=heycam 2015-07-17 15:21:29 +12:00
Kearwood (Kip) Gilbert
3f9b5c0c0f Bug 1181240 - Part 2: Replace gfx3DMatrix with Matrix4x4 in layout,r=vlad
- Refactored code to use Matrix4x4 instead of gfx3DMatrix.
- There is not expected to be any functional effect.
2015-07-10 17:05:47 -07:00
L. David Baron
04d8979d9f Bug 1186061 patch 2 - Disable compositor thread animation of transforms when backface-visibility is hidden. r=mattwoodrow
We don't currently have a mechanism for rerendering when the front/back
flips, so we should disable running such animations on the compositor
thread for now until we do.

Bug 1186204 covers reenabling.

The reftest fails without the patch (showing a blue almost-square
rectangle), and passes with the patch.

The use of reftest-no-flush (added in patch 1) is needed to achieve the
failure without the patch, because the flushWindow() function in
reftest-content.js calls getBoundingClientRect() to flush rendering,
which has the side-effect of flushing style updates that have been
suppressed on the main thread while we're running an animation off the
main thread, which in turn covers up the bug.
2015-07-22 08:58:42 -07:00
Ryan VanderMeulen
128ea1e1b0 No bug - Cleanup the layout/style mochitest manifest. 2015-07-21 23:52:48 -04:00
Ryan VanderMeulen
a856332d59 Bug 1186224 - Disable various layout mochitests on B2G debug for hitting frequent fatal mochitest hangs. r=dholbert 2015-07-21 23:52:48 -04:00
Ryan VanderMeulen
89d6adf8ba Bug 1186219 - Skip the test_value* tests on B2G opt as well due to causing memory explosions that often lead to timeouts. r=dholbert 2015-07-21 23:52:48 -04:00
L. David Baron
02fb72edc7 Bug 1184452 - Correctly reject @font-face descriptors that have garbage after them. r=heycam
I confirmed that the patch fixes the original testcase (attachment
8634600).  I also confirmed that with the whole patch,
layout/style/test/test_descriptor_syntax_errors.html passes, but with
the new tests but not the code change, it reports 12 failures.
2015-07-21 07:55:42 -07:00
Seth Fowler
ba9ca914cb Bug 1151359 (Part 3) - Treat nsImageFrames subject to scale animation as having an identity scale when predicting size. r=tn,birtles 2015-07-19 19:30:40 -07:00
Gijs Kruitbosch
0eaec3a78a Bug 452800 - use ThreeDLightShadow for borders instead of ThreeDFace or ButtonFace, r=bz 2015-07-16 16:11:09 +01:00
Cameron McCormack
dc6459f9c5 Bug 1183484 - Cycle collect FontFaceSetIterator. r=bzbarsky 2015-07-16 17:35:17 +10:00
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