Commit graph

5585 commits

Author SHA1 Message Date
bors-servo
7fc01437f4 Auto merge of #16728 - emilio:recalc, r=waffles
style: Rewrite calc to be cleaner and support arbitrary expressions.

This improves Servo's calc support compliant with[1], and makes it cleaner and
more straight-forward. (also fixes #15192)

[1]: https://github.com/w3c/csswg-drafts/issues/1241

<!-- 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/16728)
<!-- Reviewable:end -->
2017-05-05 05:09:14 -05:00
Emilio Cobos Álvarez
3608dc8088
style: Rewrite calc to be cleaner and support arbitrary expressions.
This improves Servo's calc support compliant with[1], and makes it cleaner and
more straight-forward.

[1]: https://github.com/w3c/csswg-drafts/issues/1241
2017-05-05 12:08:31 +02: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
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
Emilio Cobos Álvarez
cd43331963
style: Allow parsing nested calc() expressions. 2017-05-03 23:21:06 +02:00
Christian Poveda
62821a6915 Solving merge conficts related to the html5ever_atoms -> html5ever change 2017-05-03 12:57:49 -05:00
Christian Poveda
875e422fe6 Changed all prefixes from DOMString to the atomic Prefix from html5ever 2017-05-03 10:17:42 -05:00
bors-servo
3905b5af18 Auto merge of #16655 - servo:jdm-patch-1, r=emilio
Fix broken unit tests

These are tests that only get run on TravisCI, apparently, so they were broken by be0139ff3c and 32c624e585 without anybody noticing.

<!-- 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/16655)
<!-- Reviewable:end -->
2017-05-03 09:47:44 -05:00
Josh Matthews
f3f9e28e88 Make unit tests pass on TravisCI. 2017-05-03 10:32:27 -04:00
bors-servo
8b41c7c137 Auto merge of #16689 - servo:m5e, r=nox
Upgrade to html5ever 0.16

<!-- 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/16689)
<!-- Reviewable:end -->
2017-05-03 08:42:41 -05:00
cku
748359f4c4 Stylo: Update test cases in serialize.rs for mask-image and background-image. 2017-05-03 20:51:33 +08:00
Bobby Holley
fd1c814e78 Bump the DOM element sizes.
This will go back down soonish when NonZero stablizes and we can use it in
StyleArc, which I expect will be long before the memory overhead here matters.
2017-05-02 17:59:53 -07:00
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Alan Jeffrey
71f3d8a320 Added mozilla wpt test for adopted nodes passing same-origin-domain checks. 2017-05-02 13:26:10 -05:00
Simon Sapin
6c518c89b9 Upgrade to html5ever 0.16 2017-05-02 19:24:28 +02:00
Glenn Watson
ff38b6d2f0 Update WR (new dashed borders, basic preserve-3d support). 2017-05-02 10:39:30 +10:00
Emilio Cobos Álvarez
f879140ad2
style: Reftest for bogus style sharing across cousins. 2017-05-01 20:22:19 +02:00
Emilio Cobos Álvarez
e09ae428eb
style: Account for cousin sharing in the revalidation logic.
Fixes bug 1361013.
2017-05-01 20:22:16 +02:00
Emilio Cobos Álvarez
3b857f1c4e
style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the cascade.
This should fix most of the complaints that caused
https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a
bunch of other FIXMEs across the style system.
2017-04-30 23:45:40 +02:00
bors-servo
0c4e13cbc5 Auto merge of #16658 - n0max:remove-index-size-error, r=emilio
Remove IndexSizeError in CanvasRenderingContext2D::drawImage

<!-- Please describe your changes on the following line: -->
The current spec don't expect the IndexSizeError if the rectangle is empty.

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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/16658)
<!-- Reviewable:end -->
2017-04-29 13:42:11 -05:00
n0max
49820a6797 Remove IndexSizeError in CanvasRenderingContext2D::drawImage 2017-04-29 19:27:00 +02:00
bors-servo
5dac4fbd2d Auto merge of #16646 - nox:loponu, r=emilio
Reverse Number and LengthOrPercentage in LengthOrPercentageOrNumber

"0" must be parsed as the number 0, not the unitless 0px length.

<!-- 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/16646)
<!-- Reviewable:end -->
2017-04-29 12:11:51 -05:00
bors-servo
53c62e890a Auto merge of #16385 - pyfisch:radial-gradient, r=emilio
Implement radial gradients

<!-- Please describe your changes on the following line: -->
This PR passes the `radial-gradient` function down from CSS parsed properties to webrender. It currently lacks tests but the examples from MDN and some other tests work fine. Probably there are some wpt tests I can enable?

<!-- 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 #11779 (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/16385)
<!-- Reviewable:end -->
2017-04-29 09:40:32 -05:00
bors-servo
93a513c06f Auto merge of #16640 - hiikezoe:timing-function, r=xidorn
Use FunctionKeyword for computed_value of timing function

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1358330

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

<!-- Either: -->
- [X] These changes do not require tests because mozilla-central has test cases.  There might be some test cases in servo tree.

