Commit graph

138 commits

Author SHA1 Message Date
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
bors-servo
3fa9ce16db Auto merge of #15594 - mbrubeck:align-content-fix, r=Manishearth
Fix initial value of align-content and justify-content

This fixes a trivial mistake in #15533, caused by me misreading the spec. 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/15594)
<!-- Reviewable:end -->
2017-02-16 18:16:28 -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
33338cab9d Update spec links for align-content and justify-content 2017-02-16 11:55:11 -08:00
Matt Brubeck
4c27304541 Fix initial value of align-content and justify-content 2017-02-16 09:28:24 -08:00
Matt Brubeck
c70167d17c Stylo: Implement align-content and justify-content 2017-02-14 08:58:55 -08:00
bors-servo
aea6797a94 Auto merge of #15466 - hiei23:master, r=Wafflespeanut
-added parsing and serialization for grid-{row,column}-gap

<!-- Please describe your changes on the following line: -->
I have added an implementation for grid-{row,column}-gap based on the predefined type property suggestion in the description

---
<!-- 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
- [ ] These changes fix #15310 (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/15466)
<!-- Reviewable:end -->
2017-02-10 11:28:28 -08:00
hiei23
0701227906 -added parsing and serialization for grid-{row,column}-gap
updated missing products='gecko' in grid-row-gap and grip-column-gap
2017-02-10 13:10:16 -05: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
8b7bb97aa9 stylo: Implement object-position
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 15:09:32 -08:00
Nazım Can Altınova
78afe2b8d1 Box larger specified values to avoid memmove impact 2017-02-09 11:10:08 +01:00
Nazım Can Altınova
abc40f61c0 Replace NoViewportPercentage with a macro 2017-02-09 10:41:16 +01:00
Xidorn Quan
8a8ef48fb3 Add other property aliases 2017-01-11 11:18:01 +11:00
Manish Goregaokar
d63af611f2 Add spec links for position properties 2017-01-03 10:23:04 -08:00
Ravi Shankar
6d9aed9ac3 Add gecko glue for grid-{row,column}-{start,end} 2016-12-16 13:07:08 +05:30
bors-servo
b3cdcfaa39 Auto merge of #14410 - canaltinova:stylo-things, r=Manishearth
Implement 3 more properties for stylo

<!-- Please describe your changes on the following line: -->
Implemented these new properties:

1. Implemented parsing/serialization and stylo glue for `background-blend-mode`.
2. Made `align-items` work for stylo.
3. Implemented parsing/serialization for `-moz-column-rule`.

---
<!-- 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] These changes do not require tests because it's stylo changes.

<!-- 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/14410)
<!-- Reviewable:end -->
2016-11-30 04:15:19 -08:00
Nazım Can Altınova
a067c46e96 Implement background-blend-mode and make align-items work in stylo 2016-11-30 00:52:10 +03:00
Manish Goregaokar
1bd6e5ff9b Support offset- logical properties 2016-11-29 09:27:13 -08:00
Ravi Shankar
dee1a65a69 Use the ParserContext along with Parser in the parse function 2016-11-27 08:49:20 +05:30
Nazım Can Altınova
c8c7240dc2 Implement gecko glue for column-gap and order properties 2016-11-23 01:50:55 +03:00
bors-servo
4b9693cf81 Auto merge of #14120 - Manishearth:logical, r=emilio
Support logical properties in style

Adds support for the logical block-end/inline-start/etc properties. These properties (like `border-block-end-color`) map to "physical" properties (e.g. `border-top-color`) depending on the writing mode.

Todo:

 - [x] Handle shorthands
 - [x] Make geckolib setters work
 - [x] Handle padding/offset logical properties
 - [x] Perhaps handle `-block-size`, `-inline-size` type logical properties?
 - [x] Tests?

This will overall add 16 new longhands and 4 new shorthands, taking a big bite out of the [remaining properties work](https://manishearth.github.io/css-properties-list/?stylo=hide&servo=hide&firefox=only&chrome=show&mdn=false&alexa=false)

f? @emilio @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/14120)
<!-- Reviewable:end -->
2016-11-11 15:41:08 -06:00
Manish Goregaokar
5fad7b0ff6 Add support for inline-size, block-size, and max-*-size/min-*-size 2016-11-11 11:56:27 -08:00
Patrick Walton
05f738409e style: Turn the CSS flexible box model on by default.
See
https://groups.google.com/forum/#!topic/mozilla.dev.servo/MWBms2_BMJo
for discussion.
2016-11-08 10:13:48 +01:00
Ravi Shankar
6061985898 Prefer Servo-specific ToCss for all types 2016-11-07 09:14:22 +05:30
Manish Goregaokar
c965beb3d9
Use conditional compilation for stylo properties 2016-09-02 17:45:48 +05:30
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
Cameron McCormack
fd09035c65 Disable align-items in geckolib. 2016-07-05 17:34:57 -07:00
Emilio Cobos Álvarez
faed3df594
style: Take down the global animatable props list and use a kwarg instead 2016-06-28 15:28:00 +00:00
Simon Sapin
00b6210519 Make the style crate almost build on stable Rust.
`discriminant_value` will need to be replaced with something else later.
2016-06-22 15:44:13 +02:00
Pu Xingyu
f4b8f9766c Fixup for align-self and tests
This is a fixup for `align-self`, the computed value of which should now
properly inherit `align-items` value of its parent. Additional passed
tests is also removed from ini folder. Fixup for geckolib errors.
2016-06-01 00:15:28 +08:00
Pu Xingyu
a7733b38d4 Add remaining longhand flexbox style properties
Add the remaining longhand CSS properties of flexbox for servo,
including `flex-wrap`, `flex-grow`, `flex-shrink`, `justify-content`,
`align-items`, `align-self` and `align-content`.

tests for the remaining longhand properties are also enabled. Test for
default value of `align-self` is modified because the new default value
for this property is "auto" is current flexbox CR.
2016-05-25 21:40:34 +08:00
Cameron McCormack
550d780e17 Move width and height from Box to Position.
This helps with style struct alignment between Servo and Gecko.
2016-05-04 11:06:42 +10:00
Cameron McCormack
53649b19d0 Support flex-{grow,shrink}, stroke-miterlimit and -moz-box-flex in geckolib. 2016-05-03 10:01:31 +10:00
Cameron McCormack
88f51af3f8 Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues.
While we're here we also:

* remove any code conditional on style_struct.gecko_ffi_name, since all
  style structs now do have a corresponding Geckos struct

* add new UIReset and XUL style structs, so that all Gecko structs are
  now present (apart from Variables, which is special)
2016-04-27 17:13:26 +10:00
Per Lundberg
4e8831457a Moved the rest of the longhand structs to separate files.
Sorry for the bulk size of this; I know already it's not going to be a fun thing to review. Nevertheless, it should be done so we finalize the split of this huge file into smaller, more maintable parts.

The content of stuff being moved to separate files is unchanged. Only some minor formatting changes have been made and similar, but nothing of particular interest. IMHO it should be safe to merge if all the tests are fine.
2016-04-25 21:36:58 +03:00
Per Lundberg
4643737a1b Applied a bunch of suggestions from Simon. 2016-04-21 22:42:35 +03:00
Per Lundberg
d0489f1160 Improve properties.mako.rs file structure, take 2
This is a new attempt of #10586, after Simon Sapin's great cleanups in #10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
2016-04-21 22:42:35 +03:00