Commit Graph

20633 Commits

Author SHA1 Message Date
Brian Birtles
1db86095cf Bug 964646 part 1 - Add common OMTA test runner to animation_utils.js; r=dbaron
Since off-main thread animation (OMTA) is not available on all platforms we
define a common wrapper function that runs OMTA tests only when available. This
patch further performs an internal check of basic OMTA operation so that
only a single error is produced if OMTA is unexpectedly unavailable.

Typical usage is:

  SimpleTest.waitForExplicitFinish();
  runOMTATest(function() {
    ... test code ...
    SimpleTest.finish();
  },
  SimpleTest.finish);

This can be easily wrapped with promises if needed but does not require using
promises.

The calls to waitForExplicitFinish and finish are not performed automatically
since this function may be integrated with test suites that do other work
outside the call to runOMTATest.
2014-04-03 16:55:44 +09:00
Brian Birtles
c066dc576e Bug 880596 part 9 - Fix comment about mFlushCount; r=dbaron
Two comments in AnimationCommon.h refer to 'mFlushCount' which was presumably
the old name for mAnimationGeneration. Also, one comment says
nsCSSFrameConstructor tracks this. This patch adjusts the comments to refer
to mAnimationGeneration and RestyleManager.

(The reference to nsTransitionManager::UpdateAllThrottleStyles() is still valid
since there is useful documentation accompanying that method despite the fact
that the relevant code is mostly contained in AnimationCommon.h since bug
914847. Eventually we will unify the structures of transitions and
animations to the the point that we can replace the
IMPL_UPDATE_ALL_THROTTLED_STYLES_INTERNAL macro in AnimationCommon.h with an
actual method. At that point we can move the documentation accompanying
nsTransitionManager::UpdateAllThrottleStyles and its references to
AnimationCommon.)
2014-04-03 14:57:28 +09:00
Brian Birtles
9a84682426 Bug 880596 part 8 - Rename ElementAnimation to StyleAnimation; r=dbaron
We need a basic representation of animations from which we can derive subclasses
to represent specific cases such as transitions. For now we will retrofit
ElementAnimation for that purpose hence renaming it to StyleAnimation.

This patch removes the "using namespace mozilla::layers" line from
AnimationCommon.cpp since the unified build system concatenates several files
together before compiling making using declarations like this leak into other
files potentially creating ambiguities. Previously, when we were calling
ElementAnimation, 'Animation', there were ambiguities between
mozilla::layers::Animation and this new 'Animation' class. In general, it is
probably a good idea to limit the scope of these using declarations so I've kept
that change.
2014-04-03 14:57:28 +09:00
Brian Birtles
861c780a85 Bug 880596 part 7 - Move ElementAnimation to AnimationCommon; r=dbaron
This patch relocates ElementAnimation from nsAnimationManager.{h,cpp} to
AnimationCommon.{h,cpp} and in the process moves it into the mozilla::css
namespace.
2014-04-03 14:57:28 +09:00
Brian Birtles
8c42cb60a0 Bug 880596 part 6 - Factor out common method for adding animations and transitions to a layer; r=dbaron
The loops for adding animations and transitions to a layer in
nsDisplayList::AddAnimationsAndTransitionsToLayer are now identical and so can
be factored out into a common method.

Since it is not possible to implicitly convert from
nsTArray<ElementPropertyTransition> to nsTArray<ElementAnimation> despite
ElementPropertyTransition being a subclass of ElementAnimation a templated
method is used. In the future, as animations and transitions share more and more
code, we should be able to remove the need for templates.
2014-04-03 14:57:28 +09:00
Brian Birtles
2680a0d756 Bug 880596 part 5 - Make ElementAnimation::HasAnimationOfProperty no longer virtual; r=dbaron
ElementAnimation::HasAnimationOfProperty doesn't seem to be overridden anywhere.
I suspect it was a copy-paste mistake because the methods of the same name on
ElementAnimations, ElementTransitions, and CommonElementAnimationData are
virtual.
2014-04-03 14:57:28 +09:00
Brian Birtles
e60cc1f28c Bug 880596 part 4 - Reuse ElementAnimation::HasAnimationOfProperty; r=dbaron
Now that ElementTransitionProperty inherits from ElementAnimation,
ElementTransitions::HasAnimationOfProperty can re-use
ElementAnimation::HasAnimationOfProperty in its definition of
ElementTransitions::HasAnimationOfProperty.

