Commit graph

153 commits

Author SHA1 Message Date
Manish Goregaokar
1c23296d8a
stylo: Add support for <table> color quirk
MozReview-Commit-ID: 56IKARwfbhw
2017-04-04 21:17:04 -07:00
Emilio Cobos Álvarez
fc72f096a0
style: Properly track whether <angle> or <time> values came from calc() expressions. 2017-03-27 12:42:22 +02:00
Emilio Cobos Álvarez
5ca16a844c
style: Be consistent with naming and serialization of "0" with LenghtOrPercentageOrNumber. 2017-03-26 20:10:50 +02:00
Nazım Can Altınova
494238ab29
Add support for -moz-image-rect 2017-03-25 21:58:36 +03:00
Nazım Can Altınova
645971b387
Rename and move PercentageOrNumber to values 2017-03-25 21:58:32 +03:00
Bobby Holley
63e8367eee Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.

I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.

MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00
Xidorn Quan
0d556ddbf0 Add a predefined integer type 2017-03-17 23:07:57 +11:00
Manish Goregaokar
6b9a6806b8 stylo: Support system colors
MozReview-Commit-ID: HUfTdcMRoEx
2017-03-15 22:33:45 -07:00
Matt Brubeck
16e318d055
Add support for non-standard -moz color keyword values.
Closes #15928
2017-03-14 00:49:08 +01:00
austinprete
a2074f2653 Implement parsing/serialization for caret-color 2017-03-05 10:52:32 -07:00
Emilio Cobos Álvarez
6875c65d37
Bug 1341083: Implement dynamic restyling for display: contents. r=heycam
MozReview-Commit-ID: KimTU2j4V4p
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-25 19:58:56 +01:00
bors-servo
26de7c6bc4 Auto merge of #14740 - glasserc:extremum-length, r=Manishearth
Add support for keyword values for min-width and max-width

This is a follow-up to #14432 which got closed and can no longer be re-opened.

This PR aims to add support for keyword-values max-content, min-content, fit-content, and fill-available to the properties that use them, namely min-width, min-height, max-width, and max-height.

It's still untested because I still haven't figured out how to do that. I guess I should write or find some web page that uses these properties.

Refs #13821.

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

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13821  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

<!-- 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/14740)
<!-- Reviewable:end -->
2017-02-24 14:08:58 -08:00
Nazım Can Altınova
d7c227f614
Fix parsing of ClipRect 2017-02-25 00:10:43 +03: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
c70fb42cea Add docs for grid types 2017-02-20 14:31:30 +05:30
Ravi Shankar
048f1f3316 Auto-generate parsing/serialization code for grid-auto-{rows,columns} 2017-02-20 14:30:46 +05:30
bors-servo
72b76458b7 Auto merge of #15606 - mbrubeck:align-items, r=Manishearth
stylo: Implement align-items and justify-items

Stylo-only patch to match Gecko property support. Part of #15001. r? @Manishearth

<!-- 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/15606)
<!-- Reviewable:end -->
2017-02-18 22:26:06 -08:00
Manish Goregaokar
ff08de8ad1 stylo: Support stroke-dasharray and stroke-dashoffset
MozReview-Commit-ID: 4QKKzJ1DVYP
2017-02-18 02:43:36 -08:00
Manish Goregaokar
51b03fbc7d stylo: Add Gecko bindings for <paint>, use for stroke/fill
MozReview-Commit-ID: 4QKKzJ1DVYP
2017-02-18 02:42:57 -08:00
Manish Goregaokar
fabc1b875b stylo: Add SVGPaint type for <paint>
MozReview-Commit-ID: 4QKKzJ1DVYP
2017-02-18 02:42:55 -08:00
Matt Brubeck
0a0dd11f50 stylo: Implement align-items and justify-items 2017-02-16 15:52:34 -08:00
Matt Brubeck
4de480ec9b style: Implement 'align-self' and 'justify-self' 2017-02-16 13:35:47 -08:00
Matt Brubeck
c70167d17c Stylo: Implement align-content and justify-content 2017-02-14 08:58:55 -08:00
Manish Goregaokar
6b0d3902de Factor out ClipRect type into values; use Either for clip
MozReview-Commit-ID: C3R1erJdiID
2017-02-09 15:09:35 -08:00
Manish Goregaokar
a095565a8c stylo: Implement scroll-snap-destination
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 10:54:19 -08:00
Ravi Shankar
4035bbd738 Split the Length type (introduce NoCalcLength) 2017-01-28 23:33:00 +05:30
Manish Goregaokar
f59557d2f2 Box CalcLengthOrPercentage to reduce inline size of PropertyDeclaration(s) 2017-01-17 08:09:54 -08:00
Boris Zbarsky
369fdddcd9 Bug 1298588 part 13. Make sure Device has a ComputedValues for stylo. r=bholley 2017-01-04 23:13:52 -05:00
Emilio Cobos Álvarez
f37aa12927
style: Prevent more missing docs in the values module. 2016-12-31 12:17:02 +01:00
Emilio Cobos Álvarez
277ef70d39
style: Consistently indent stuff, add a bit of documentation driving by. 2016-12-31 12:16:57 +01:00
bors-servo
9d2b98e6f8 Auto merge of #14598 - DominoTree:master, r=canaltinova
Fix linear gradient's specified form #13892

<!-- Please describe your changes on the following line: -->
WIP for #13892

---
<!-- 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
- [x] These changes fix #13892  (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

<!-- 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/14598)
<!-- Reviewable:end -->
2016-12-16 15:11:29 -08:00
Nick Price
5d56946bc2 Maintain Corner type, add None type to AngleOrCorner 2016-12-16 17:49:15 -05:00
Ravi Shankar
6d9aed9ac3 Add gecko glue for grid-{row,column}-{start,end} 2016-12-16 13:07:08 +05:30
Shing Lyu
64ecb33e17 Reuse box-shadow code for drop-shadow filter 2016-12-13 14:47:02 +08:00
Emilio Cobos Álvarez
6c3458767b
style: Refactor and add infrastructure for font metrics in style.
This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.
2016-11-13 11:54:10 +01:00
Emilio Cobos Álvarez
5f2e7af864
style: Centralize specified url value handling, and refcount urls. 2016-11-10 13:15:21 +01: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
Nazım Can Altınova
7720fe4d9c Move LengthOrNumber to style/values and implement GeckoStyleCoordConvertible 2016-11-06 20:08:31 +03:00
Yuki Izumi
f33f5605ba
Refactor style lengths per #13584 2016-11-06 14:11:37 +11:00
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
7138ad7d7e Bug 1300731 - stylo: Implement mask-image; r?heycam 2016-09-10 15:27:45 +08:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Emilio Cobos Álvarez
d02c5b0281
style: Don't incorrectly clamp values in calc that might not be only lengths.
Expressions with percentages may be negative or positive at computed value time.

So, we can only clamp lengths at computed value time, which is what the other
browsers do.
2016-09-01 23:39:40 -07:00
Emilio Cobos Álvarez
2617d15ed6
style: Properly track whether negative values of calc() are allowed
In order to clamp them at computed value time.
2016-08-30 19:17:16 -07:00
Emilio Cobos Álvarez
be7a44315d
style: Allow calc in media queries. 2016-08-30 13:48:55 -07:00
Ravi Shankar
a04028eede Prefer length and percentage for word spacing 2016-08-09 17:53:40 +05:30