Commit graph

321 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
18f09289ce
style: Inline a few functions that are just another function call 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
058bfb39ae
style: Refactor the @keyframes parsing and add adequate computation for it. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
6a362ae8e8
style: Refactor all the animated properties to use the style system properly 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
818bc6d4a2
style: parse the remaining animation longhands. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
f529786700
style: Add animation-iteration-count parsing under experimental flag 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
b6ecb1ccb1
style: Add animation-timing-function parsing as experimental. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
c80084cd29
style: Add animation-duration parsing under experimental flag 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
60192bb830
style: Refactor to pass animations cleanly, land animation-name parsing as experimental 2016-06-28 15:09:53 +00:00
Simon Sapin
f3d6859ab7 Replace usage of std::intrinsics::discriminant_value in properties.mako.rs 2016-06-28 06:46:40 +02:00
Ms2ger
f82cf3da12 Merge AuExtensionMethods and LocalToCss. 2016-06-23 15:39:56 +02: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
Simon Sapin
ea73c8efac Make it possible to build the style_traits crate with a stable compiler.
Testing this on CI to make sure we don’t regress it is blocked on #11806
2016-06-22 15:40:53 +02:00
Emilio Cobos Álvarez
fa6dd1d61b
stylo: Support the rest of the background-xxx P1 properties.
We do the same that with background-{image, repeat}, we just use the first
element until servo can parse and use a list efficiently.
2016-06-15 11:49:57 +02:00
Bobby Holley
decf8c40f7
Stop mapping overflow-wrap to mWordWrap.
This was fixed in gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=955857
2016-06-01 14:07:04 +02:00
bors-servo
8caa17a466 Auto merge of #11445 - mbrubeck:line-height, r=emilio
Support line-height in geckolib

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11445)
<!-- Reviewable:end -->
2016-06-01 05:58:56 -05:00
bors-servo
f0b3d1e77d Auto merge of #11417 - stshine:flex-longhand-properties, r=mbrubeck
Support remaining longhand flexbox style properties for servo

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

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.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11417)
<!-- Reviewable:end -->
2016-05-31 21:44:06 -05: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
Mitchell Hentges
41d26700b2 Allow either comma or space seperated css rect() 2016-05-30 20:13:18 +02:00
Matt Brubeck
1389fbe6ff Support line-height in geckolib 2016-05-26 11:51:25 -07:00
bors-servo
73b4042bb3 Auto merge of #11412 - heycam:text-deco, r=mbrubeck
Support remaining text-decoration related properties in geckolib

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 --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because mostly it's geckolib-only, and the servo-relevant changes should be covered by existing tests

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

----

Not sure if there's a better way to do the loop in the text-decoration(-line) longhand parsing, having all of the guts in the loop condition is a bit awkward.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11412)
<!-- Reviewable:end -->
2016-05-25 20:35:50 -05:00
Cameron McCormack
0580e1854e Support text-decoration-line and the text-decoration shorthand in geckolib. 2016-05-26 11:06:37 +10:00
Cameron McCormack
53a9defa9f Don't consume invalid idents when parsing text-decoration. 2016-05-26 11:06:30 +10:00
bors-servo
92ae502765 Auto merge of #11427 - mbrubeck:under-display-none, r=pcwalton
Stop generating flows under display: none.

