Commit graph

76 commits

Author SHA1 Message Date
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
Nazım Can Altınova
67799f9445
Create a generic flag system for properties 2017-04-19 22:08:50 +03:00
Boris Chiou
aca0d24f36 Bug 1357671 - Make animation_type of logical properties be None.
Logical properties will be animatable (with discrete type), but for now
it is still non-animatable, so we assign "None" to the animation_type.

MozReview-Commit-ID: HRYwIhKkpoW
2017-04-19 17:24:19 +08:00
Cameron McCormack
10f2d3c38e style: Add support for property value aliases.
For keyword-typed properties with aliases but no extra_specified values,
the storage of the specified and computed values could be the same,
since value aliases are resolved at parse time.  But to prevent
computed_value::T::parse from recognizing these aliases, we keep the
specified and computed value types distinct.
2017-04-17 11:24:21 +10:00
Cameron McCormack
91e2119636 style: Support the all shorthand.
Fixes #15055.
2017-04-14 15:39:58 +08:00
J. Ryan Stinnett
981571f4f8 Ignore non-margin properties in @page rule
Extend Servo's @page parsing to match Gecko's CSS 2.2 behavior, where only
margin properties are allowed in an @page rule.  Other properties are ignored.

MozReview-Commit-ID: IPYUlnkLYSb
2017-04-09 17:49:41 +08:00
Hiroyuki Ikezoe
03d354afba Rename animatable to animation_type.
animation_type takes following values:

animation_type="none" for non-animatable properties
animation_type="normal" for animatable properties
animation_type="discrete" for animatable but discrete type of animations

We use string value to distinguish the case where no animation_type is
specified.
animation_type="discrete" will be used in a subsequent patch to make a property
animatable as discrete type.
2017-04-07 10:38:28 +09:00
Nazım Can Altınova
a3862780ac
Add flags to longhands for gecko glue
The flags are creates_stacking_context, fixpos_cb and abspos_cb. These will be needed in will-change glue.
2017-03-21 21:10:01 +03:00
Bobby Holley
6744ed1639 Run size_of tests with test-stylo.
MozReview-Commit-ID: KapDMqX6OjH
2017-03-15 11:17:51 -07:00
Karan Singh
3d5b607ba5 Add remaining keyword values of -moz-user-select (fixes #15197) 2017-03-03 16:13:54 +01:00
Manish Goregaokar
b85e1f5f0c stylo: Add helpers for converting Gecko keywords to Servo, use to support keyword pres attrs 2017-02-18 20:31:08 -08:00
Nazım Can Altınova
78afe2b8d1 Box larger specified values to avoid memmove impact 2017-02-09 11:10:08 +01:00
Xidorn Quan
2f2044e4b7 Add gecko leagcy logical properties aliases 2017-01-11 11:17:58 +11:00
Xidorn Quan
e494a0f0a7 Add prefixes parameter for properties 2017-01-11 11:17:55 +11:00
Hiroyuki Ikezoe
ff1db63922 single_keywords supports custom_consts map for enum. r=heycam
We need it to convert PlaybackDirection::Alternate_reverse in Gecko to
alternate-reverse in Servo.
2017-01-10 12:24:59 +09:00
Manish Goregaokar
33966a84fb Support property aliases 2017-01-07 13:17:00 -08:00
Manish Goregaokar
ca6ada8b83 Make spec links mandatory 2017-01-03 14:03:39 -08:00
Manish Goregaokar
29c2db4457 Add spec argument to property helpers 2017-01-03 10:23:02 -08:00
Cameron McCormack
0ff7b5f2de Support declaring keyword property Gecko coverage as inexhaustive.
This allows us to control whether the catchall case in the match expression
that maps Gecko const to Servo enum will be generated.

MozReview-Commit-ID: L65IjTONdfl
2016-12-05 21:38:58 -10: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
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
Ravi Shankar
af8899edf0 Merge keyword and predefined type longhands 2016-10-26 11:56:52 +05:30