Commit graph

2892 commits

Author SHA1 Message Date
Nazım Can Altınova
936fa7c90b
Add comments for shorthand alias property logic 2017-05-09 14:46:52 +03:00
Nazım Can Altınova
e1053f2c71
Rename ALIAS_PROPERTY with SHORTHAND_ALIAS_PROPERTY to prevent confusion 2017-05-09 14:23:39 +03:00
bors-servo
fca15d3782 Auto merge of #16774 - emilio:unbust-stylo, r=Manishearth
Unbust stylo

<!-- 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/16774)
<!-- Reviewable:end -->
2017-05-08 18:59:33 -05:00
Emilio Cobos Álvarez
29c52cc61b
stylo: Fix nsCOMPtr release bindings. 2017-05-09 00:46:27 +02:00
bors-servo
0d9b26f4e4 Auto merge of #16607 - canaltinova:moz-transform-var, r=SimonSapin
Fix variable serialization bug on shorthand alias properties

<!-- Please describe your changes on the following line: -->
-moz-transform were having a problem with variable serialization. It wasn't printing transform's value and transform wasn't printing -moz-transform's if their value was a variable. This PR fixes that.
Reduces stylo -moz-transform failures to 2: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3fd3a57873e5e98dfcb173eef4b13822a66fdf6a

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

<!-- 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/16607)
<!-- Reviewable:end -->
2017-05-08 17:34:54 -05:00
Nick Fitzgerald
1cfd3ce5d3 Update the style crate's bindgen dependency 2017-05-08 09:32:16 -07:00
bors-servo
bd2cd40c50 Auto merge of #16754 - canaltinova:text-shadow, r=emilio
Fix parsing behavior of text-shadow property

Blur radius should reject negative values. There was already `Shadow` struct for properties like this. `filter: drop-shadow` also has the same syntax with that property. I thought sharing the same code would be better and used Shadow struct for parsing. Converted to SpecifiedTextShadow to get rid of unneccessary fields and to be able to convert its computed value. Maybe it would be better to avoid using `Shadow` or just using `Shadow` but sharing code and avoiding unneccessary fields seems better.

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

<!-- 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/16754)
<!-- Reviewable:end -->
2017-05-06 16:10:22 -05:00
Nazım Can Altınova
c072f3ab18
Clean up text-shadow property 2017-05-07 00:05:08 +03:00
Nazım Can Altınova
1e975b9833
Properly parse text-shadow property 2017-05-06 21:36:57 +03:00
Xidorn Quan
1ef7b323ac Fix stylo issue after changing counter style names to nsIAtom. 2017-05-06 12:50:08 +10:00
bors-servo
f50b8fd545 Auto merge of #16744 - nox:pointer-events, r=emilio
Properly parse 'pointer-events: all'

<!-- 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/16744)
<!-- Reviewable:end -->
2017-05-05 17:25:59 -05:00
bors-servo
ce874d72ec Auto merge of #16742 - nox:font-feature-settings, r=emilio
Properly use big endianness to parse font feature tags

<!-- 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/16742)
<!-- Reviewable:end -->
2017-05-05 15:45:53 -05:00
Anthony Ramine
7eb7fc7582 Properly use big endianness to parse font feature tags 2017-05-05 21:57:11 +02:00
bors-servo
943e7595d5 Auto merge of #16741 - Manishearth:stylo-fixup-generic, r=heycam
Handle fallback to default variable font in case of nonexistant generic

<!-- 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/16741)
<!-- Reviewable:end -->
2017-05-05 13:39:19 -05:00
Anthony Ramine
a68f3c9ea9 Properly parse 'pointer-events: all' 2017-05-05 17:51:05 +02:00
Manish Goregaokar
03e9264ea0 Handle fallback to default variable font in case of nonexistant generic 2017-05-05 08:34:21 -07:00
Anthony Ramine
fe1381b4fe Fix serialisation of 'image-orientation: <angle> flip' 2017-05-05 17:12:12 +02:00
bors-servo
441d3cf3e5 Auto merge of #16730 - Manishearth:stylo-font-size, r=dbaron
Make font-size: larger/smaller work with the base size stuff

