Commit graph

18 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0b67b218d0
style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
Simon Sapin
6d0e48f6cc Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
Simon Sapin
789807b7b0 Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
Simon Sapin
b2a7e44373 Move ServoSelectorImpl to a dedicated module. 2016-07-20 08:40:53 +02:00
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
Anthony Ramine
bf34fdde1f Move util::workqueue to style 2016-07-04 21:56:09 +02:00
bors-servo
ec0d3e084d Auto merge of #11946 - emilio:animations-sender, r=bholley
style: Remove the Mutex from new_animations_sender by moving it to the local StyleContext.

<!-- 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.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

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.

r? @SimonSapin/@mbrubeck for the style/layout, @bholley for the geckolib changes

<!-- 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/11946)
<!-- Reviewable:end -->
2016-07-01 14:12:54 -07:00
Emilio Cobos Álvarez
203d2a62c2
style: Remove the Mutex from new_animations_sender by moving it to the local 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.
2016-07-01 13:48:06 -07:00
Ms2ger
0078e6c3bb Don't panic in LayoutThread::exit_now() if the paint thread is gone already.
Fixes #11996.
Fixes #12005.
Fixes #12007.
Fixes #12011.
Fixes #12026.
2016-07-01 12:15:51 +02:00
Ms2ger
6b981039d0 Avoid the Vec reversal in DisplayList::hit_test. 2016-06-29 09:46:45 +02:00
Ms2ger
ae064dc7c1 Simplify the code setting hit_test_response. 2016-06-29 09:33:30 +02:00
Ms2ger
aefa941626 Pass a straight Vec to DisplayList::new().
There is no reason to have a runtime check here.
2016-06-29 09:33:29 +02:00
Emilio Cobos Álvarez
2d566ef0ef
style: Fix parsing and add generated keyframes 2016-06-28 15:20:59 +00:00
Emilio Cobos Álvarez
8527762b83
style: Allow pausing and unpausing animations.
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?
2016-06-28 15:13:03 +00:00
Emilio Cobos Álvarez
bc970596d6
layout: Make animations work... more or less.
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.
2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
c16c5acade
style: Rewrite the animation representation to allow having state in layout
I have to make the appropriate changes in layout, but I'm running out of battery
in the bus.
2016-06-28 15:09:53 +00:00
Simon Sapin
f7f81e0ed0 Use our copy of RefCell for style data.
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
2016-06-23 16:13:49 +02:00
Ms2ger
6528bee84f Introduce a layout_thread crate; drop the dependency of layout on script. 2016-06-20 21:23:44 +02:00
Renamed from components/layout/layout_thread.rs (Browse further)