Commit graph

114 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
be9acba801
style: Introduce PropertyDeclaration::to_physical.
Bug: 1309752
Reviewed-by: heycam
MozReview-Commit-ID: FAL04K5G948
2018-07-24 03:27:56 +02:00
Sylvestre Ledru
498592ff61
style: autopep8
Bug: 1468273
Reviewed-by: ted
MozReview-Commit-ID: 8j8EU3E08GP
2018-07-24 03:26:12 +02:00
Cameron McCormack
f526af7f01
style: Remove angle values from image-orientation.
Bug: 1473450
Reviewed-by: emilio
MozReview-Commit-ID: FB74ILJM6Fm
2018-07-16 19:42:12 +02:00
Emilio Cobos Álvarez
a4dcb33986
style: Make StyleStruct.name_lower snake case.
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: A3TpDTmFgF
2018-06-23 20:35:49 +02:00
Emilio Cobos Álvarez
d65b29da27
style: Add CssPropFlags::SerializedByServo and use it on some simple properties.
The idea is to turn the simple properties into a blacklist instead really soon,
and fix the offending ones soon after, so that only shorthands and properties
with layout dependence (and maybe the scrollbar properties, because the poke at
LookAndFeel) are not serialized by Servo.

Bug: 1467536
Reviewed-by: xidorn
MozReview-Commit-ID: JTLNnmXzny8
2018-06-12 12:15:16 -07:00
Emilio Cobos Álvarez
32c6d5b7c6
style: Refactor vector types.
This fixes clamping of mask-size and moves it out of mako while at it.

Bug: 1462829
Reviewed-by: hiro,xidorn
MozReview-Commit-ID: 9hiTe63odna
2018-05-28 15:37:28 +02:00
Xidorn Quan
4ab0e85ed5
style: Consistently use top-right-bottom-left order for physical sides.
Bug: 1454591
Reviewed-by: heycam
MozReview-Commit-ID: 6pLRSO8YNDI
2018-05-19 10:15:17 +02:00
Xidorn Quan
78f9672b6c
style: Generate property list from Servo data.
Bug: 1452542
Reviewed-by: emilio,froydnj
MozReview-Commit-ID: CwK2oL88r6F
2018-04-28 10:26:01 +02:00
Xidorn Quan
ff9325de5e
style: Use snake_case naming for nsCSSPropertyID of alias as well.
Bug: 1452542
Reviewed-by: emilio
MozReview-Commit-ID: 242ms8wBDIU
2018-04-28 10:26:00 +02:00
bors-servo
087bd20b6d
Auto merge of #20657 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit from details.
2018-04-17 14:06:08 -04:00
Xidorn Quan
b11c3f1f45
style: Remove trailing underscore of float ident.
Bug: 1454528
Reviewed-by: heycam
MozReview-Commit-ID: DN7rQu3adSB
2018-04-17 20:02:16 +02:00
Xidorn Quan
7403ec8b70
style: Support prefs for aliases.
Bug: 1453521
Reviewed-by: heycam
MozReview-Commit-ID: 8DAFmLDVYlR
2018-04-16 20:15:13 +02:00
Xidorn Quan
1599357cff Make nscssproperty a method of longhand/shorthand/alias class. 2018-04-11 15:55:11 +10:00
Xidorn Quan
2aee174b6d Put alias instances into {longhand,shorthand}.alias. 2018-04-11 15:55:09 +10:00
Hiroyuki Ikezoe
162d563180 Don't make logical properties animatable
|animation_type| was renamed in 94fb839fdd, but the commit missed renaming
one place.  It means that some of logical properties might have been
accidentally animatable.  Logical properties should be animatable but we
haven't yet implemented the proper Animate trait for logical properties.
2018-04-10 09:43:20 +09:00
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