<!-- 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/16730)
<!-- Reviewable:end -->
2017-05-05 01:38:38 -05:00
Manish Goregaokar
e4d39b5476 Make font-size: larger/smaller work with the base size stuff 2017-05-04 22:15:20 -07:00
bors-servo
8187969c39 Auto merge of #16733 - KuoE0:bug-1356072, r=xidorn
Make stylo support moz-prefixed cursor values.

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

This issue is reported at https://bugzilla.mozilla.org/show_bug.cgi?id=1356072.

We need to support the following moz-prefix properties in stylo:
- -moz-grab
- -moz-grabbing
- -moz-zoom-in
- -moz-zoom-out

---
<!-- 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 [Bug 1356072](https://bugzilla.mozilla.org/show_bug.cgi?id=1356072).

<!-- Either: -->
- [X] These changes do not require tests because the tests already exist in Gecko.

<!-- 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/16733)
<!-- Reviewable:end -->
2017-05-04 22:27:44 -05:00
KuoE0
285ff8214e Make stylo support moz-prefixed cursor values.
MozReview-Commit-ID: AfV0recnoXw
2017-05-05 10:46:35 +08:00
bors-servo
18c8c290da Auto merge of #16727 - nox:grid-template-areas, r=Manishearth
Implement grid-template-areas (fixes #16079)

<!-- 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/16727)
<!-- Reviewable:end -->
2017-05-04 19:58:22 -05:00
Anthony Ramine
3c68c28ff7 Implement grid-template-areas (fixes #16079) 2017-05-04 19:10:45 +02:00
Manish Goregaokar
33fb27c765 Allow vector properties to be set by iterator 2017-05-04 09:21:57 -07:00
Manish Goregaokar
dd3159f2f5 Express unique ownership of arc in StyleStructRef, add vacated state
MozReview-Commit-ID: GwOw0HaC9S7
2017-05-04 07:15:18 -07:00
Manish Goregaokar
c85aae4abd Add iterators for vector types
MozReview-Commit-ID: I7oOpYhVP5S
2017-05-04 07:15:16 -07:00
bors-servo
36f26148e6 Auto merge of #16725 - nox:moz-osx-font-smoothing, r=Wafflespeanut
Implement -moz-osx-font-smoothing

<!-- 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/16725)
<!-- Reviewable:end -->
2017-05-04 07:42:43 -05:00
Anthony Ramine
c78fd3a0ce Implement -moz-osx-font-smoothing 2017-05-04 14:37:19 +02:00
Jeremy Chen
729b4f7901 Bug 1360144 - make stroke-{*} animatable for stylo. r=boris
This part includes making stroke-linecap, stroke-linejoin, stroke-miterlimit,
stroke-opacity, and stroke-dasharray animatable.

For properties that already implemented Interpolate trait and clone() for
glue code, we can just make them animatable by replacing the animation_value_type
with proper type name. So, set animation_value_type to 'discrete' for
stroke-linecap and stroke-linejoin. Set animation_value_type to 'ComputedValue'
for stroke-miterlimit and stroke-opacity.

As to stroke-dasharray, we need to implement Interpolate trait and glue codes
for it.
2017-05-04 14:31:38 +08:00
bors-servo
896a920ff5 Auto merge of #16707 - CJKu:bug-1359787, r=manish
Stylo: Implement {specified|computed}::LayerImage.

<!-- Please describe your changes on the following line: -->
Bug 1359787 - Stylo: Unite the implementation of background-image/ mask-image and border-image-source in {background|svg|border}.mako.rs

---
<!-- 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 #__ (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/16707)
<!-- Reviewable:end -->
2017-05-03 21:49:33 -05:00
bors-servo
01f169d8c1 Auto merge of #16568 - WholeGrainGoats:master, r=Manishearth
font-feature-settings gecko glue code

<!-- Please describe your changes on the following line: -->
FeatureTagValue value property changed to use u32. ToCss for
FeatureTagValue changed to allow conversion from u32 to string. Parse
for the same struct updated to convert from string to u32. Added two
functions to transfer settings to gecko and copy settings.

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

