There are a few different reasons why tests needed updating (not an exhaustive list):
- Tests assume that successive operations take place at different times.
- Tests assume that an operation took a minimum amount of time.
- Tests hardcodes a specific delay.
In most cases we hardcode the preference off. In some cases this is the best approach,
in others, we would like to improve. The bug for tracking those improvements is Bug 1429648
An improvement that is present in some tests is to hardcode a specific precision reduction
that is acceptable based on the confides of the test. (Obviously this needs to be a fix for
the test framework and not a requirement on the feature being tested.)
In a few places, the test itself can be fixed, for example to no longer require the end
time of an operation to be strictly greater than the start time, and allows it to be equal
to it.
MozReview-Commit-ID: J59c7xQtZZJ
--HG--
extra : rebase_source : df8a03e76eaf9cdc9524dbb3eb9035af237e534b
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
The problem with this bug was that it did not correspond to animations that
have multiple keyframes with the same offset.
In summary graph, although we were changing the resolution for the graph
creation by the distance of offset between keyframes, as the calculation of
resolution between keyframes with equivalent offset was infinite, generation
was not completed and it was in a state of freezing.
In here, in case of zero distance of offsets, we make avoiding to affect to
changing the resolution.
In addition, the detail graph did not display correctly.
For example, there is an animation below.
div.animate(
[
{
offset: 0,
opacity: 1,
},
{
offset: 0.5,
opacity: 0.5,
},
{
offset: 0.5,
opacity: 0.1,
},
{
offset: 1,
opacity: 1,
},
],
1000
);
In this animation, opacity changes from 1 to 0.5 during 0 - 499ms, from 0.1 to 1
after 500ms.
So, opacity at offset 0.5 behaves 0.5 during 0 - 499ms, 0.1 after 500ms.
Since current animation inspector creates the graph with computed value of the
time of offset, the opacity of offset 0.5 always is 0.1 in the example,
was not correct.
As a solution, same to the actual animation work, create the graph between each
keyframes with range that from start keyframe offset time to just before the
time of end keyframe offset time.
Also, in same offsets, connects between just before the time of the offset time
and the offset time.
So, in the example, we separate as below, then calculate the each coordinates,
then combine as graph shape.
1: 0 ~ 499.999ms
2: 499.999 ~ 500ms (same offsets)
3: 500 ~ 999.999ms
4: 1000ms
MozReview-Commit-ID: p4Cn2N9iFt
--HG--
extra : rebase_source : 0f175fa0b7a3c882171e59a6e4a94bb4802e96d2
Integers used to skip localization & formatting.
We used to have (for 2 decimals formatting)
1000 -> 1000
1000.1 -> 1,000.10
With the other patches attached here, the behavior is now consistent
1000 -> 1,000
1000.1 -> 1,000.10
This changeset updates some regexp in an animation inspector test to be
compatible with the new format.
MozReview-Commit-ID: 4YUNGlKp98z
--HG--
extra : rebase_source : 638fced7a884a01c5fcd41e0df68e7c8d39c2e8c
Currently the animation inspector re-generates the entire animation timeline
whenever an animation is added, changed, etc.
To avoid this, averts to re-render the component which no needs.
In this implementation, premises the actorID can be used as unique id for each
animations. The mechanism is below.
At initial time, renders all actors as normally. In this time, holds actorID
and related components to componentsMap.
Next, in case of that needs to update the UI, gets animation actors from server,
and compares actorID of both the actors and componentsMap. If retrieved actorID
exists in componentsMap, updates the view area only without re-rendering.
For example, supposes, has an animation (actid-1) when opens the inspector, and
a new animation (actid-2) was added a little later.
At initial rendering, holds "actid-1” of first animation as key and related
components to componentsMap. Next, when “actid-2” animation is added to document,
can get animation actors that are “actid-1” and “actid-2” from server. Because
“actid-1” is already held in componentsMap, updates “actid-1”’s view area. This
is because TimeScale will be updated. Then "actid-2” render as normally since
componentMap does not have the actorID. After rendered, holds “actid-2” and
related components.
However, even if actorID exists, if keyframes (tracks) and effect timing
(state) differ, re-render that. Also, if iterationCount of effect timing
represents Infinity, do re-rendering. Because the display area expands by the
end of the currently displayed time.
And, if actorID in componentsMap is not in retrieved actors, removes related
components.
MozReview-Commit-ID: GmifRX3GzYd
--HG--
extra : rebase_source : cd9d5c69492f6b4b9ee967fe105eb73c7a43cd7a