| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Fixes #12554
|
|
|
|
| |
infrastructure for controlling animations.
|
|
|
|
|
| |
It is conditionally compiled to one implementation or the other
(Gecko or Servo) with `#[cfg(…)]`.
|
|
|
|
|
| |
Doing this in a separate commit avoids mixups
with the ComputedValues trait that the previous commit removed.
|
| |
|
| |
|
|
|
|
|
|
| |
The previous behavior is plain wrong, since that array has always at least one
element, so we effectively couldn't specify anything else than "ease" in our
animations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we're restyling a page with animations and layout takes too long, we
might still have the expired animations from the last restyle, without these
being cleared out by layout on `tick_animations`.
Unfortunately it's hard (near to impossible?) to make a reduced test case for
this, since it heavily depends on the speed of the build and conditions that
only happen under heavy loads.
Mainly, it depends on how accurately the `TickAllAnimations` message is sent
from the constellation.
Thus, we can't just re-expire an animation, and we should re-check for it as a
previous animation.
Fixes #12171
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Staticize CASCADE_PROPERTIES, (temporarily) fix stylo path for animations, and introduce the long-term path to follow
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [x] These changes do not require tests because refactoring + geckolib
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bholley: I was going to do this "the good way", but that involves quite a few properties, so I thought I'd rather unlock stylo before :)
r? @bholley
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11972)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit adds a need_index prop to the style system, and autogenerates
iterators, and a get_xxx_mod(i) function from a get_xxx_prop() and
get_xxx_at(index) functions.
This allows us to (finally!) take rid of the as_servo() hack. There are a few
unimplemented clones, but I'm just too lazy for that right now.
|
| |
| |
| |
| | |
as_servo in style/animations.rs
|
| |
| |
| |
| |
| | |
With needs_borrow we will be able to remove this, though we'll have to implement
clone_ and borrow_ methods for a bunch of properties.
|
|/
|
|
|
|
|
|
|
|
| |
StyleContext.
As a follow-up, we could move all the data living under a mutex in the
SharedLayoutContext only in order to create the local context to the same place.
This should increase animation performance when there are multiple animations in
one page that happen to be on different threads.
|
|
|
|
| |
on restyle.
|
| |
|
|
|
|
|
|
| |
There's a bit of flickering when unpausing where the node has the original
state, but I'm not totally sure where it comes from, posibly from
PropertyAnimation returning None due to no styles changing?
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few shortcomings, for example:
* We don't do the same as other browsers when some properties are not specified
in some of the keyframes, though this is easy to work out (though a bit more
expensive in the sense that we should apply all the previous keyframes' style
instead of just the previous and the next.
* To trigger the initial animation, a restyle is necessary. Should be easy to
do an initial restyle off-hand or something like that, but for now this is
worked-around adding a :hover rule to the node.
Also, the animation is resetted when the node is hovered. That's a bug, but
is probably not so difficult to test.
* A few things, mainly animation-direction, are not supported yet, but
shouldn't be that hard to support.
Still a lot of work to do, but I think this approach might be ok.
|
|
|
|
|
|
|
|
| |
There's some maths I've done wrong, but it DOES animate some things, though
they're only triggered past the first restyle, and we probably have some
duplications where the animations arrive to layout.
Anyway, got to go.
|
|
|
|
|
| |
I have to make the appropriate changes in layout, but I'm running out of battery
in the bus.
|
| |
|
|
|
|
|
|
|
| |
So this actually allows some more animations to be triggered. The bad part of
this is that they're actually triggered always when the style is recalculated,
so we're going to have at least some more state into the node, and the
constellation, which would have to keep track of the animations states.
|
| |
|
| |
|
|
|
|
| |
experimental
|
| |
|
| |
|
|
|
|
| |
This helps with style struct alignment between Servo and Gecko.
|
|
|
|
|
|
| |
More work as described in #10185.
The reason I upgraded lazy_static to 0.1.16 is because it fixes an issue with the Box name (std::boxed::Box was used in an unqualified name, which can cause name clashes when there is another type that exists with the same name).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This is a followup to #10210, and a continuation of #10185.
|
|
|
|
| |
This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
value type.
This make the layout code way clearer.
|
| |
|
|
|
|
|
|
|
|
| |
We do a few things-here:
* Hoist non-layout-dependent fields in SharedLayoutData and LocalLayoutData into style/.
* Hoist parts of css/matching.rs into style/.
* Hoist parts of layout/animation.rs into style/animation.rs.
* Remove the duplicated-but-slightly-different definition of OpaqueNode.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #7284
|