Commit graph

1967 commits

Author SHA1 Message Date
bors-servo
a70af60eec Auto merge of #15063 - Wafflespeanut:calc, r=heycam
Cleaning up CalcLengthOrPercentage

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

We don't really need enum variants in `CalcLengthOrPercentage`. Given that we already have the information (whether it's `vw`, `ch`, etc.) in the struct fields, we could just store `Option<CSSFloat>` there, and modify our `ToCss` implementation a bit.

cc #15061

r? @Manishearth or anyone interested

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

<!-- 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/15063)
<!-- Reviewable:end -->
2017-01-17 02:18:15 -08:00
Ravi Shankar
6cf9fc0813 Prefer CSSFloat instead of enum variants in CalcLoP 2017-01-17 11:34:16 +05:30
Xidorn Quan
5d2bb99d49 Never blockify display: none 2017-01-17 11:32:09 +11:00
bors-servo
b9c6f9f76e Auto merge of #15040 - Manishearth:stylo-supports, r=heycam
stylo: support 1-arg CSS.supports()

r=heycam in https://bugzilla.mozilla.org/show_bug.cgi?id=1331316

<!-- 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/15040)
<!-- Reviewable:end -->
2017-01-16 13:56:51 -08:00
bors-servo
e01417e936 Auto merge of #15031 - emilio:stylo-display-none-pseudo, r=bholley
Bug 1331272: style: Unify restyle-damage display: none checks.

They were formerly different because we used the element check to cull the
traversal.

Now this is no longer true, so we can just unify them.

Also, update a no-longer up-to-date comment on that.

r? @bholley

<!-- 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/15031)
<!-- Reviewable:end -->
2017-01-16 12:07:02 -08:00
bors-servo
57d6b8ec45 Auto merge of #15039 - heycam:bindings-update-17, r=emilio
stylo: Regenerate bindings.

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

Bindings update for the sync I'll pushed based on https://treeherder.mozilla.org/#/jobs?repo=try&revision=42b2ac6142ddec57f60f4c3c05ec7c7d5aba9533, assuming there's nothing wrong.

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/15039)
<!-- Reviewable:end -->
2017-01-16 06:48:07 -08:00
bors-servo
bb540cab63 Auto merge of #15042 - servo:update-regex, r=jdm
Update regex.

<!-- 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/15042)
<!-- Reviewable:end -->
2017-01-16 05:59:18 -08:00
Ms2ger
a1d478fbb7 Update regex. 2017-01-16 13:11:16 +01:00
Manish Goregaokar
98fd42df17 stylo: support 1-arg CSS.supports() 2017-01-16 00:42:52 -08:00
Emilio Cobos Álvarez
6f3957a549
Bug 1331272: style: Unify restyle-damage display: none checks.
They were formerly different because we used the element check to cull the
traversal.

Now this is no longer true, so we can just unify them.

Also, update a no-longer up-to-date comment on that.

MozReview-Commit-ID: FH5GH7NfI8G
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-16 09:39:14 +01:00
Cameron McCormack
6ca0c10e79 stylo: Regenerate bindings. 2017-01-16 16:22:55 +08:00
Xidorn Quan
66af7e4d3a Store blink value for text-decoration-line
The spec does say user agents may not blink, but it doesn't say this
value can be ignored during parsing.
2017-01-16 16:23:11 +11:00
bors-servo
4c401e47dc Auto merge of #14999 - Manishearth:stylo-prefs, r=heycam
stylo: Hook property parsing into Gecko prefs

r=heycam, https://bugzilla.mozilla.org/show_bug.cgi?id=1297322

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14999)
<!-- Reviewable:end -->

<!-- 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/14999)
<!-- Reviewable:end -->
2017-01-14 09:23:05 -08:00
Hiroyuki Ikezoe
f960b4c444 Bug 1330824 - Do not copy animation property over mAnimationXXCount. r=heycam
MozReview-Commit-ID: GeSWnPQltHf
2017-01-14 11:43:35 +09:00
Hiroyuki Ikezoe
f66774b096 Bug 1330824 - Do not set mAnimationNameCount less than 1. r=heycam
animation-name property is 'allow_empty=True', we have to handle 0-length
array case.

MozReview-Commit-ID: LwU3RfhfVfH
2017-01-14 11:42:48 +09:00
Hiroyuki Ikezoe
2d19e67fc4 Bug 1330824 - Add IndexMut for nsStyleAutoArray. r=heycam
MozReview-Commit-ID: 9EU8g4SLoHp
2017-01-14 11:42:23 +09:00
Hiroyuki Ikezoe
ce59a7e9ee Bug 1330824 - Add truncate for nsAString and nsACString. r=mystor
MozReview-Commit-ID: 2ND5ra3buxI
2017-01-14 11:42:22 +09:00
Hiroyuki Ikezoe
b914d41d52 Bug 1330824 - Use impl_copy_animation_value for animation-timing-function. r=heycam
I did forget to do it in bug 1328786.

MozReview-Commit-ID: IDpVShW6nrH
2017-01-14 11:35:58 +09:00
Manish Goregaokar
05728839f1 stylo: Hook property parsing into Gecko prefs
MozReview-Commit-ID: 7evWOUFwa3K
2017-01-13 14:22:16 -08:00
Manish Goregaokar
296b468801 stylo: Expose property-pref mappings
MozReview-Commit-ID: 7evWOUFwa3K
2017-01-13 14:22:04 -08:00
bors-servo
a46e630b00 Auto merge of #14968 - Manishearth:stylo-keyframes, r=heycam,birtles
stylo: Store servo computed values for animation properties

