Commit graph

138 commits

Author SHA1 Message Date
Daisuke Akatsuka
34980689a7 implements nsStyleGridLine type properties animatable 2017-07-05 12:55:51 +09:00
Daisuke Akatsuka
983361eb0f implements nsStyleCoord type properties animatable 2017-07-05 12:54:45 +09:00
Nazım Can Altınova
8827cb1440 Fix 'grid' shorthand serialization 2017-07-03 17:08:09 -07:00
Ravi Shankar
9d9d99ec25 Switch to GridTemplateComponent for subgrid line names 2017-07-03 17:08:00 -07:00
Anthony Ramine
bc9bc1d340 Rename LengthOrPercentageOrAutoOrContent to FlexBasis 2017-06-17 13:46:35 +02:00
bors-servo
061cb5f48e Auto merge of #16752 - jdm:css-parse-error, r=SimonSapin
Report more informative CSS errors

This requires https://github.com/servo/rust-cssparser/pull/143 for the final commit. There's no better way to split that work up, unfortunately, and it's extremely easy to bitrot. I would appreciate if we could expedite reviewing this work.

This is the work necessary to enable https://bugzilla.mozilla.org/show_bug.cgi?id=1352669. It makes sense to merge it separately because it's so much effort to keep it up to date with the ongoing Stylo work.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/16752)
<!-- Reviewable:end -->
2017-06-09 14:31:48 -07:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
bors-servo
88b47b0154 Auto merge of #17253 - dadaa:bug1368610, r=hiikezoe,nox,emilio
Bug1368610 - stylo: implement primitive (bit, uXX) type of discrete animatable properties

<!-- Please describe your changes on the following line: -->
This PR is to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1368610

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes. The tests will land in dom/animation/test of m-c. Test code is patch 6 of https://bugzilla.mozilla.org/show_bug.cgi?id=1368610