Similarly, in nsDisplayList::AddAnimationsAndTransitionsToLayer we can use this
method rather than drilling down to the appropriate segment by hand.
2014-04-03 14:57:27 +09:00
Brian Birtles
165671f347 Bug 880596 part 3 - Remove ElementPropertyTransition::IsRunningAt and mIsRunningOnCompositor; r=dbaron
Both ElementPropertyTransition and ElementAnimation specify an IsRunningAt
method which have the same purpose but with two subtle differences:

a) ElementPropertyTransition::IsRunningAt checks if the transition is a removed
sentinel and if so returns false. This patch adds a check for a null start time
to IsRunningAt since I think in future we will want to allow null times in
various places to represent, for example, animations that are not connected to
a timeline. (However, ultimately we will probably not allow start times on
*animations* to be null, only on their associated player.)

Should we later use a different mechanism for marking sentinel transitions (e.g.
a boolean flag) this method should still be correct as it checks if aTime is
inside the transition interval before returning true.

b) ElementPropertyTransition::IsRunningAt returns false if the transition is in
the delay phase, that is, waiting to start. This patch changes this behavior so
that transitions are considered running even if they are in the delay phase.
This brings their behavior into line with animations and removes the need for
the ElementPropertyTransition::mIsRunningOnCompositor since it is only used to
determine when a transition in the delay phase has begun.

ElementAnimation::IsRunningAt also handles pause state and iterations but this
logic should still be correct for transitions which, in this area, only use
a subset of the functionality of animations since their pause state is always
playing and their iteration count is 1.
2014-04-03 14:57:27 +09:00
Brian Birtles
400ebf0c64 Bug 880596 part 2 - Make ElementPropertyTransition inherit from ElementAnimation; r=dbaron
As part of moving towards more shared data structures for animation, this patch
makes ElementPropertyTransition inherit from ElementAnimation. At the same time
we switch from storing the target property, start/end values, start time, delay,
and timing function on the transition to the corresponding location in
ElementAnimation.

Since nsDisplayList::AddAnimationsAndTransitionsToLayer was already doing this
conversion in order to create animations to pass to the compositor thread, we
can remove the conversion code from there and just use the ElementAnimation data
structures as-is.

A number of assertions are added to verify that transitions are set up as
expected (namely, they have only a single property-animation with a single
segment). As we move to more generic handling of animations and transitions
these assertions should disappear.
2014-04-03 14:57:27 +09:00
Brian Birtles
af4841c2d2 Bug 880596 part 1 - Separate delay from start time for transitions; r=dbaron
As a first step towards making CSS animations and CSS transitions use the same
data structures, this patch aligns their behavior with regards to start time and
delay handling.

Previously, ElementAnimation objects maintained separate mStartTime and mDelay
members whilst ElementPropertyTransition objects maintained a single mStartTime
property that incorporated the delay. This patch adds an mDelay member to
ElementPropertyTransition and stores the delay and start time separately.
Calculations involving ElementPropertyTransition::mStartTime are adjusted to
incorporate mDelay.
2014-04-03 14:57:27 +09:00
L. David Baron
10790a02c1 Bug 975397 - Call TrackImage when constructing a new nsStyleBorder. r=heycam
I confirmed that the crashtest crashes in the harness without the patch.