Servo counterpart of https://bugzilla.mozilla.org/show_bug.cgi?id=1317208

r=heycam,birtles

<!-- 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/14968)
<!-- Reviewable:end -->
2017-01-13 13:25:39 -08:00
Xidorn Quan
679d9dece7 Fix filling of two vector fields for geckolib 2017-01-13 16:43:27 +11:00
Bobby Holley
e29cd8f532 Bug 1329854 - Avoid propagating the dirty descendants bit when appending items to display:none subtrees. r=heycam 2017-01-12 17:39:54 -08:00
bors-servo
6447a97838 Auto merge of #14964 - canaltinova:ok-try, r=Wafflespeanut
Remove unnecessary try!'s

<!-- Please describe your changes on the following line: -->
These try!'s are unnecessary here. We can remove them.

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

<!-- 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/14964)
<!-- Reviewable:end -->
2017-01-11 15:47:04 -08:00
Manish Goregaokar
d87b710fdd stylo: Store servo computed values for animation properties
MozReview-Commit-ID: IoQLN5tdIBw
2017-01-11 15:24:53 -08:00
Nazım Can Altınova
c2dd14d3bb Remove unnecessary try!'s 2017-01-11 22:29:15 +03:00
Xidorn Quan
0a56ec3477 Extend supported geometry box value for geckolib 2017-01-11 21:14:13 +11:00
Xidorn Quan
8a8ef48fb3 Add other property aliases 2017-01-11 11:18:01 +11:00
Xidorn Quan
2f2044e4b7 Add gecko leagcy logical properties aliases 2017-01-11 11:17:58 +11:00
Xidorn Quan
e494a0f0a7 Add prefixes parameter for properties 2017-01-11 11:17:55 +11:00
Xidorn Quan
8af81682dc Fix alias handling in properties.mako 2017-01-11 10:36:10 +11:00
bors-servo
43a537a1ba Auto merge of #14879 - hiikezoe:animation-properties, r=heycam
Stylo:  Store animation properties into gecko's struct

<!-- Please describe your changes on the following line: -->
This is the counter part of https://bugzilla.mozilla.org/show_bug.cgi?id=1328786

All patches get reviewed by r=@heycam.
---
<!-- 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 for stylo.

<!-- 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/14879)
<!-- Reviewable:end -->
2017-01-10 02:57:23 -08:00
bors-servo
867df7f3d7 Auto merge of #14920 - upsuper:shorthand-variable, r=emilio
Correctly handle unserializable shorthand

get_shorthand_appendable_value doesn't always return a serializable value. This change makes it handle that case correctly.

This change also updates step number in property_value_to_css to reflect the latest spec.

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

<!-- 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/14920)
<!-- Reviewable:end -->
2017-01-09 20:10:32 -08:00
Hiroyuki Ikezoe
1ae2a6d451 Store animation properties into nsDisplay.mAnimations. r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
ff0819b2d4 Add impl From<nsTimingFunction> for TransitionTimingFunction and impl From<TransitionTimingFunction> for nsTimingFunction. r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
98ed440597 Implement nsStyleAutoArray.ensure_len(). r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
dc3b4803d1 Implement Index for nsStyleAutoArray. r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
00b3dda3e5 Add gecko_enum_prefix for animation-direction and animation-fill-mode. r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
ff1db63922 single_keywords supports custom_consts map for enum. r=heycam
We need it to convert PlaybackDirection::Alternate_reverse in Gecko to
alternate-reverse in Servo.
2017-01-10 12:24:59 +09:00
bors-servo
2a2a89b7e4 Auto merge of #14907 - bholley:eliminate_consume, r=emilio
Give up on hoisting ElementData into the frame and eliminate the concept of consuming styles

Servo PR for the work in https://bugzilla.mozilla.org/show_bug.cgi?id=1325734

<!-- 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/14907)
<!-- Reviewable:end -->
2017-01-09 17:26:50 -08:00
Bobby Holley
3fcfc9c5fc Bug 1325734 - Simplify ElementData and eliminate the concept of consuming styles. r=emilio 2017-01-09 11:51:37 -08:00
Bobby Holley
4558efbca5 Bug 1325734 - Explicitly track whether we're performing the initial style. r=emilio 2017-01-09 11:51:37 -08:00
Bobby Holley
92b9d70c3a Bug 1325734 - Pass the thread-local context into should_traverse_children. r=emilio 2017-01-09 11:51:37 -08:00
Bobby Holley
3060865577 Bug 1325734 - Parameterize the style traversal on TElement instead of TNode. r=emilio
This works around the issue described in https://github.com/rust-lang/rust/issues/38917
2017-01-09 11:51:36 -08:00
bors-servo
50bba770d6 Auto merge of #14789 - Manishearth:supports, r=SimonSapin
Support @supports

fixes #14786

cc @heycam @upsuper
r? @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/14789)
<!-- Reviewable:end -->
2017-01-09 10:54:38 -08:00
Simon Sapin
b5d9210f16 Fix too many parens in @supports serialization. 2017-01-09 19:35:00 +01:00
Cameron McCormack
3e0e2bcd2c Don't inherit all properties for pre-computed pseudos if there are no matching rules. 2017-01-09 17:55:40 +08:00
Xidorn Quan
c183899c06 Correctly handle unserializable shorthand
get_shorthand_appendable_value doesn't always return a serializable
value. This change makes it handle that case correctly.
2017-01-09 15:38:13 +11:00
Cameron McCormack
252766b76b stylo: Regenerate bindings. 2017-01-09 11:12:21 +08:00
Cameron McCormack
f24e4543fe stylo: Update glue for recent changes. 2017-01-09 11:11:55 +08:00