<!-- Either: -->
- [X] 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/16568)
<!-- Reviewable:end -->
2017-05-03 19:41:59 -05:00
Juan C. Gonzalez-Zurita
a3dbf1d275 font-feature-settings gecko glue code
FeatureTagValue value property changed to use u32. ToCss for
FeatureTagValue changed to allow conversion from u32 to string. Parse
for the same struct updated to convert from string to u32. Added two
functions to transfer settings to gecko and copy settings.
2017-05-03 17:40:22 -04:00
Hiroyuki Ikezoe
23f7807e38 Support all properties for -moz-appearance
Now all properties in nsCSSProps::kMozAppearanceKTable are in
keyword list of -moz-appearance.
2017-05-04 06:27:45 +09:00
cku
3c3e7f63ee Stylo: Implement {specified|computed}::LayerImage. 2017-05-03 20:51:33 +08:00
bors-servo
fb6015a75b Auto merge of #16695 - Manishearth:kw-inherit, r=heycam
Do not inherit kw font size if it was not used due to MathML

See https://bugzilla.mozilla.org/show_bug.cgi?id=1361126#c9

<!-- 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/16695)
<!-- Reviewable:end -->
2017-05-02 22:33:15 -05:00
Manish Goregaokar
b298a2bb8e Do not inherit kw font size if it was not used due to MathML 2017-05-02 19:43:12 -07:00
Bobby Holley
7dba36ed73 Make StyleBuilder more efficient using stylearc.
MozReview-Commit-ID: 8wSsYPEmYE4
2017-05-02 17:35:45 -07:00
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Anthony Ramine
5684acc498 Implement touch-action in stylo (fixes #16372) 2017-05-02 16:46:13 +02:00
Cameron McCormack
53eb1bb5c6 style: Correctly serialize CSS Custom Property names. 2017-05-02 17:18:37 +08:00
bors-servo
8850a01b81 Auto merge of #16683 - nox:place-content, r=emilio
Fix serialisation of place-content

<!-- 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/16683)
<!-- Reviewable:end -->
2017-05-01 19:57:40 -05:00
Anthony Ramine
16dd584bcc Fix serialisation of place-content 2017-05-02 00:52:32 +02:00
Emilio Cobos Álvarez
17ec634665
Guard inheriting font-size with what we actually need.
MozReview-Commit-ID: C4QaV5cNLh5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-01 23:56:58 +02:00
bors-servo
0abd5bbabd Auto merge of #16674 - canaltinova:angle-unit, r=emilio
Preserve units in computed Angle

<!-- Please describe your changes on the following line: -->
It was converting all angles to radians before. But other browsers preserves the angle units. Fixed that behavior.

---
<!-- 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 #16594 and [Bug 1360659](https://bugzilla.mozilla.org/show_bug.cgi?id=1360659)

<!-- 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/16674)
<!-- Reviewable:end -->
2017-05-01 09:45:04 -05:00
Nazım Can Altınova
f8710bc189
stylo: Support other unit types in computed angle 2017-05-01 16:25:18 +03:00
bors-servo
b7f06d2c20 Auto merge of #16672 - nox:moz-force-broken-image-icon, r=emilio
Implement -moz-force-broken-image-icon in geckolib

<!-- 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/16672)
<!-- Reviewable:end -->
2017-05-01 08:14:34 -05:00
Anthony Ramine
2c9a2f61f4 Implement -moz-force-broken-image-icon in geckolib 2017-05-01 15:00:23 +02:00
Nazım Can Altınova
4483a7694a
stylo: Use computed Angle in computed value of filter property
Using specified Angle was wrong because it can keep calc
value and serialize with calc(). Also that will allow us to pass
angle unit later.
2017-05-01 14:28:04 +03:00
Hiroyuki Ikezoe
83a4935b60 Pass AnimationValueMap raw pointer instead of Arc to Gecko_GetAnimationRule() 2017-05-01 19:23:34 +09:00
Cameron McCormack
2296649b5c style: Correctly handle Gecko prefixed text-align values in property glue. 2017-05-01 17:22:28 +08:00