Commit graph

2338 commits

Author SHA1 Message Date
Xidorn Quan
11bd1bc38c Convert NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class. 2017-12-21 18:27:40 +11:00
Emilio Cobos Álvarez
974458cafc
style: Fix inheritance of animation and transition properties of mismatched length.
At least when the animation-name length is bigger than the animation properties,
we mess up inheritance and only set properly the specified counts, then don't
cycle it.

The nicer fix for this is making these vectors properly, and move the cycling
logic at used-value time (bug 1420928). Same for transitions.

Bug: 1426246
Reviewed-by: hiro
MozReview-Commit-ID: 3cguzIvfMFU
2017-12-21 06:14:17 +01:00
neerpancholi
9bea4baf6f
Bug 1417725 - (Servo) Add -moz-column-span alias for column-span property. 2017-12-19 10:33:46 +01:00
Manish Goregaokar
82e024913b stylo: Correctly handle interpolation where optional second argument for translate(), skew(), scale() exists in one but not the other
MozReview-Commit-ID: 59rNRAXBEN9
2017-12-18 18:45:25 -08:00
bors-servo
a9c17970c1 Auto merge of #19576 - canaltinova:text-align, r=Manishearth,emilio
style: Move text-align outside of the mako file.

I will need this refactoring before my next job. I didn't actually fix the FIXME's along the way. My other PR probably will cover these.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/19576)
<!-- Reviewable:end -->
2017-12-18 12:12:52 -06:00
Nazım Can Altınova
9882d0bae5 style: Move text-align outside of the mako file. 2017-12-18 11:58:06 -06:00
bors-servo
8aba41d951 Auto merge of #19583 - CYBAI:move-will-change-out-of-mako, r=emilio
style: Move will-change outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19582
- [x] These changes do not require tests

<!-- 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/19583)
<!-- Reviewable:end -->
2017-12-16 16:39:37 -06:00
Emilio Cobos Álvarez
af3a50a9d9
style: Remove the grid pref.
Bug: 1398492
Reviewed-by: mats
MozReview-Commit-ID: 6Qez8NE8oze
2017-12-16 22:10:22 +01:00
CYBAI
2eb396613b
style: Move will-change outside of mako 2017-12-16 21:47:59 +01:00
Brian Birtles
150db42ef6 Update references to Web Animations spec 2017-12-15 16:21:26 -06:00
Felipe Nakandakari
eb88a298f6 style: move list-style-image out of mako
cleaner way to set boxed param

redefine get_initial_value to none

make parse method clearer

remove some extra lines
2017-12-15 16:23:53 +11:00
Emilio Cobos Álvarez
03f3521216
style: Use more Box<[]> and Box<str> for quotes. 2017-12-14 04:05:25 +01:00
Connor Brewster
16f627a18a
style: Move list quotes out of mako 2017-12-14 03:43:10 +01:00
CYBAI
b9b91b33be style: Move outline-style outside of mako 2017-12-13 11:41:59 +08:00
Emilio Cobos Álvarez
dbf0183b0f
style: Use ? in Option more often. 2017-12-09 20:26:09 +01:00
Emilio Cobos Álvarez
3fe28e380c
style: Don't unconditionally extend() the declaration block vector.
Since it appears in profiles when used from CSSOM, like the one in the bug
mentioned in the comment.
2017-12-08 21:30:58 +01:00
Matt Brubeck
99c2db0549 Update to uluru 0.2 and arrayvec 0.4 2017-12-07 10:05:38 -08:00
Emilio Cobos Álvarez
af879523ea
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
2017-12-06 02:35:10 +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
Emilio Cobos Álvarez
35d0e7cf0f
style: use the same type for overflow-clip-box longhands.
Needed to add the hacky padding_box scheme, will fix it up later.
2017-12-05 19:00:14 +01:00
Mats Palmgren
cdf7ae51b6
style: Add internal overflow-clip-box-block/-inline properties and make overflow-clip-box a shorthand.
Bug: 1422839
Reviewed-by: emilio
2017-12-05 18:20:21 +01:00
bors-servo
14f757817e Auto merge of #19463 - emilio:bye-parse-functions, r=jdm
style: Remove free parsing functions, use Integer::parse and Number::parse instead.