<!-- 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/16640)
<!-- Reviewable:end -->
2017-04-28 22:49:26 -05:00
bors-servo
bf32a7b9bd Auto merge of #16588 - KiChjang:fix-fixed-table-layout-column-width, r=mbrubeck
Fix fixed table layout column width distribution

Fixes #16324.

Replaces the incorrect [CSS3 "distributing excess width to columns" algorithm](https://drafts.csswg.org/css-tables-3/#distributing-width-to-columns) and implements the simpler [CSS2 fixed table layout algorithm](https://drafts.csswg.org/css2/tables.html#fixed-table-layout).

<!-- 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/16588)
<!-- Reviewable:end -->
2017-04-28 12:56:06 -05:00
bors-servo
3b516af783 Auto merge of #16590 - MortimerGoro:texture_rgb, r=emilio
Fix WebGL premultiplied alpha. Fix texImage2D calls with RGB images.

Fix WebGL premultiplied alpha testcases.

Fix broken textures in some WebGL demos (e.g. Three.js). This was caused by WebGL::texImage2D calls with RGB formats. Alpha must be removed from the rgba8 pixel vector before submitting the data to the GPU.

---
<!-- 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: -->
- [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/16590)
<!-- Reviewable:end -->
2017-04-28 07:12:05 -05:00
Anthony Ramine
193e1d5569 Reverse Number and LengthOrPercentage in LengthOrPercentageOrNumber
"0" must be parsed as the number 0, not the unitless 0px length.
2017-04-28 11:51:24 +02:00
Imanol Fernandez
e6d17f80a4 Fix WebGL premultiplied alpha. Fix texImage2D calls with RGB images. 2017-04-28 11:49:48 +02:00
Keith Yeung
2d5833d3af Fix fixed table layout column width distribution 2017-04-27 23:35:26 -07:00
Hiroyuki Ikezoe
b5bcc6e5eb Mark some tests for timing-function as FAIL.
Those test cases are apparently wrong. Keyword values (e.g. 'ease')
should not be serialized as cubic-bezier function.
https://drafts.csswg.org/css-timing/#serializing-a-timing-function

On gecko, we also mark those tests FAIL.

https://hg.mozilla.org/mozilla-central/file/2cca333f546f/testing/web-platform/meta/css/css-transitions-1/transition-001.html.ini
https://hg.mozilla.org/mozilla-central/file/2cca333f546f/testing/web-platform/meta/css/css-transitions-1/transition-timing-function-001.html.ini
2017-04-28 13:43:53 +09:00
bors-servo
d8bcc0db1a Auto merge of #16609 - nox:quirks, r=Manishearth,emilio
Implement unitless length quirk

The Gecko side doesn't propagate its quirks mode yet.

<!-- 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/16609)
<!-- Reviewable:end -->
2017-04-27 22:32:24 -05:00
Pyfisch
0708d62f16 Set /css-flexbox-1_dev/html/align-content-004.htm.ini to PASS 2017-04-27 22:07:31 +02:00
Bobby Holley
6e413653e7 Add unit tests for revalidation selectors.
If these break, our cache may be subtly wrong in certain situations, which may
be hard to detect.

MozReview-Commit-ID: AXG2tpGnQ6k
2017-04-27 11:13:04 -07:00
Anthony Ramine
1091af6fee Copy the damn unitless-length.html test in /_mozilla/
It's the exact same thing as the one in WPT, but without the intermittent
'top' and 'bottom' failures which are unrelated to the damn quirk.
2017-04-27 10:42:31 +02:00
Anthony Ramine
d53eb777e1 Implement the unitless length quirk for word-spacing 2017-04-27 10:42:27 +02:00
Anthony Ramine
59a7819aa9 Implement the unitless length quirk for vertical-align 2017-04-27 10:42:25 +02:00
Anthony Ramine
16dd554534 Implement the unitless length quirk for text-indent 2017-04-27 10:42:23 +02:00
Anthony Ramine
dd6d3d62c6 Implement the unitless length quirk for padding 2017-04-27 10:42:22 +02:00
Anthony Ramine
3f947395ad Implement the unitless length quirk for padding-* 2017-04-27 10:42:20 +02:00
Anthony Ramine
37118e1e45 Implement the unitless length quirk for physical size extremums 2017-04-27 10:42:18 +02:00
Anthony Ramine
2aea6d8907 Implement the unitless length quirk for margin 2017-04-27 10:42:16 +02:00
Anthony Ramine
bcc6d4580d Implement the unitless length quirk for margin-* 2017-04-27 10:42:14 +02:00
Anthony Ramine
72186c200c Implement the unitless length quirk for letter-spacing 2017-04-27 10:42:12 +02:00
Anthony Ramine
65f74ea934 Implement the unitless length quirk for physical size properties 2017-04-27 10:42:10 +02:00
Anthony Ramine
0e7308e6dc Implement the unitless length quirk for font-size 2017-04-27 10:42:08 +02:00
Anthony Ramine
ba59fafb44 Implement the unitless length quirk for clip 2017-04-27 10:42:06 +02:00
Anthony Ramine
46913ffe1d Implement the unitless length quirk for position properties 2017-04-27 10:42:04 +02:00
Anthony Ramine
91cc30046b Implement the unitless length quirk for border-width 2017-04-27 10:42:03 +02:00