Commit graph

16155 commits

Author SHA1 Message Date
Xidorn Quan
ff76ec8d2f Copy all generated files to dist dir for packaging. 2017-05-08 21:34:00 +10:00
Xidorn Quan
10b7001dd1 Make atom files generated at build-time. 2017-05-08 21:33:58 +10:00
Xidorn Quan
d44b904f08 Move python path into a lazy static. 2017-05-08 21:33:57 +10:00
Xidorn Quan
5b57c5513c Move atom_macro.rs to generated dir. 2017-05-08 21:33:55 +10:00
Xidorn Quan
869e5e025e Rename gecko_ prefix of pseudo_element_helper file. 2017-05-08 21:33:53 +10:00
Xidorn Quan
a60e5f0218 Move binding files into another directory.
So that we can copy them when not using bindgen altogether.
2017-05-08 21:26:58 +10:00
Simon Sapin
02e1901bc1 Upgrade to rustc 1.19.0-nightly (ced823e26 2017-05-07) 2017-05-08 12:46:03 +02:00
Emilio Cobos Álvarez
c9ab75b013
layout: Fix radius percentage resolution.
By resolving against the corresponding dimension of the border box, instead of
against the width.

Fixes #16764
2017-05-08 11:48:29 +02:00
Emilio Cobos Álvarez
39471cda1b
layout: Avoid a few dumb refcount bumps. 2017-05-08 11:48:28 +02:00
cku
ba8e33a30c stylo: Export mozilla::css::ImageValue to stylo. 2017-05-08 15:45:31 +08:00
Glenn Watson
a2d3b053c3 Enable subpixel anti-aliasing on text by default.
No doubt there are still some bugs and missing features related to subpixel text anti-aliasing.

But enabling by default should allow us to detect these and fix them.

If we run into any major issues, this is a standalone commit that can be reverted while we fix the problem.
2017-05-08 11:15:55 +10:00
Xidorn Quan
1d6ede3245 Expose a single function for bindings mod in build_gecko. 2017-05-08 10:52:23 +10:00
zombiefungus
9591d1eda5 Remove obsolete paint threads option #16716 2017-05-07 14:00:25 -05:00
bors-servo
3f1ae64255 Auto merge of #16666 - pyfisch:gradients, r=emilio
Improvements to gradients.

This is a collection of commits improving the rendering of linear and radial gradients by making them conform more closely to the spec.

All commits are are independent and should work without the others.

These commits address the following issues:
* a956e3fd52 resolves #3908 but contains also some other necessary changes to `convert_gradient_stops`. The updated function has a few more copys but should be more correct. Maybe @pcwalton wants to comment since he has originally written the code.
* b230be8aaf partially solves #16638. (Partially because `border-image-outset` is not implemented. This is an older issue for border gradients: #15894.

To quickly catch regressions and see changes to gradients I have created [a set of twelve manual testcases](https://pyfisch.org/stuff/testcases-gradients.html) and placed them in a single file. Attached are two files. One shows how the gradients were rendered before the PR the other one with the changes applied.

![testcases-old](https://cloud.githubusercontent.com/assets/2781017/25580052/b433278e-2e7d-11e7-9396-500fef12eee0.png)
![testcases-new](https://cloud.githubusercontent.com/assets/2781017/25580051/b43222c6-2e7d-11e7-99ab-c0a2709baf41.png)

r? @emilio
and maybe also @jdm?

---
- [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/16666)
<!-- Reviewable:end -->
2017-05-07 07:56:51 -05:00
Pyfisch
f4fadc7875 Address feedback by emilio. 2017-05-07 12:28:57 +02: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
Pyfisch
72db8d8555 Duplicate first gradient stop if necessary.
If the first stop of a non-repeating gradient is
not placed at offset 0.0 it is duplicated at this
position. This solves the problem of the first
stop being ignored if it is placed at the same
offset as the next stop.
2017-05-06 21:43:22 +02:00
Nazım Can Altınova
1e975b9833
Properly parse text-shadow property 2017-05-06 21:36:57 +03:00
bors-servo
806f369a79 Auto merge of #16750 - upsuper:bug1362302, r=Manishearth
Use nsIAtom for counter style name

This is the Servo side change of [bug 1362302](https://bugzilla.mozilla.org/show_bug.cgi?id=1362302) which has been reviewed on Bugzilla.

<!-- 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/16750)
<!-- Reviewable:end -->
2017-05-05 23:15:08 -05:00
Xidorn Quan
8fd69b428d Update binding files to autoland tip. 2017-05-06 12:59:55 +10:00
Xidorn Quan
4a8f680557 Update binding file. 2017-05-06 12:50:10 +10: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
741958b2fb Auto merge of #16745 - bholley:more_selector_maps, r=emilio
Use selector maps for revalidation and dependency selectors

https://bugzilla.mozilla.org/show_bug.cgi?id=1360088

<!-- 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/16745)
<!-- Reviewable:end -->
2017-05-05 16:29:00 -05:00
Bobby Holley
ac40cc629b Use a rulehash for DependencySet.
MozReview-Commit-ID: GXu6O4kiBE6
2017-05-05 13:50:40 -07: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
Bobby Holley
552bff8fd1 Re-enable the style sharing cache.
MozReview-Commit-ID: C39vdHjPM7J
2017-05-05 10:48:30 -07:00
Bobby Holley
1fb9108daf Use a rule hash for revalidation selectors.
MozReview-Commit-ID: 1mTZcfMxaw8
2017-05-05 10:48:24 -07:00
Bobby Holley
a6fe7bea5e Generalize SelectorMap.
MozReview-Commit-ID: HX4EcLurrr8
2017-05-05 10:48:18 -07:00
bors-servo
4e73fceaf7 Auto merge of #16738 - paulrouget:LoadDataDebug, r=Wafflespeanut
derive(Debug) for LoadData

<!-- 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/16738)
<!-- Reviewable:end -->
2017-05-05 12:05:22 -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
Nathan Froyd
681b578326 bump required rayon version to 0.7
...and bring jpeg-decoder along for the ride.  Minor tweaks were
necessary because of rayon API changes.
2017-05-05 10:36:01 -04:00
Paul Rouget
19e7418e62 derive(debug) for LoadData 2017-05-05 14:27:23 +02:00
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
bors-servo
f832052d95 Auto merge of #16735 - mrobinson:push-pop-scroll-root, r=glennw
Rename PushScrollRoot and remove PopScrollRoot

PopScrollRoot was unused and PushScrollRoot no longer pushes a scroll
root, but defines a new one.

<!-- 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 should not change behavior.

<!-- 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/16735)
<!-- Reviewable:end -->
2017-05-05 02:21:12 -05:00
Martin Robinson
83ac0a8505 Rename PushScrollRoot and remove PopScrollRoot
PopScrollRoot was unused and PushScrollRoot no longer pushes a scroll
root, but defines a new one.
2017-05-05 09:02:24 +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
bors-servo
ca2a5025e5 Auto merge of #16697 - cbrewster:history_throw, r=KiChjang
Make History attributes and methods throw

<!-- Please describe your changes on the following line: -->
All History methods and attributes should throw a `SecurityError` if the document associated with the `History` object is not fully active.
https://html.spec.whatwg.org/multipage/browsers.html#history-3

---
<!-- 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/16697)
<!-- Reviewable:end -->
2017-05-04 18:50:17 -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