<!-- 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/17253)
<!-- Reviewable:end -->
2017-06-09 10:01:35 -07:00
Daisuke Akatsuka
9751fb9358 Implements other bit type properties animatable 2017-06-09 23:46:37 +09:00
Daisuke Akatsuka
21b7b256c2 Implements bitflags properties animatable 2017-06-09 23:46:11 +09:00
Anthony Ramine
c8c6f3482f Implement ToCss for str and String 2017-06-08 11:13:39 +02:00
daisuke
f46678cea8 Implements position related discrete animatable properties 2017-05-29 23:10:02 +09:00
daisuke
917dbdfdbd Implements simple discrete animatable properties 2017-05-29 16:08:09 +09:00
Ravi Shankar
7b68d8d8bf Add shorthand parsing/serialization for grid-template 2017-05-24 19:45:34 +05:30
Ravi Shankar
7dbd17bf70 Fix parsing bugs in grid-gap and grid-line 2017-05-23 21:42:13 +05:30
Hiroyuki Ikezoe
d06af8971d Support prefixed intrinsic size value for flex-basis.
auto() and zero() are used in the parser for flex shorthand property.
2017-05-21 08:33:12 +09:00
Hiroyuki Ikezoe
3a3bc03eb8 Support prefixed intrinsic size value for {width,height,{inline,block}-size}}. 2017-05-21 08:33:12 +09:00
Hiroyuki Ikezoe
aba0db0943 Factor out implemantations for {min,max} size properties as a macro. 2017-05-21 08:33:12 +09:00
Hiroyuki Ikezoe
57c27e5d35 Rename MinLength to MozLength.
So that we can reuse this for non-min-prefixed properties (e.g. width).
2017-05-21 08:33:12 +09:00
Hiroyuki Ikezoe
95bda2dff9 Combine LengthOrPercentage and Auto into LengthOrPercentageOrAuto for {Min,Max}Length. 2017-05-21 08:33:12 +09:00
Anthony Ramine
00bfc6b172 Remove a lot of unused imports 2017-05-20 15:23:19 +02:00
Anthony Ramine
90bae7f802 Derive HasViewportPercentage 🍷 2017-05-20 14:48:04 +02:00
Ravi Shankar
825e6db37e Add gecko glue for grid-template-{rows,columns} 2017-05-18 21:59:31 +05:30
Ravi Shankar
0c68471b5e Auto-generate code for grid-template-{rows,columns} 2017-05-18 21:57:29 +05:30
Anthony Ramine
3c68c28ff7 Implement grid-template-areas (fixes #16079) 2017-05-04 19:10:45 +02:00
Anthony Ramine
37118e1e45 Implement the unitless length quirk for physical size extremums 2017-04-27 10:42:18 +02:00
Anthony Ramine
65f74ea934 Implement the unitless length quirk for physical size properties 2017-04-27 10:42:10 +02:00
Anthony Ramine
46913ffe1d Implement the unitless length quirk for position properties 2017-04-27 10:42:04 +02: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
Nazım Can Altınova
67799f9445
Create a generic flag system for properties 2017-04-19 22:08:50 +03:00
J. Ryan Stinnett
1a31b87c22 Pass ParserContext down to lengths
To make it possible to check the rule type when parsing lengths, we need to pass
the `ParserContext` down through many layers to the place where length units are
parsed.

This change leaves it unused, so it's only to prepare for the next change.

MozReview-Commit-ID: 70YwtcCxnWw
2017-04-12 16:40:48 +08:00
Manish Goregaokar
9dbbb97ddd stylo: Use prefixed values in ExtremumLength 2017-04-12 12:02:12 +08:00
Hiroyuki Ikezoe
53b4cc3593 Make align-items animatable as discrete type. 2017-04-07 10:38:34 +09: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
Emilio Cobos Álvarez
846c950b6b
style: More cleanups around length parsing and viewport rule parsing. 2017-04-06 20:56:24 +02:00
Carlos Martinez
b85f1a0240 Reject negative values of flex-basis.
Fixes #15902
2017-04-05 18:59:09 +02:00
Emilio Cobos Álvarez
17f055cd78
style: Re-introduce the -webkit- prefix for the order property.
I accidentally removed it while converting "order" to a predefined type
in #16144.
2017-03-27 18:02:58 +02:00
Emilio Cobos Álvarez
8205a0de90
style: Properly handle calc inside integer expressions. 2017-03-27 12:42:25 +02:00
Lucjan Suski
99aee290db Stylo: Add gecko glue for grid-auto-flow 2017-03-22 11:09:23 +01: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
George White
00da1eb810 Add parsing/serialisation for 'grid-auto-flow' 2017-03-18 23:38:31 +05:30
Xidorn Quan
9233882d49 Switch z-index to use predefined integer type 2017-03-17 23:08:03 +11:00
Nazım Can Altınova
bae7c50ef7
Fix wrong initial values in various single keyword properties 2017-03-10 17:18:22 +03:00
Nazım Can Altınova
aa5477bd34
Change predefined type of flex-basis / make gecko glue auto-generate
Gecko doesn't support content value in flex-basis yet.
2017-03-10 03:14:06 +03:00
Manish Goregaokar
3721b8b6a9 Disallow keyword values in min/max-size properties in the block direction 2017-02-25 23:26:21 -08:00
Ethan Glasser-Camp
dd4f331603 Add support for MaxLength
This builds on the ExtremumLength type from the previous commit.
2017-02-24 15:44:49 -05:00
Ethan Glasser-Camp
76de979231 Implement a MinLength type
Implement an ExtremumLength type which contains all the enumerated
keyword values for min-width, min-height, max-width, and
max-height. Then, implement a MinLength which can be used for min-width
and min-height. So far this just maps to Gecko values.

Refs #13821.
2017-02-23 16:28:26 -05:00
Ravi Shankar
048f1f3316 Auto-generate parsing/serialization code for grid-auto-{rows,columns} 2017-02-20 14:30:46 +05:30
Ravi Shankar
7099743bbf Cleanup grid mako 2017-02-20 14:29:46 +05:30