<!-- 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/19463)
<!-- Reviewable:end -->
2017-12-03 06:02:12 -06:00
bors-servo
d198caa9ff Auto merge of #19436 - aethanyc:shape-image-threshold, r=heycam
style: Support 'shape-image-threshold' property

This has been reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1265343

<!-- 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/19436)
<!-- Reviewable:end -->
2017-12-02 10:03:16 -06:00
Emilio Cobos Álvarez
93fc9ab63a
style: Remove free parsing functions, use Integer::parse and Number::parse instead. 2017-12-02 16:15:11 +01:00
bors-servo
f7aa22a87e Auto merge of #19451 - emilio:inlining-is-fun, r=upsuper
style: Inline some things that should never ever appear in a profile.

<!-- 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/19451)
<!-- Reviewable:end -->
2017-12-01 16:52:34 -06:00
Emilio Cobos Álvarez
2bbeda97d3
style: Inline some things that should never ever appear in a profile. 2017-12-01 20:04:33 +01:00
Emilio Cobos Álvarez
0f12380db3
style: Make -moz-border-colors chrome only.
This also makes the `border` shorthand not reset them.

Bug: 1417200
Reviewed-by: xidorn
MozReview-Commit-ID: KNais1e5FnE
2017-12-01 16:49:55 +01:00
Ting-Yu Lin
1b14ca3a9d style: Support 'shape-image-threshold' property
MozReview-Commit-ID: 14lzl3ln3Rg
2017-12-01 11:18:54 +08:00
bors-servo
cc8f9305e4 Auto merge of #19406 - ghoo1125:add_inner_spin, r=heycam
Add a new value inner-spin-button to -moz-appearance in stylo.

<!-- Please describe your changes on the following line: -->
Add a new value inner-spin-button to -moz-appearance. See bug 1417751.
https://reviewboard.mozilla.org/r/200244/diff/6#index_header

---
<!-- 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 #__ (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19406)
<!-- Reviewable:end -->
2017-11-29 19:14:41 -06:00
bors-servo
fa3f3896d3 Auto merge of #19412 - CYBAI:grid-template-areas-out-of-mako, r=emilio
style: Move grid-template-areas outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19409
- [x] These changes do not require tests

<!-- 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/19412)
<!-- Reviewable:end -->
2017-11-29 15:24:33 -06:00
CYBAI
003ddfc945 style: Move grid-template-areas outside of mako 2017-11-29 22:36:55 +08:00
Louis Chang
47d4d16539 Add a new value inner-spin-button to -moz-appearance in stylo. 2017-11-29 18:01:36 +08:00
Ting-Yu Lin
923ffcf2cc style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
2017-11-29 11:27:31 +08:00
bors-servo
66d0a41127 Auto merge of #19378 - CYBAI:grid-auto-flow-out-of-mako, r=emilio
style: Move grid-auto-flow outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19375
- [x] These changes do not require tests

<!-- 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/19378)
<!-- Reviewable:end -->
2017-11-28 05:16:49 -06:00
bors-servo
823da9e34a Auto merge of #19388 - BorisChiou:stylo/dommatrix/parser, r=emilio,heycam
stylo: Implement Servo_ParseTransformIntoMatrix

This is an inter-dependent patch of Bug 1408310.

DOMMatrix needs to convert a specified transform list into a matrix, so we rewrite
to_transform_3d_matrix by generics for both specified and computed transform lists.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1408310](https://bugzilla.mozilla.org/show_bug.cgi?id=1408310).
- [X] These changes do not require tests because we can count on the wpt tests for DOMMatrix on Gecko side.

<!-- 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/19388)
<!-- Reviewable:end -->
2017-11-27 20:13:34 -06:00
Boris Chiou
3a38e815ec Implement Servo_ParseTransformIntoMatrix.
DOMMatrix needs to convert a specified transform list into a matrix, so
we could rewrite to_transform_3d_matrix by generics for both specified
and computed transform lists.

