Jonathan Kew
33ead015b1
style: Make 'font' shorthand reset the 'font-variation-settings' property.
...
As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop
See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983
Basically, make font-variation-settings work in the same way as font-feature-settings
already does.
2018-03-04 12:26:32 +00:00
Jonathan Kew
93b7d01324
style: Add font-optical-sizing property.
...
Bug: 1435692
Reviewed-by: emilio
2018-03-03 20:42:40 +01:00
Emilio Cobos Álvarez
3fd5f796f0
style: Handle properly potentially-disabled longhands in a shorthand.
2018-02-28 12:04:49 +01:00
Anthony Ramine
761689f32d
Replace PositiveIntegerOrAuto by ColumnCount
...
It was its only use.
2018-02-22 10:16:46 +01:00
Anthony Ramine
b44ffcf498
Replace IntegerOrAuto with ZIndex
...
It's its only use.
2018-02-20 15:18:22 +01:00
Anthony Ramine
aa7cc261f8
Determine animated types from specified types
2018-02-10 16:31:48 +01:00
bors-servo
41fb6ed1ff
Auto merge of #19980 - servo:derive-all-the-things, r=emilio
...
Merge all keyword arms in Clone for PropertyDeclaration 🐉 🐲
<!-- 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/19980 )
<!-- Reviewable:end -->
2018-02-09 16:17:01 -05:00
Manish Goregaokar
8c2b7b41ef
Autogenerate compute_damage ( fixes #10622 )
2018-02-09 08:48:04 -08:00
Anthony Ramine
5d8e70dc27
Avoid pattern matching to clone Copy variants of PropertyDeclaration 🐉 🐲
2018-02-09 12:10:42 +01:00
Emilio Cobos Álvarez
32c409d5aa
style: Get rid of gecko_size_type.
...
This also fixes a style sharing issue with MaxLength, anecdotally.
2018-02-07 02:05:30 +01:00
Anthony Ramine
5195eb38f2
Make all PropertyDeclaration variants have only one field
2018-02-06 13:45:18 +01:00
Emilio Cobos Álvarez
9dc25ed214
style: Remove "derived" properties and the concept of "custom cascade".
2018-01-14 17:10:44 +01:00
Emilio Cobos Álvarez
37cd870a9e
style: Make to_camel_case support numbers too.
...
This is needed to convert preserve-3d into Preserve3d.
2017-12-05 23:36:14 +01:00
Simon Sapin
aaba33e56b
Fix Stylo tests to pass on both Stable and Nightly Rust.
...
This is on top of https://github.com/servo/servo/pull/19285 .
Rust Nightly has new enum memory layout optimizations:
https://github.com/rust-lang/rust/pull/45225
2017-11-21 12:24:08 +01:00
Emilio Cobos Álvarez
01e41d0439
style: Replace "internal" properties with "enabled_in"
...
This allows enabling properties in ua sheets and chrome differently.
The setup is:
* enabled_in needs to be one of the four values:
["", "ua", "chrome", "content"]
* "chrome" implies "ua", and implies that they're explicitly enabled.
* "" implies the property will never be parsed.
* "content" implies the property is accessible unconditionally, modulo a pref.
Experimental still keeps trumping over those when the pref is enabled.
This PR replaces uses of internal="" by enabled_in="ua" or enabled_in="".
This may seem that it changes behavior, but since the properties where I added
enabled_in="" already unconditionally error from parse it's not.
Next step is annotating chrome-only properties.
2017-11-18 05:15:19 +01:00
Emilio Cobos Álvarez
bbfb7a47eb
style: Add machinery to handle properties enabled in chrome.
2017-11-16 21:00:44 +01:00
Emilio Cobos Álvarez
128bb02e1d
style: Remove now unused gecko_pref_ident.
2017-11-16 14:31:37 +01:00
Emilio Cobos Álvarez
2bd91d21d7
style: Replace Gecko's hacky EXPERIMENTAL set with the same mechanism as servo.
...
We can remove the PREF_foo bits in a bit.
2017-11-16 14:31:36 +01:00
Emilio Cobos Álvarez
187d28c732
style: Add gecko_pref annotation to the properties.
2017-11-16 02:44:35 +01:00
Emilio Cobos Álvarez
f4683d1718
style: Change experimental to servo_pref.
2017-11-16 02:44:13 +01:00
Keith Yeung
6f59a45cdc
Move text-decoration-line out of mako
2017-11-14 13:13:23 -08:00
Emilio Cobos Álvarez
aa0fe64a0d
style: Remove unused extra_servo_aliases.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:19 +02:00
Emilio Cobos Álvarez
680f8368ef
style: No more need_clone.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:18 +02:00
Emilio Cobos Álvarez
d30c5e16b2
style: remove unused Longhand::has_uncacheable_values.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:17 +02:00
Emilio Cobos Álvarez
e3f4471ab7
style: Kill longhand::depend_on_viewport_size
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:16 +02:00
Anthony Ramine
aea0cd7ec7
Introduce values::animated::Animate
...
This replaces the Animatable trait and merges its three former methods into a single one.
2017-08-22 09:41:01 +02:00
Nazım Can Altınova
6893446b71
Add a pref checking mechanism for alias properties
2017-08-16 13:23:14 -07:00
bors-servo
32f835260c
Auto merge of #17984 - Manishearth:rm-testing, r=SimonSapin
...
Remove style/testing feature
We added this because a year ago we had no reliable Gecko CI. This meant that Gecko-only properties needed to be tested *somehow*, and we solved that by making it so that for unit tests we compile all properties, not just the servo ones.
This was useful back then, but I don't think we need this anymore. We have reliable Gecko CI, and all the gecko-only stuff we tested is adequately handled by the properties-database parsing mochitests. It's a bit of annoying cruft that just complicates things; we probably should remove it.
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/17984 )
<!-- Reviewable:end -->
2017-08-08 07:35:29 -05:00
Manish Goregaokar
2ebce54d75
Remove testing feature from style crate
2017-08-07 14:30:31 -07:00
Boris Chiou
ebedea5860
Bug 1374233 - Part 11: Implement ToAnimatedValue for background-size.
...
MozReview-Commit-ID: DMcvpaqHdy9
2017-08-04 14:23:26 +08:00
Brian Birtles
8e7011da8a
Iterate through properties in priority order when computing keyframes
...
This is largely just a translation of Gecko's
PropertyPriorityIterator[1] into rust with the exception that IDL sort
order is only defined for shorthands since that's all we currently
require.
[1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/dom/animation/KeyframeUtils.cpp#151
2017-07-24 13:50:18 +09:00
bors-servo
d52a08a5c5
Auto merge of #17568 - upsuper:user-select, r=Manishearth
...
Handle prefixed value of -moz-user-select properly
This is supposed to fix [bug 1374996](https://bugzilla.mozilla.org/show_bug.cgi?id=1374996 ).
<!-- 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/17568 )
<!-- Reviewable:end -->
2017-07-03 21:56:19 -07:00
Cameron McCormack
477a69d725
style: Make "internal" and "experimental" interact in the same way as Gecko.
2017-06-29 22:21:40 -07:00
Xidorn Quan
9299a0dc2c
Handle prefixed value of -moz-user-select properly
2017-06-29 14:37:28 -07:00
Brian Birtles
e74f7792f5
Make TransitionProperty treat all properties that are not transitionable as unsupported
...
Currently properties that are discretely animated cannot be
transitioned. Now that TransitionProperty should only be used for
transitions, we can redefine it to treat non-transitionable properties
as unsupported. This should allow us to simplify the code and make it
more self-documenting (e.g. making TransitionProperty actually relate to
transitions).
2017-06-15 10:19:48 +09:00
Brian Birtles
09c2b1b930
Move definition of animatable for shorthands to Shorthand object
...
By moving this definition to the Shorthand object we can more easily
re-use it in subsequent patches in this series.
2017-06-15 10:11:34 +09:00
Xidorn Quan
742c45f859
Remove complex_color parameter.
2017-06-08 12:59:24 +10:00
Cameron McCormack
c768169149
style: Add support for disabled document colors.
2017-05-30 16:25:08 +08:00
Mantaroh Yoshinaga
c71abc0c28
Make font-stretch animatable.
2017-05-19 09:06:00 +09:00
Xidorn Quan
5b4f0686c7
Make font-feature-settings a subprop of font
2017-05-13 17:26:23 +10:00
Manish Goregaokar
c85aae4abd
Add iterators for vector types
...
MozReview-Commit-ID: I7oOpYhVP5S
2017-05-04 07:15:16 -07:00
Anthony Ramine
0e7308e6dc
Implement the unitless length quirk for font-size
2017-04-27 10:42:08 +02:00
Hiroyuki Ikezoe
d70e4aa229
Use IntermediateRGBA to store overflowed RGBA components during interpolation.
2017-04-24 15:40:20 +09:00
Hiroyuki Ikezoe
e47d30f668
Rename 'normal' of animation_value_type to 'ComputedValue'.
2017-04-24 15:40:13 +09:00
Hiroyuki Ikezoe
94fb839fdd
Rename animation_type to animation_value_type.
2017-04-24 15:23:39 +09:00
Manish Goregaokar
8bfcc6992e
tidy and test fixes
2017-04-21 14:53:27 -07:00
Manish Goregaokar
795ab74f04
stylo: System font support for bitflag properties and font-language-override
2017-04-21 14:53:23 -07:00
Manish Goregaokar
83484c7054
stylo: System font support for font-size-adjust
2017-04-21 14:53:21 -07:00
Manish Goregaokar
5184f29e10
stylo: System font support for font-weight
2017-04-21 14:53:20 -07:00
Manish Goregaokar
b0dcb72722
stylo: System font support for keyword font longhands
2017-04-21 14:53:18 -07:00