--HG--
rename : layout/reftests/backgrounds/blue-32x32.png => layout/style/crashtests/blue-32x32.png
2014-04-02 22:56:19 -07:00
Masayuki Nakano
ff8b968574 Bug 990855 part.2 Remove dom/events from local includes of moz.build files r=smaug 2014-04-03 13:18:38 +09:00
Masayuki Nakano
01ad44156b Bug 989212 Rename nsEventStates to mozilla::EventStates r=smaug
--HG--
rename : dom/events/nsEventStates.h => dom/events/EventStates.h
2014-04-03 13:18:36 +09:00
Timothy Nikkel
b04007c5c8 Bug 989897. In order to properly compute root composition size view the root composition size first as layer pixels in the target layer, then convert to css pixels. r=kats
Since our goal is to use the root composition size to bound the layer size of the display port of the child layer this makes sense.
2014-04-02 17:46:38 -05:00
Ed Morley
a96b4fa90f Merge mozilla-central and inbound 2014-04-02 18:24:05 +01:00
Xidorn Quan
3bdb6dcf0e Bug 990297 - Refactor table initialization code in nsCSSProps::AddRefTable. r=dbaron 2014-04-02 11:47:55 -04:00
Carsten "Tomcat" Book
277da604da merge b2g-inbound to mozilla-central 2014-04-02 15:57:57 +02:00
Ed Morley
aa8fe650e6 Backed out changeset b07bd3a55770 (bug 990628) since it needs to land on b2g-inbound alongside a moztt PR
--HG--
extra : rebase_source : 9fef0224bc628d4eced8b4bef92713bf82cc0796
2014-04-02 09:48:29 +01:00
Benoit Girard
0b0947607c Bug 980454 - Add reftest for will-transform:transform containing block behavior. r=roc 2014-04-02 16:47:14 +08:00
James Kitchener
9bd3b4062a Bug 947557 - Call DidReflow() on <mprescripts/> frame. r=fredw 2014-04-01 02:56:00 +02:00
Jonathan Kew
377860b603 bug 990628 - revert reftest manifest change now that the test here (and in bug 990627) should no longer fail on b2g 2014-04-01 21:45:35 +01:00
Ryan VanderMeulen
6a3fa988ca Merge inbound to m-c. 2014-04-01 16:45:00 -04:00
Ed Morley
ac0d302691 Bug 990628 - Disable text/wordbreak-4a.html for failures after the landing of bug 987582; CLOSED TREE 2014-04-01 17:21:18 +01:00
Ed Morley
6a6e6272ed Bug 990627 - Disable first-letter/329069-2.html for failures after the landing of bug 987582 2014-04-01 17:18:52 +01:00
Simon Sapin
79cca48a18 Bug 988780 - Refactor ParseGridTemplateAfterString() to not use CheckEndProperty() (layout/style/nsCSSParser.cpp). r=dbaron 2014-03-27 02:24:00 +01:00
Jonathan Kew
447904d4ba bug 990628 - revert reftest manifest change now that the test here (and in bug 990627) should no longer fail on b2g. r=mwu 2014-04-01 21:45:35 +01:00
Jonathan Kew
5c3bff2b07 bug 987668 - reftest for Polish hyphenation. r=smontagu 2014-04-02 07:38:00 +01:00
Cameron McCormack
30b208285b Bug 989965 - Resolve style for pseudo-elements correctly when style rules that have user action pseudo-classes on them are present. r=bzbarsky 2014-04-02 15:08:52 +11:00
Cameron McCormack
efeaf8eada Bug 985838 - Change custom property name prefix from "var-" to "--" and allow identifiers to begin with "--". r=dbaron 2014-04-02 14:32:16 +11:00
Mark Hammond
cd2c8e6c5b Bug 987404 - Disable failing mochitest-browser tests in e10s. r=ted. 2014-04-02 10:53:55 +11:00
Ryan VanderMeulen
8cc4d4a447 Merge m-c to inbound. 2014-04-01 16:49:05 -04:00
Mike Kaply
854aed8da8 Backing out bug 889085 (dddfd63f1414, f8c14bd80676) due to regression bug 987783. r=roc 2014-04-02 10:03:08 -05:00
Masatoshi Kimura
23286abbc0 Bug 989557 - Implement a fallback for CJK Compatibility Ideographs Standardized Variants. r=jfkthame
--HG--
rename : layout/reftests/fonts/gw432047-license.txt => layout/reftests/fonts/glyphwiki-license.txt
2014-04-01 02:30:26 +09:00
Ed Morley
8780bb249f Backed out changeset 25877e8f89c2 (bug 610545) for browser-chrome failures 2014-03-31 16:05:04 +01:00
Ed Morley
c1e97f1596 Backed out changeset efbf80a15a2b (bug 610545) 2014-03-31 16:04:44 +01:00
Anuj Agarwal
645ee5947f Bug 975681 - Reftests for MathML mfrac. r=fredw 2014-04-01 08:35:15 -04:00
Anuj Agarwal
dc7bd91205 Bug 975681 - Mochitest for MathML mfrac. r=fredw 2014-04-01 08:34:51 -04:00
Neil Deakin
d871ab707e Bug 610545, check for a transition earlier to avoid assertion if a panel is opened while it is closing, r=neil 2014-03-31 08:42:33 -04:00
Neil Deakin
ce0ebfdb12 Bug 610545, arrow panels should animate when opening and when cancelling, r=neil,dao 2014-03-31 08:42:32 -04:00
Jonathan Watt
e5b14ba61e Bug 988818 - Stop creating a Thebes (gfxASurface) backed gfxContext in nsSVGImageFrame (Moz2D migration). r=longsonr 2014-03-31 12:53:54 +01:00
Jonathan Watt
abbdac0e85 Bug 988904 - Stop creating a Thebes gfxImageSurface in PresShell::PaintRangePaintInfo (Moz2D migration). r=mattwoodrow 2014-03-31 12:53:31 +01:00
Jonathan Kew
b1589b8ab2 bug 617008 - avoid creating a rendering context that we may not need. r=roc 2014-03-31 11:53:09 +01:00
Peter Van der Beken
e72e412aac Bug 988334 - Stop reusing SpecialPowers for different windows. r=jmaher.
--HG--
extra : rebase_source : ffeb4f2d49c6a20a95cc3ca0da63b49c10dee904
2014-03-24 21:12:41 +01:00
Paul Adenot
ba92d7c5b8 Bug 946618 - Add native tests for cubeb. r=kinetik
--HG--
extra : rebase_source : 9b2e8e702ce5f8ea4d5416f3b45c91bc4cd94432
2014-02-25 14:21:59 +01:00
Jonathan Watt
b918d98f73 Bug 990683 - Stop calling DeprecatedGetCurrentAsSurface in nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement,...). (Moz2D migration.) r=mattwoodrow 2014-04-02 12:32:24 +01:00
Simon Sapin
5ff2bb112e Bug 989755: Fix up serialization of the grid-template shorthand. r=dholbert
* Refuse to serialize some combinations of values that the shorthand
  can not represent: 'grid-template-areas: (not none)' combined with
  'grid-template-rows: subgrid' or 'grid-template-columns: subgrid'.
  (The former used to cause an assertion failure.)
* Remove an extraneous trailing space that occured when a <track-list>
  was last. (ie. followed by an omitted <line-names>)
* Add tests for the result of this serialization.
2014-03-31 13:31:00 +02:00
Simon Sapin
30a2740552 Bug 978478 part 2: Add support for repeat() in <track-list> (CSS Grid) r=dholbert 2014-03-31 22:49:51 -07:00
Simon Sapin
a43b6fb7ef Bug 978478 part 1: Add support for repeat() in <line-name-list> (CSS Grid) r=dholbert 2014-03-31 22:49:45 -07:00
Masayuki Nakano
bd6decd65b Bug 984271 part.2 Rename nsEventStateManager to mozilla::EventStateManager r=smaug
--HG--
rename : dom/events/nsEventStateManager.cpp => dom/events/EventStateManager.cpp
rename : dom/events/nsEventStateManager.h => dom/events/EventStateManager.h
2014-04-01 13:09:23 +09:00
L. David Baron
b6c4857c64 Bug 470769 - Store computed styles of integer-valued properties as integers in nsROCSSPrimitiveValue, so they round-trip correctly. r=bzbarsky 2014-03-29 09:29:30 -07:00