We don't actually need to re-calculate if the updated properties are the
same as the old one. This change avoids problematic nested calls of
nsStyleSet::GetContext() in particular cases.
MozReview-Commit-ID: JksiTGX57Fy
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
Previously, when fetching an nsPresShell, we would look up the current realm
document and get the pres shell for it. This patch makes us call GetPresShell()
which uses GetRenderedDocument() which corresponds to the composed document of
the target effect which seems more consistent since it is the target effect we
will use as context for computing CSS values (as required by [1]).
[1] https://w3c.github.io/web-animations/#calculating-computed-keyframes
MozReview-Commit-ID: 9S55041rfTp
--HG--
extra : rebase_source : c52d4c366d0a2891958c8f7378614a8feb5e7c70
Note that when we actually compute values, we will use the composed document of
the target element (see the next patch in this series).
MozReview-Commit-ID: 8Pp3y19pltP
--HG--
extra : rebase_source : bb1c21f3fdcf2e831213d2f278d70e4ca2637028
There doesn't seem to be a need to have a separate 'sandbox' folder just for
this test. It's a Gecko-specific test so it can go in the 'mozilla' folder.
MozReview-Commit-ID: 340knfWtcD7
--HG--
rename : dom/animation/test/sandbox/test_set-easing.html => dom/animation/test/mozilla/test_set-easing.html
extra : rebase_source : 44a03425bbfee97a06d498224dcaa76b51c3b317
While resolving style context, the primary frame of the target element
has previous style context so if we don't pass the newly created nsStyleContext,
UpdateCascadeResults uses the previous style to get overridden properties, it
will result unexpected cascading results.
MozReview-Commit-ID: osqXQlP43X
--HG--
extra : rebase_source : 1b34f9245367c2613807156559f09f5f2943458c
To create a stacking context for animations on transform:none segment,
we need to set NS_FRAME_MAY_BE_TRANSFORMED. The fix is comming in part 2.
Note that in case of animations which has properties preventing running on
the compositor, e.g., width or height, corresponding layer is not created
at all, but even in such cases, we normally set valid change hint for such
animations in each tick, i.e. restyles in each tick. For example:
div.animate([{ opacity: 1, width: '100px' }, { opacity: 0, width: '200px' }], 1000);
This animation causes restyles in every ticks without this patch, this patch
does not affect such animations at all. The only animations which will be
affected by this patch are animations which has opacity/transform but
did not have those properies. e.g, setting transform by setKeyframes or
changing target element from other target which prevents running on the
compositor, etc.
MozReview-Commit-ID: 78fYqyX8uDX
--HG--
extra : rebase_source : c4a6ef244f26f3d808fd2c6a5f80c1a15478ae31
We already have a wrapper named nsIFrame::BackfaceIsHidden().
MozReview-Commit-ID: 5L49W6wtXs1
--HG--
extra : rebase_source : d3be8d028453e63fb2d3d96b5956262d352385ef
If there is a possibility that long duration property causes overflow on
TimeStamp calculations, we should use shorter duration in our tests.
MozReview-Commit-ID: HJThoX80W4Y
--HG--
extra : rebase_source : 8986afa9a58d832e15194b8ea9533af380a127a4
This implements the changes to the specified behavior from the following
changeset:
a9ba51338e
It also updates test expectations based on the tests updated in part 1 of this
patch series.
MozReview-Commit-ID: HyJC8tHXLYc
--HG--
extra : rebase_source : 6d0f5eb03a2bb4c3938d79dfae7ee433d33fd2b1
Handle these cases:
1. When creating null-target effect whose spacing mode is "paced":
- Fall back to distribute spacing. This case is already included by previous
patches.
2. When setting a target to null:
- Apply distribute spacing.
3. When style context is null.
- Fall back to distribute spacing.
4. When setting a new valid target:
- Use this new target as the context element and re-calculate the computed
offsets. This case is already included by previous patches.
MozReview-Commit-ID: 1zhSOAylnZb
--HG--
extra : rebase_source : e2988f433f395a398090dc08f262b0154de3dc50
Do a simple refactor, so we can reuse the getter of nsStyleContext.
MozReview-Commit-ID: 4BQ7f8HuFns
--HG--
extra : rebase_source : 37bbf6af795484c5d80d308683e4fcdfe23c7a1a
Calculate the paced spacing for each Keyframes by the context element. Use the
algorithm in the spec.
MozReview-Commit-ID: HFWQwoKhKWt
--HG--
extra : rebase_source : 40112eb1f722179cfc0a4ccbd188e22bc7af9b9b
We want to reuse the StyleAnimationValues of properties of each keyframe when
applying spacing and building animation property segments, so refactor this
part.
MozReview-Commit-ID: 8G56C3BU3FR
--HG--
extra : rebase_source : 73b6d374ac8bd25645d1b1b2f15f4e778b3ec949
When we apply paced spacing, we have to check if there are still null computed
offsets after applying paced spacing to paceable Keyframes because the
calculation of distance may be failed or some Keyframes are not paceable in
the specific range. Therefore, using -1 would be easier to check it.
Also, add a const, kComputedOffsetNotSet, to represent this invalid value.
MozReview-Commit-ID: GPhj7cdiX2W
--HG--
extra : rebase_source : 8c4e7769c454fe50eb1cc08db63866dcc4ed62e5
Rename it to ApplySpacing, and let it handle both distribute and paced mode.
MozReview-Commit-ID: 2kGA6LMHUsz
--HG--
extra : rebase_source : ebd5566392b1ea6a4a445ff7c3ed81cdc94bdded
We only support spacing mode from Web Animations API, so add a simple parser and
use it only from the API. In this patch, parse spacing mode from the constructor
and throw TypeError if we have any parse error.
MozReview-Commit-ID: 9H7g80IcZfZ
--HG--
extra : rebase_source : e1bc781ff0f20a1a38c04e672832ec013edc549d
Add a new file, KeyframeEffectParams.h, and define the basic data
members nsString for the spacing mode.
Also, add one more argument, const KeyframeEffectParams&, to the
constructors of KeyframeEffect(ReadOnly).
MozReview-Commit-ID: I7LYlnv6LLb
--HG--
extra : rebase_source : 9aebb7b9659588674c2a954eb2ce62c827bc9830