Commit graph

25860 commits

Author SHA1 Message Date
Ravi Shankar
a36bf9efc4 Make ShapeRadius generic 2017-04-25 17:13:44 +05:30
Ravi Shankar
b2b3f99427 Make BorderRadius generic 2017-04-25 17:13:42 +05:30
Ravi Shankar
0249270f61 Create a module for generics and make BorderRadiusSize generic 2017-04-25 17:13:41 +05:30
Simon Sapin
f267ecb855 Update to cargo 0.19.0-nightly (994e552 2017-04-25) 2017-04-25 12:28:09 +02:00
Simon Sapin
574b155cf6 Add ./mach cargoup 2017-04-25 12:28:08 +02:00
bors-servo
c5c6e8c442 Auto merge of #16600 - KiChjang:update-rust-mozjs, r=Wafflespeanut
Update rust-mozjs

<!-- 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/16600)
<!-- Reviewable:end -->
2017-04-25 01:51:11 -05:00
Keith Yeung
55539633b4 Update rust-mozjs 2017-04-24 23:46:16 -07:00
bors-servo
f3c1bbe070 Auto merge of #16598 - aacunningham:fix-build-errors, r=jdm
Fix various build warnings

This removes six separate warnings when building servo. One of
the warnings was an unused mut, and the other were various dead code
warnings

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

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they address warnings from the build process

<!-- 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/16598)
<!-- Reviewable:end -->
2017-04-25 01:02:56 -05:00
Aaron Cunningham
f03ddf6c6c Fix various build warnings
This should remove six separate warnings when building servo. One of
the warnings was an unused mut, and the other were various dead code
warnings
2017-04-24 22:54:06 -07:00
bors-servo
fffb94530e Auto merge of #16596 - Manishearth:length-parsing, r=heycam
Handle length parsing mode for other types too

All length types should handle this. Seems to block a couple tests.

try at https://treeherder.mozilla.org/#/jobs?repo=try&revision=b1eb64509e65f9dc548d361ac2ae00ce000c9d7b

<!-- 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/16596)
<!-- Reviewable:end -->
2017-04-24 22:03:12 -05:00
bors-servo
ef5c61e833 Auto merge of #16586 - chenpighead:stylo-moz-border-colors-support, r=heycam
Stylo: add -moz-border-*-colors support

In Gecko, we use double pointers to nsBorderColors to store -moz-border-*-colors.
We can simplify the implementation of computed value in Servo by using Option<Vec>.
As to passing computed values from Servo to Gecko, we might need to use some
binding functions (pre-added in the same Gecko bug, see Bug 1348173).

Note that we also added -moz-border-*-colors as sub_properties of the 'border'
shorthand, so we can make the 'border' shorthand reset -moz-border-*-colors
(See Gecko Bug 482692).

A bit refactoring of replacing all ["top", "right", "bottom", "left"] with PHYSICAL_SIDES
is included in this patch, since we've already had PHYSICAL_SIDES for a while.

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

---
<!-- 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/16586)
<!-- Reviewable:end -->
2017-04-24 21:03:52 -05:00
Manish Goregaokar
16390962d6 Handle length parsing mode for other types too
MozReview-Commit-ID: CIJQmx84QB2
2017-04-24 19:01:14 -07:00
Jeremy Chen
13f6cf6e3a Stylo: add -moz-border-*-colors support
In Gecko, we use double pointers to nsBorderColors to store -moz-border-*-colors.
We can simplify the implementation of computed value in Servo by using Option<Vec>.
As to passing computed values from Servo to Gecko, we might need to use some
binding functions (pre-added in the same Gecko bug, see Bug 1348173).

Note that we added -moz-border-*-colors as sub_properties of the 'border'
shorthand, so we can make the 'border' shorthand reset -moz-border-*-colors
(See Gecko Bug 482692). However, since they are Gecko only non-standard properties,
we should skip these sub_properties while doing unit testing in Servo. The test part
should be convered by Stylo/Gecko already.

