Commit graph

46 commits

Author SHA1 Message Date
bors-servo
b3ad71353b Auto merge of #13917 - Wafflespeanut:keywords, r=Manishearth
Remove usage of 'keyword_list'

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

We're using `keyword_list` to generate code for some of the animation properties. This could be achieved with `single_keyword` (passing `vector=True`).

---

<!-- 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 build-geckolib` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup

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

r? @emilio

<!-- 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/13917)

<!-- Reviewable:end -->
2016-11-17 14:34:33 -06:00
Ravi Shankar
b5bc2a1f53 Remove Mako helper: keyword_list 2016-11-17 23:41:48 +05:30
Ravi Shankar
c51db9f5f1 Remove usage of keyword_list (and prefer single_keyword) 2016-11-17 23:41:38 +05:30
bors-servo
8c6703637f Auto merge of #14223 - Manishearth:fix-logical-cascade, r=emilio
Delegate logical bitfield setters to physical to fix cascade

(fixes #14222)

Five minutes early for "tomorrow", _shrug_.

I'm not entirely sure of this fix. It depends on properties going through the cascade in source order all else being the same. I think that's the case.

Fixes wikipedia though.

r? @emilio or @SimonSapin

<!-- 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/14223)
<!-- Reviewable:end -->
2016-11-16 19:10:25 -06:00
Manish Goregaokar
3cab0e6919 Delegate logical bitfield setters to physical to fix cascade (fixes #14222) 2016-11-14 23:53:14 -08:00
Artem Biryukov
9564673b5a Fix related to #14101
Add Parse trait implementation for some structures
2016-11-12 05:26:15 +03:00
bors-servo
4b9693cf81 Auto merge of #14120 - Manishearth:logical, r=emilio
Support logical properties in style

Adds support for the logical block-end/inline-start/etc properties. These properties (like `border-block-end-color`) map to "physical" properties (e.g. `border-top-color`) depending on the writing mode.

Todo:

 - [x] Handle shorthands
 - [x] Make geckolib setters work
 - [x] Handle padding/offset logical properties
 - [x] Perhaps handle `-block-size`, `-inline-size` type logical properties?
 - [x] Tests?

This will overall add 16 new longhands and 4 new shorthands, taking a big bite out of the [remaining properties work](https://manishearth.github.io/css-properties-list/?stylo=hide&servo=hide&firefox=only&chrome=show&mdn=false&alexa=false)

f? @emilio @SimonSapin

<!-- 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/14120)
<!-- Reviewable:end -->
2016-11-11 15:41:08 -06:00
Manish Goregaokar
5fad7b0ff6 Add support for inline-size, block-size, and max-*-size/min-*-size 2016-11-11 11:56:27 -08:00
Manish Goregaokar
e34eb13d65 Support logical properties 2016-11-11 11:55:57 -08: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
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Cameron McCormack
2d232cecb2 Support url() values in background-image and mask-image in stylo. r=manishearth
MozReview-Commit-ID: 7IUzzVV9rOi
2016-10-28 19:29:01 +08:00
Ravi Shankar
12f429e23b Keyword argument for custom constant mapping 2016-10-26 11:56:54 +05:30
Cameron McCormack
75e97c02dc Factor out a UrlOrNone value type and make -moz-binding use it.
MozReview-Commit-ID: L57QEf40e2m
2016-10-16 11:32:57 +08:00
Nazım Can Altınova
26c98edd68 Implement parsing of all gradients 2016-10-09 22:53:15 +03:00
Manish Goregaokar
d81c6af59c Add from_computed_value() function for converting computed values to specified 2016-09-23 09:44:32 +05:30
Manish Goregaokar
f29b748a59 Fix serialization of initial/inherit shorthands 2016-08-22 22:42:44 +05:30
Manish Goregaokar
69ada0d7a3 Support multiple backgrounds in servo layout 2016-08-22 22:42:43 +05:30
Manish Goregaokar
66cdf9ae4f Support serializing vector backgrounds in shorthand form 2016-08-22 22:42:41 +05:30
Manish Goregaokar
65a8a8dccb Make most background- properties handle arrays 2016-08-22 22:42:39 +05:30
Manish Goregaokar
ce9640a48e Support possibly-vector keyword properties 2016-08-22 22:42:38 +05:30
David Raifaizen
3831c0650c Adding support for correct shorthand serialization 2016-08-16 22:28:51 -04:00
Emilio Cobos Álvarez
9e88a495c8
style: Introduce a generic way of gathering information from the cascade, and use it for viewport units. 2016-08-16 10:58:16 -07:00
Manish Goregaokar
c8bff6151e
Resync stylo bindings
Now at gecko-dev acf1cc9adeffe040dcdf7b7cf454cdd9657761e5
2016-07-26 15:14:24 +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
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
Manish Goregaokar
e21828080b
Error when non-allow_empty property is empty 2016-07-16 11:01:03 +05:30
Manish Goregaokar
a37eb82da8
Use allow_empty vector longhand for box-shadow 2016-07-15 15:15:28 +05:30
Manish Goregaokar
b6edae2f5e
Add allow_empty to vector_longhand 2016-07-15 15:15:26 +05:30
Manish Goregaokar
34c82d6e78
Replace gecko_autoarray_longhand with configurable vector_longhand 2016-07-15 15:15:23 +05:30
Manish Goregaokar
209255b20a Address review comments 2016-07-14 12:35:34 +05:30
Manish Goregaokar
b1a3831bf6 Add framework for properties which are single elements in servo and arrays in gecko 2016-07-14 12:34:04 +05:30
Emilio Cobos Álvarez
411ae84908
style: Add support to the animation shorthand and fix parsing of animation-name. 2016-07-07 16:05:22 -07:00
Simon Sapin
2d52b13f2f Make geckolib possible to build on stable Rust 2016-07-05 15:37:16 +02:00
Emilio Cobos Álvarez
ba53c4ea8d
style: Add a generic way to deal with lists of values, ditch all uses of as_servo in style/animations.rs 2016-07-01 14:22:52 -07:00
Emilio Cobos Álvarez
818bc6d4a2
style: parse the remaining animation longhands. 2016-06-28 15:09:53 +00:00
Cameron McCormack
44bdbed989 Support -moz-binding in geckolib. 2016-05-24 12:12:34 +10:00
Cameron McCormack
2b8f809852 Allow shorthands to be restricted to specific products. 2016-05-11 11:10:42 +10:00
Cameron McCormack
330c47f78e Support {flood,lighting,stop,text-decoration}-color in geckolib. 2016-05-04 09:44:12 +10:00
Cameron McCormack
d69763b0c1 Generate geckolib setters for properties with simple predefined types. 2016-05-03 10:01:28 +10:00
Per Lundberg
38f90a3e2e Extracted shorthands to separate files.
I've deliberately tried to keep things similarly structured as in the longhand files. I.e. if a given property is in e.g. longhand/box.mako.rs, the shorthand stuff that relates to the same property is in shorthand/box.mako.rs and so forth.
2016-04-26 23:12:35 +03:00
Bobby Holley
980c814e2a Manually implement the display property for now. 2016-04-21 23:57:31 -07:00
Bobby Holley
456b05e9cf Make predefined_type use kwargs. 2016-04-21 23:57:28 -07:00
Per Lundberg
4643737a1b Applied a bunch of suggestions from Simon. 2016-04-21 22:42:35 +03:00