Besides, we have to update the test case because we use Transform3D<f64> to
compute the matrix, instead of Transform3D<f32>, so the result will be
the same as that in Gecko. Using 0.3 may cause floating point issue
because (0.3f32 as f64) is not equal to 0.3 (i.e. floating point precision
issue), so using 0.25 instead.
2017-11-28 10:08:12 +08:00
bors-servo
df50a9a81c Auto merge of #19391 - emilio:early-props-docs, r=upsuper
style: Add a comment about why early properties are early.

<!-- 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/19391)
<!-- Reviewable:end -->
2017-11-27 17:42:50 -06:00
Emilio Cobos Álvarez
5887e1e55c
style: Move get_writing_mode outside of mako, and add a pointer to it. 2017-11-27 21:14:53 +01:00
bors-servo
769b643c0f Auto merge of #19380 - emilio:my-existence-seems-a-continuous-fight-with-xbl, r=heycam
style: Bring back the optimization to avoid traversing XBL subtrees that will likely change.

Bug: 1420496
Reviewed-by: heycam
MozReview-Commit-ID: 3sIGtcVOt0r

<!-- 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/19380)
<!-- Reviewable:end -->
2017-11-27 13:35:28 -06:00
Emilio Cobos Álvarez
cf45a45e18
style: Add a comment about why early properties are early. 2017-11-27 20:12:59 +01:00
Emilio Cobos Álvarez
7a5a35f5e0
style: Fix indentation of multiple CssParserContext construction. 2017-11-27 15:35:16 +01:00
Emilio Cobos Álvarez
47e9c88742
style: Deindent some property declaration code. 2017-11-26 17:16:22 +01:00
CYBAI
09321bfb68 style: Move grid-auto-flow outside of mako 2017-11-26 23:51:02 +08:00
Emilio Cobos Álvarez
d61c9a8d31
style: Bring back the optimization to avoid traversing XBL subtrees that will likely change.
We need to get rid of BindingHolder to handle properly the case of an invalid
binding URL.

Bug: 1420496
Reviewed-by: heycam
MozReview-Commit-ID: 3sIGtcVOt0r
2017-11-26 16:36:13 +01:00
Gecko Backout
9651a5572e Backed out changeset 1fdcd69d2524 for Build Bustage. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19376
2017-11-26 11:00:42 +00:00
Ting-Yu Lin
f3dbaad222 style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
2017-11-26 17:07:52 +08:00
bors-servo
8f61fde390 Auto merge of #19366 - CYBAI:font-family-out-of-mako, r=emilio
style: Move font-family outside of mako

This is a sub-PR of #19015
Besides, this is the last PR for `font.mako.rs`! 🎉
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19355
- [x] These changes do not require tests

<!-- 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/19366)
<!-- Reviewable:end -->
2017-11-25 13:06:31 -06:00
CYBAI
a470ebd501 style: Move font-family outside of mako 2017-11-26 00:36:00 +08:00
Emilio Cobos Álvarez
4c02ad00ef
style: Don't insert into the seen set before ignoring document colors.
Otherwise we may stop honoring other colors in other cascade levels.

Fixes: #19370
2017-11-25 02:08:48 +01:00
bors-servo
6158a4bf91 Auto merge of #19368 - theres-waldo:bug951793, r=emilio
Bug 951793 - Add support for the 'overscroll-behavior' CSS property (Servo changes)

Servo changes for [bug 951793](https://bugzilla.mozilla.org/show_bug.cgi?id=951793).

<!-- 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/19368)
<!-- Reviewable:end -->
2017-11-24 17:02:56 -06:00