A bit refactoring of replacing all ["top", "right", "bottom", "left"] with PHYSICAL_SIDES
is included in this patch, since we've already had PHYSICAL_SIDES for a while.
2017-04-25 09:52:19 +08:00
Jeremy Chen
3f3f780ae5 Stylo: update bindings for -moz-border-*-colors support 2017-04-25 09:42:31 +08:00
bors-servo
e3e10ada09 Auto merge of #16589 - servo:cssparserup, r=emilio
Update to cssparser 0.13

https://github.com/servo/rust-cssparser/pull/140

<!-- 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/16589)
<!-- Reviewable:end -->
2017-04-24 18:47:00 -05:00
Simon Sapin
11cef135e7 Update to cssparser 0.13 2017-04-25 01:45:33 +02:00
bors-servo
8efa680774 Auto merge of #16595 - emilio:strings-are-hard, r=Manishearth
stylo: Fix a serialization bug for string pseudos.

The string is null-terminated, so we need to avoid passing that last null
character.

<!-- 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/16595)
<!-- Reviewable:end -->
2017-04-24 12:34:08 -05:00
Emilio Cobos Álvarez
e136863939
stylo: Fix a serialization bug for string pseudos.
The string is null-terminated, so we need to avoid passing that last null
character.
2017-04-24 19:28:11 +02:00
bors-servo
ef3903163d Auto merge of #16530 - metajack:kill-domrectlist, r=nox
Remove DOMRectList and use sequences instead.

DOMRectList was removed last back in 2015. See
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26200 for details.

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

---
<!-- 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
- [x] These changes do not require tests because they are covered by existing tests

<!-- 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/16530)
<!-- Reviewable:end -->
2017-04-24 10:35:52 -05:00
bors-servo
4263b798ad Auto merge of #16592 - avadacatavra:globalscope, r=jdm
added origin to globalscope

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

---
<!-- 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/16592)
<!-- Reviewable:end -->
2017-04-24 08:54:07 -05:00
bors-servo
46bb635c4c Auto merge of #16587 - hiikezoe:intermediate-rgba, r=birtles,boris
Introduce intermediate rgba

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1356941
---
<!-- 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.

<!-- 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/16587)
<!-- Reviewable:end -->
2017-04-24 07:22:39 -05:00
ddh
2c6bd51bef added origin to globalscope 2017-04-24 13:15:42 +01:00
bors-servo
70d7a2be34 Auto merge of #16579 - servo:rustup, r=nox
Upgrade to rustc 1.18.0-nightly (23de823e9 2017-04-23)

<!-- 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/16579)
<!-- Reviewable:end -->
2017-04-24 06:09:25 -05:00
bors-servo
fd7af58bec Auto merge of #16585 - servo:log, r=emilio
Don’t log CSS parsing errors in user-agent stylesheets

This used to make `RUST_LOG=style` basically useless.

<!-- 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/16585)
<!-- Reviewable:end -->
2017-04-24 05:05:51 -05:00
bors-servo
418c3e8cc7 Auto merge of #16541 - sbwtw:fix_calc_behavior, r=stshine
Add calc method for CalcLengthOrPercentage

* Add calc method to calculate formula value with parent size
* Add unit test case

<!-- Please describe your changes on the following line: -->
Please see this issue: https://github.com/servo/servo/issues/15986