Because this is a bottom-up traversal it can generates flows and throw them away. To prevent that, this cascades an internal `-servo-under-display-none` property and then checks that during flow construction.  Fixes #1536.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11427)
<!-- Reviewable:end -->
2016-05-25 18:29:48 -05:00
Matt Brubeck
5c09e26e55 Stop generating flows under display: none.
Because this is a bottom-up traversal it can generates flows and throw them away. To prevent that, this cascades an internal `-servo-under-display-none` property and then checks that during flow construction.  Fixes #1536.
2016-05-25 11:54:21 -07:00
bors-servo
7ad3c313d3 Auto merge of #11401 - heycam:moz-box, r=mbrubeck
Support display:-moz-(inline-)box in geckolib.

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 --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are geckolib-only changes

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

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11401)
<!-- Reviewable:end -->
2016-05-25 13:49:23 -05: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
61fd5e79f7 Make text-decoration-style initial value 'solid'. 2016-05-25 18:25:28 +10:00
David Raifaizen
f6bbeae67f Removing unnecessary field from serialization css enum 2016-05-25 09:25:36 +02:00
David Raifaizen
3dafd558c5 Changing update_inline_style to process multiple declarations at once to handle shorthand serialization better 2016-05-25 09:25:35 +02:00
David Raifaizen
f38607967e Fixing python to_css codegen error 2016-05-25 09:25:34 +02:00
Simon Sapin
dc829da07e Less cloning and dynamic dispatch. 2016-05-25 09:25:33 +02:00
David Raifaizen
7d7aac212b Shorthand serialization now takes iterators instead of array slice as argument 2016-05-25 09:25:32 +02:00
David Raifaizen
be2f70393f Adding more efficient way of determining if PropertyDeclaration is important 2016-05-25 09:25:31 +02:00
David Raifaizen
51e642e875 Converted serialization methods to implement the to_css trait, writing to string buffers to save string allocations for every result 2016-05-25 09:25:29 +02:00
David Raifaizen
0985d7563f Making fixes based on suggestions from nox and SimonSapin 2016-05-25 09:24:10 +02:00
David Raifaizen
feff32c4ab For Shorthand impl, added to_name method and copied serialize_shorthand
from cssstyledeclaration.rs file

For PropertyDeclaration impl, added shorthands method to get the shorthands associated
with the current longhand

For PropertyDeclarationBlock impl, added serialize algorithm
2016-05-25 09:24:04 +02:00
Cameron McCormack
cb7f2a1c1b Support display:-moz-(inline-)box in geckolib. 2016-05-25 11:59:33 +10:00
Cameron McCormack
44bdbed989 Support -moz-binding in geckolib. 2016-05-24 12:12:34 +10:00
Cameron McCormack
bb85f5faf0 Add an extra data field to ParserContext.
This will be used for passing Gecko-specific information through
the CSS parser in stylo.
2016-05-24 12:12:10 +10:00
Keith Yeung
6d7b3a4c55 Add -moz-appearance and include nsThemeConstants.h in struct.rs 2016-05-20 04:53:15 -04:00
Keith Yeung
5170f46455 Add -moz-float-edge 2016-05-19 13:42:55 -04:00
bors-servo
f02c4c6403 Auto merge of #11240 - mbrubeck:font-style, r=bholley
Support font-style in geckolib

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11240)
<!-- Reviewable:end -->
2016-05-18 13:12:55 -07:00
Bobby Holley
b521c293dc Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
2016-05-18 11:33:38 -07:00
Matt Brubeck
8cab1d6948 Support font-style in geckolib 2016-05-17 16:59:39 -07:00
bors-servo
e0addae51c Auto merge of #11222 - KiChjang:stylo-keywords, r=bholley
Add -moz-user-* CSS longhands for Gecko

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes do not require tests because stylo

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11222)
<!-- Reviewable:end -->
2016-05-17 14:57:32 -07:00
Keith Yeung
4f4d4cb7b4 Add -moz-user-input 2016-05-17 04:24:00 -04:00
Keith Yeung
ff98e44654 Add -moz-user-select 2016-05-17 04:12:20 -04:00
Keith Yeung
ac9c411d18 Add -moz-user-modify 2016-05-17 04:12:18 -04:00
Keith Yeung
5e2f52df23 Add -moz-user-focus 2016-05-17 04:12:17 -04:00
Matt Brubeck
36699c5748 Support vertical-align in geckolib 2016-05-16 11:34:02 -07:00