Commit Graph

3978 Commits

Author SHA1 Message Date
Neil Rashbrook
0b70d2a086 Bug 869836 - Part 9a: Use AssignLiteral(MOZ_UTF16(...)) instead of Assign(NS_LITERAL_STRING(...)). r=ehsan
Relading with correct bug number so DONTBUILD.

--HG--
extra : amend_source : 6e05de7729c27761564124212b7d4cbe3318e482
2014-05-26 21:54:10 +03:00
Birunthan Mohanathas
740e2ee668 Backout 8b8bbe7aa1cc due to wrong bug number 2014-05-27 14:42:13 +03:00
Birunthan Mohanathas
2779282281 Bug 869836 - Part 12: Use Assign('c') instead of AssignLiteral("c"). r=ehsan
--HG--
extra : rebase_source : a6b15019cee452973dd8bf3112c15e14175855a9
2014-05-26 21:55:08 +03:00
Neil Rashbrook
4a282365d2 Bug 995730 - Part 9a: Use AssignLiteral(MOZ_UTF16(...)) instead of Assign(NS_LITERAL_STRING(...)). r=ehsan
--HG--
extra : rebase_source : d2d3d611c06a2a7ec930fb11576d7c8335c0a6e2
2014-05-26 21:54:10 +03:00
Jonathan Watt
6d11b545df No bug - Add a comment to nsStyleSet::SizeOfIncludingThis noting that it does _not_ count the size of the sheets in mSheets, only the size of the mSheets buffer. 2014-05-24 21:37:12 +01:00
Jonathan Watt
8e7a61e258 Bug 1013936, part 2 - Only load the html.css UA style sheet on-demand for SVG documents. r=bz CLOSED TREE 2014-05-24 20:29:11 +01:00
Jonathan Watt
b6253e4965 Bug 1008455 - Avoid loading the xul.css UA style sheet when possible. r=bz CLOSED TREE
--HG--
rename : toolkit/content/xul.css => toolkit/content/minimal-xul.css
2014-05-24 19:51:06 +01:00
Jonathan Watt
ea2c52a01f Bug 1015147 - Use the style sheet cache to store the user-agent style sheets svg.css and mathml.css so that we don't create new instances for each new document. r=bz 2014-05-24 19:46:38 +01:00
Birunthan Mohanathas
849371302f Bug 869836 - Part 9: Use AssignLiteral instead of Assign(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:52 +03:00
Birunthan Mohanathas
c6f127456b Bug 869836 - Part 7: Use AppendLiteral instead of Append where possible. r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas
016d46e5f3 Bug 869836 - Part 3: Use Append('c') instead of AppendLiteral("c"). r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas
41bdca1ff6 Bug 869836 - Part 2: Use AppendLiteral instead of Append(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:50 +03:00
Trevor Saunders
c913b8d558 bug 1004746 - part 1 - Remove a bunch of usage of nsAutoPtr's copy ctor r=froydnj 2014-05-07 18:05:37 -04:00
Brian Birtles
916f65be49 Bug 964646 part 21 - Add OMTA tests for animation list lengths and dynamic style rule changes; r=dbaron
This patch adds tests for triggering animations based on the length of the
animation-name property as well as tests for dynamic changes to style rules.
These tests are based on tests in test_animations.html but for directed at
animations that run on the compositor thread.
2014-05-19 14:42:49 +09:00
Brian Birtles
a0dee800e2 Bug 964646 part 20 - Add OMTA tests for cascading between keyframe rules; r=dbaron
This patch adds tests for the cascanding of keyframes rules based on those in
test_animations.html but for animations that run on the compositor thread.
2014-05-19 14:42:49 +09:00
Brian Birtles
71b134c42a Bug 964646 part 19 - Add OMTA tests for restyling interaction; r=dbaron
This patch adds tests for the interaction of animation and restyling (Bug
686656) based on those in test_animations.html but for animations that run on
the compositor thread.
2014-05-19 14:42:49 +09:00
Brian Birtles
bdc9dbb50b Bug 964646 part 18 - Add omta_todo_is for marking OMTA animations that are known to fail; r=dbaron
The implementation here current expects BOTH the following to fail:

- The comparison between the OMTA value and the expected value
- The comparison between the OMTA value and the computed value

This generally tends to be the case since the computed value and expected value
normally match unless we have a bug that affects all CSS animations. If we need
to mark tests where the computed value is also wrong we'll need to modify the
behavior here at that time.

This patch also applies this new function to the author !important test that was
previously commented-out because it currently fails.
2014-05-19 14:42:49 +09:00
Brian Birtles
003951e81b Bug 964646 part 17 - Add RunningOn.TodoMainThread for marking animations that are known to run on the compositor when they should not; r=dbaron
This patch also ensures that when we have an animation running on the compositor
when it should not that we still compare the values produced on the compositor
and on the main thread so that the visual result is correct even if the
performance characteristics are not.
2014-05-19 14:42:49 +09:00
Brian Birtles
679d6b418a Bug 964646 part 16 - Add OMTA tests for !important rules and animations; r=dbaron
This patch adds tests for the handling of author !important rules and animations
based on similar tests in test_animations.html but for animations that run on
the compositor thread.

Due to bug 847287, these tests don't pass and are partly disabled. Subsequent
patches add todo_is tests for this.
2014-05-19 14:42:49 +09:00
Brian Birtles
150b4a413a Bug 964646 part 15 - Add OMTA tests for sampling animations with same timestamp; r=dbaron
This patch adds a version of tests in test_animations.html for bug 651456 which
covers multiple samples with the same timestamp. The version here, however,
tests animations that run on the compositor thread.
2014-05-19 14:42:48 +09:00
Brian Birtles
6ccb3b39da Bug 964646 part 14 - Add OMTA tests for multi-property animations; r=dbaron
This patch adds a version of tests in test_animations.html for keyframe
animations with multiple properties where some properties are present in only
some keyframes. The version here, however, tests animations that run on the
compositor thread.
2014-05-19 14:42:48 +09:00
Brian Birtles
a5624f2ade Bug 964646 part 13 - Add OMTA tests for animation-delay; r=dbaron
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.8 The 'animation-delay' Property", for animations
that run on the compositor thread.
2014-05-19 14:42:48 +09:00
Brian Birtles
4f38562a5c Bug 964646 part 12 - Add OMTA tests for animation-play-state; r=dbaron
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.7 The 'animation-play-state' Property", for animations
that run on the compositor thread.
2014-05-19 14:42:48 +09:00
Brian Birtles
016e36647b Bug 964646 part 11 - Add OMTA tests for animation-direction; r=dbaron
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.6 The 'animation-direction' Property, for animations
that run on the compositor thread.
2014-05-19 14:42:48 +09:00
Brian Birtles
292493119c Bug 964646 part 10 - Fix floating point precision issues when comparing matrices; r=dbaron
This patch addresses and issue where the OMTA style and computed style were not
comparing equal in one particular case.

In this case AddTransformTranslate in nsStyleAnimation would give us
a translate-y value of 94.331673 in both cases (i.e. when calculating the
animated value on the compositor thread or when fetching computed style).

For the OMTA case, however, after we apply additional layer transformations and
then reverse them (so we can query the CSS value) we'd end up with 94.331642,
a difference of 0.000031. The reversing procedure is only used for testing so
the actual error introduced here by the additional layer transformations is
probably less.

Unfortunately, when we pass 94.331642 this along to MatrixToCSSValue we get back
matrix(1, 0, 0, 1, 94.3316) since it only outputs 6 digits of precision.

On the other hand, on the computed style end we'd pass 94.331673 to
MatrixToCSSValue which gives us matrix(1, 0, 0, 1, 94.3317), so the error swells
from 0.000031 to 0.0001.

Then when we subtract 94.3316 from 94.3317 in Javascript we get
0.00010000000000331966 due to floating-point precision issues which compares
greater than the default tolerance of 0.0001.

This patch simply adjusts the default tolerance to 0.00011 to accommodate
these floating-point differences.
2014-05-19 14:42:48 +09:00
Brian Birtles
425505c40f Bug 964646 part 9 - Add OMTA tests for animation-iteration-count; r=dbaron
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.5 The 'animation-iteration-count' Property" for animations
that run on the compositor thread.

These tests surface an issue where in some cases precision errors lead to
discrepencies between the OMTA style and computed style. This is fixed in
a subsequent patch in this series.
2014-05-19 14:42:48 +09:00
Brian Birtles
23c84f7d70 Bug 964646 part 8 - Add OMTA tests for animation-name; r=dbaron
This patch adds a version of the tests in test_animations.html under the
heading, "css3-animations:  3.2. The 'animation-name' Property" that tests the
same features when animations are running on the compositor thread.
2014-05-19 14:42:48 +09:00
Brian Birtles
eaa6e189d4 Bug 964646 part 7 - Handle NaN values when comparing matrices; r=dbaron
The test harness code for normalizing transform inputs to a standard form for
comparison fails to detect the case where the input is a string such as

 { tx: "20px" }

instead of:

 { tx: 20 }

When we go to compare matrix components we fail if:

  Math.abs(a.comp - b.comp) > tolerance

But if a.comp or b.comp is a string, we'll get NaN on the LHS and
"NaN > tolerance" will return false so we'll skip the failure handling and
continue onto the next component. That means if we have input { tx: "30px" } and
we get "20" as the x-translation component we'll pass the test.

This patch fixes this condition to check for isNaN.

We *could* also just drop a few .map(parseFloat) calls into
convertObjectTo3dMatrix and convertArrayTo3dMatrix to ensure "20px" becomes 20
but there may be situations where that masks bugs (since "20px" and "20em" turn
into the same thing) so for now this minimal fix should be enough.
2014-05-19 14:42:48 +09:00
Brian Birtles
d5f38e23b6 Bug 964646 part 6 - Add OMTA tests for timing functions on keyframes; r=dbaron
This patch converts the tests in test_animations.html under the heading,
"css3-animations:  3.1. Timing functions for keyframes" to an equivalent version
for testing animations that run on the compositor thread.
2014-05-19 14:42:47 +09:00
Daniel Holbert
de1b127bc9 Bug 1005660: Add an "early freeze" step, to freeze flex items that clearly can't grow (or shrink, if we're shrinking). r=mats 2014-05-17 18:49:06 -07:00
Boris Zbarsky
40a5bc161e Bug 1008719. CSS syntax got changed to allow identifiers starting with "--", so update our escaping code accordingly. r=dholbert 2014-05-15 10:26:53 -07:00
Bobby Holley
310739adc5 Bug 1005552 - Stop binding marquee event handlers. r=bz
These functions get invoked as event listeners, so we'll automatically get the
proper |this|. The reason for the existing shenanigans was to work around
bug 872772, which has now been fixed.
2014-05-16 10:56:41 -07:00
Ryan VanderMeulen
63cd113b5a Revert to revision 63dfac3c9c87 due to mass bustage pile-ups that landed after it on a CLOSED TREE. 2014-05-16 12:29:37 -04:00
Boris Zbarsky
fc50ce040c Bug 1008719. CSS syntax got changed to allow identifiers starting with "--", so update our escaping code accordingly. r=dholbert 2014-05-15 10:26:53 -07:00
Ryan VanderMeulen
8065df607f Backed out 4 changesets (bug 1008236, bug 1010344, bug 1004458, bug 1008719) for mochitest crashes on a CLOSED TREE.
Backed out changeset 28ecab881472 (bug 1008719)
Backed out changeset 7eebcecb7e26 (bug 1004458)
Backed out changeset 17ea7f2276ac (bug 1010344)
Backed out changeset 184ead7f6e37 (bug 1008236)
2014-05-15 14:24:12 -04:00
Boris Zbarsky
3f4724f33b Bug 1008719. CSS syntax got changed to allow identifiers starting with "--", so update our escaping code accordingly. r=dholbert 2014-05-15 10:26:53 -07:00
Nick Lebedev
7d585aca9e Bug 998002 - Rename nsContentUtils::Get{Subject,Object}Principal to nsContentUtils::{Subject,Object}Principal. r=bholley 2014-05-13 11:58:00 +02:00
Brian Birtles
808c09cd73 Bug 1004383 part 4 - Move mAnimations to CommonElementAnimationData; r=dbaron
As a result, transitions are now stored using a pointer to the base class,
mozilla::ElementAnimation. We downcast to a transition only when necessary. No
error-checking of the result of AsTransition is performed since we only ever
call it on the mAnimations member of ElementTransitions.
2014-05-15 08:38:37 +09:00
Brian Birtles
70280d8ce3 Bug 1004383 part 3 - Add ElementAnimation::AsTransition virtual method; r=dbaron
Add a method for downcasting from an ElementAnimation to an
ElementPropertyTransition (when the underlying object is an
ElementPropertyTransition).

This, unfortunately, adds a vtable to ElementAnimation but in the long term
I hope we will be able to isolate transition-specific code to a specific kind of
TransitionEffect that hangs off ElementAnimation and put the vtable on
AnimationEffect instead. (The AnimationEffect concept is part of the Web
Animations API.)
2014-05-15 08:38:37 +09:00
Brian Birtles
d7d1912502 Bug 1004383 part 2 - Rename StyleAnimation to ElementAnimation; r=dholbert
We currently have mozilla::StyleAnimation as well as nsStyleAnimation. This
patch renames StyleAnimation back to ElementAnimation.

Although ElementAnimation is very similar to ElementAnimations, in the near
future we expect to retire ElementAnimations and replace it with a common
AnimationSet-like structure that is covers the features of ElementAnimations and
ElementTransitions.
2014-05-15 08:38:37 +09:00
Brian Birtles
c2e22acede Bug 1004383 part 1 - Put StyleAnimation on the heap; r=dbaron
This patch takes StyleAnimation and makes it ref-counted heap object. This
should allow us to store StyleAnimation and its subclasses (transitions only
currently) in a consistent fashion (an array of base-class pointers).
Furthermore, this will be helpful if we want these things to be pointed to
from Javascript objects that may, for example, preserve their lifetime beyond
that of the element that currently owns them.

This patch also introduces a typedef for an array of refptrs to StyleAnimation
objects (and similarly for the subclass ElementPropertyTransition) to simplify
the code somewhat.
2014-05-15 08:38:37 +09:00
Arnaud Bienner
1b9047074a Bug 1007278: Restore the distinct text-color on disabled buttons. r=dholbert 2014-05-13 20:43:10 +02:00
Daniel Holbert
08a2f8c784 Bug 985336: Remove unnecessary #includes from headers in layout/style. r=dbaron 2014-05-09 08:23:14 -07:00
Benoit Jacob
472e4472e0 Bug 1004098 - Make nsTArray use size_t in its interface (32bitness is fine as an internal detail) - r=froydnj, sr=bsmedberg 2014-05-08 21:03:35 -04:00
Matt Woodrow
5b0d54b1ce Bug 995871 - Apply CSS transforms in CSS pixel space instead of device pixel space. r=dbaron 2014-05-08 17:35:00 +12:00
Bobby Holley
0a5fb33d0a Bug 997987 - Remove usage of nsIScriptSecurityManager::GetSubjectPrincipal. r=Ms2ger 2014-05-06 15:43:03 -07:00
Mats Palmgren
a023718b82 Bug 1005567 - Remove the obsolete 'grid-auto-position' property. r=simon.sapin 2014-05-06 09:45:13 +00:00
Mats Palmgren
2575422e86 Bug 994592 - Make 'row' the initial value for 'grid-auto-flow' and remove 'none' as a valid value. And add the 'stack' variants. r=simon.sapin 2014-05-06 09:45:13 +00:00
Eric Rahm
53ee1bf751 Bug 1003479 - Fix incorrect usage of SizeOfIncludingThis and SizeOfExcludingThis functions. r=njn
--HG--
extra : rebase_source : 2d51e1fc1b642b0efa60cb4e25e8b142577e93d3
2014-05-01 10:37:54 -07:00
Mats Palmgren
a9080db387 Bug 613659 - Minor whitespace fixes. r=cam 2014-05-05 17:55:55 +00:00