---
<!-- 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 #15986 (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/16541)
<!-- Reviewable:end -->
2017-04-24 04:16:18 -05:00
Hiroyuki Ikezoe
0ec5a64a71 ComputedDistance for IntermediateTextShadow. 2017-04-24 15:40:30 +09:00
Hiroyuki Ikezoe
46e567e688 Use IntermediateColor for text-shadow. 2017-04-24 15:40:29 +09:00
Hiroyuki Ikezoe
1e9c118f7f ComputedDistance for IntermediateBoxShadow. 2017-04-24 15:40:28 +09:00
Hiroyuki Ikezoe
424e4f9d35 Use IntermediateColor for box-shadow. 2017-04-24 15:40:26 +09:00
Hiroyuki Ikezoe
2d808bf162 Introduce a macro to implement Interpolate trait for box-shadow and text-shadow.
This macro will be used for implementation of intermediate type shadows
as well.  In the case of intermediate types transparent_color will be
IntermediateRGB::transparent().
2017-04-24 15:40:25 +09:00
Hiroyuki Ikezoe
09e728b43d ComputedDistance for IntermediateColor. 2017-04-24 15:40:24 +09:00
Hiroyuki Ikezoe
486578fe74 Use IntermediateColor for caret-color. 2017-04-24 15:40:23 +09:00
Hiroyuki Ikezoe
5834577157 Introduce IntermediateColor to store currentcolor or IntermeditateRGBA. 2017-04-24 15:40:22 +09:00
Hiroyuki Ikezoe
8de605f0dd ComputedDistance for IntermediateRGBA. 2017-04-24 15:40:21 +09:00
Hiroyuki Ikezoe
d70e4aa229 Use IntermediateRGBA to store overflowed RGBA components during interpolation. 2017-04-24 15:40:20 +09:00
Hiroyuki Ikezoe
e47d30f668 Rename 'normal' of animation_value_type to 'ComputedValue'. 2017-04-24 15:40:13 +09:00
Simon Sapin
512944c32c Don’t report CSS parsing errors from user-agent stylesheets.
This used to make `RUST_LOG=style` basically useless.
2017-04-24 08:27:26 +02:00
Hiroyuki Ikezoe
ce51ff3a9a Check animation_value_type is not 'discrete' instead of 'normal' for ComputeDistance.
We will introduce various new animation_value_type in subsequent patches,
so we should just check 'discrete' type for properties that we can't compute
distance.
2017-04-24 15:23:48 +09:00
Simon Sapin
7fe57ecaea Rename StdoutErrorReporter to RustLogReporter. 2017-04-24 08:23:41 +02:00
Hiroyuki Ikezoe
94fb839fdd Rename animation_type to animation_value_type. 2017-04-24 15:23:39 +09:00
石博文
22f99c71b9
Add to_computed method for CalcLengthOrPercentage
* Add to_computed method to calculate `calc()` value with parent size,
if parent container size is `None`, the result will be `None`.
* Add from_option method for `MaybeAuto`, to construct from
`Option<Au>`.
* Update some test case.
2017-04-24 14:22:14 +08:00
Hiroyuki Ikezoe
1da31f5cf3 Introduce IntermediateRGBA type.
We need to store color values that each components exceeds its normal range
(i.e. [0, 1]) during animation operations (e.g. interpolation). We clamp it
right before we insert animated values into the cascade.
2017-04-24 15:13:59 +09:00
Simon Sapin
de1fe51dc6 Rename MemoryHoleReporter to NullReporter 2017-04-24 07:56:50 +02:00
bors-servo
733820583e Auto merge of #16580 - hiikezoe:fix-pseudo-parent-for-animation, r=emilio
Fix parent element of pseudo element for updating animation

r? @emilio

<!-- 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/16580)
<!-- Reviewable:end -->
2017-04-23 21:41:24 -05:00
Hiroyuki Ikezoe
1e94663b26 Fix parent element of pseudo element for updating animation 2017-04-24 11:39:08 +09:00
bors-servo
e357ea44bb Auto merge of #16555 - mantaroh:animate_clip, r=hiro
Make clip property animatable.

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1356162.
---
<!-- 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] There are tests for these changes, a test case will be landed in web-platform-tests in https://bugzilla.mozilla.org/show_bug.cgi?id=1356162
<!-- 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/16555)
<!-- Reviewable:end -->
2017-04-23 18:59:20 -05:00
Simon Sapin
cfaba71fb2 Upgrade to rustc 1.18.0-nightly (23de823e9 2017-04-23) 2017-04-24 01:48:02 +02:00
bors-servo
0f6c883658 Auto merge of #16551 - glennw:update-wr-mostly-borders, r=jdm
Update WR (improved double border quality, minor API changes).

<!-- 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/16551)
<!-- Reviewable:end -->
2017-04-23 17:50:08 -05:00
Simon Sapin
84558ff23f Add ./mach rustup 2017-04-24 00:34:46 +02:00
Glenn Watson
b60d1d036e Update test expectations. 2017-04-24 06:53:42 +10:00