Commit graph

36 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
6c3458767b
style: Refactor and add infrastructure for font metrics in style.
This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.
2016-11-13 11:54:10 +01:00
Ravi Shankar
c4fc49c559 Make use of Either<A, B> for LengthOrNone 2016-11-09 13:04:26 +05:30
Ravi Shankar
6061985898 Prefer Servo-specific ToCss for all types 2016-11-07 09:14:22 +05:30
bors-servo
f80623fd93 Auto merge of #13694 - emilio:style-animation, r=Manishearth,birtles
Introduce AnimationValue to manage animated properties in Gecko.

<!-- Please describe your changes on the following line: -->

Doesn't compile because there are a bunch of `from_computed_value` missing, and I need to take care of fixing that before, but open for discussion.

@birtles: is an interface like this something like what you were looking for?

cc @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13694)
<!-- Reviewable:end -->
2016-10-12 10:34:10 -05:00
Emilio Cobos Álvarez
79d64f2a38
style: Use progress consistently instead of time. 2016-10-12 10:35:29 +02:00
Emilio Cobos Álvarez
b79689361b
Introduce AnimationValue to manage animated properties in Gecko. 2016-10-12 10:31:22 +02:00
Keith Yeung
668163ec5c Emit TransitionEnd events in the layout thread and process it in the script thread 2016-10-11 19:36:06 -07:00
Nazım Can Altınova
63c329b69d Add decomposition and interpolation of 3D matrices 2016-09-16 12:57:25 +03:00
Nazım Can Altınova
5ee93b28cb Move decompose and recompose functions to impl and implement interpolations 2016-09-07 14:32:23 +03:00
Nazım Can Altınova
10b631dfd1 Implement recompose_matrix function 2016-09-06 18:57:25 +03:00
Nazım Can Altınova
61e2d85435 Implement Interpolate traits for matrix structs 2016-09-06 18:50:38 +03:00
Nazım Can Altınova
32810a9f9e Implement decompose_matrix function 2016-09-06 18:47:30 +03:00
Manish Goregaokar
c965beb3d9
Use conditional compilation for stylo properties 2016-09-02 17:45:48 +05:30
Manish Goregaokar
466df01e71
Review fixups 2016-08-22 22:45:16 +05:30
Manish Goregaokar
979a2798d5 Make Position a gecko-only vector longhand 2016-08-22 22:42:40 +05:30
bors-servo
daee53cb76 Auto merge of #12918 - hsinewu:12902-typedefs, r=Manishearth
12902 typedefs

<!-- Please describe your changes on the following line: -->
Using type alias instead of newtype.
Removing duplicated implementation, it's already inherited.
No more type constructors and foo.0
---
<!-- 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
- [X] These changes fix #12902 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because it's refactoring.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12918)
<!-- Reviewable:end -->
2016-08-22 06:01:03 -05:00
hsinewu
ef9a690c9c Refactor: use type alias instead of newtype 2016-08-22 09:36:19 +08:00
Anthony Ramine
51768844ed Update euclid to 0.10.1 2016-08-21 03:03:45 +02:00
Anthony Ramine
fc58cc01f4 Fix interpolation of CalcLengthOrPercentage (fixes #12765) 2016-08-09 14:47:38 +02:00
Manish Goregaokar
44e33bcdc5
Move Position into its own values module 2016-08-02 15:57:23 +05:30
Simon Sapin
4b7060554b Rename ComputedValuesStruct to ComputedValues.
Doing this in a separate commit avoids mixups
with the ComputedValues trait that the previous commit removed.
2016-07-20 08:42:45 +02:00
Simon Sapin
789807b7b0 Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
Manish Goregaokar
a37eb82da8
Use allow_empty vector longhand for box-shadow 2016-07-15 15:15:28 +05:30
bors-servo
beaef005c2 Auto merge of #11873 - notriddle:rotate_anim, r=glennw
Rotate animation

Add rotation interpolation code for the case where their direction vectors are equal.
___

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11808 (github issue number if applicable).
- [X] There are tests for these 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/11873)
<!-- Reviewable:end -->
2016-07-10 16:30:48 -07:00
Simon Sapin
2d52b13f2f Make geckolib possible to build on stable Rust 2016-07-05 15:37:16 +02:00
bors-servo
ed514d7934 Auto merge of #12159 - notriddle:fix_interpolate_cleanup_regression, r=emilio
Do not crash on partial calc interpolation

It should always be possible to interpolate between CalcLengthOrPercentage points.
____

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12151 (github issue number if applicable).
- [ ] There are tests for these changes  (*I STILL NEED TO WRITE TESTS*)

<!-- 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/12159)
<!-- Reviewable:end -->
2016-07-03 06:35:01 -07:00
Michael Howell
f9a8fe0afe Do not crash on partial calc interpolation
Fixes #12151

Fixes regression introduced by #11924
2016-07-01 21:11:49 -07:00
Emilio Cobos Álvarez
30963dd74d
style: remove is_servo(), as_servo() and as_servo_mut()
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.
2016-07-01 14:22:53 -07:00
Emilio Cobos Álvarez
0216c14c24
style: Cleanup Interpolate code. 2016-06-29 10:03:12 +00:00
Michael Howell
0dd99e6bd2 Normalize the direction vector for rotate 2016-06-28 17:19:34 -07:00
Michael Howell
e10288ec1c Linearly interpolate rotation angles with equal direction
Fixes #11808, but still leaves matrix interpolation open.
2016-06-28 17:18:34 -07:00
Emilio Cobos Álvarez
faed3df594
style: Take down the global animatable props list and use a kwarg instead 2016-06-28 15:28:00 +00:00
Emilio Cobos Álvarez
173f489d7b
style: Add documentation lost in a rebase, plus implement box-shadow animations. 2016-06-28 15:27:59 +00:00
Emilio Cobos Álvarez
9cf2e52d36
tidy: Clean up warnings and tidy lints. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
058bfb39ae
style: Refactor the @keyframes parsing and add adequate computation for it. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
6a362ae8e8
style: Refactor all the animated properties to use the style system properly 2016-06-28 15:09:53 +00:00