Commit graph

783 commits

Author SHA1 Message Date
Joe Walker
a2d3ea57dd Add support for 'font-kerning' in geckolib 2016-10-14 14:50:05 +01:00
Manish Goregaokar
bb736f41d3 implement |quotes| property
MozReview-Commit-ID: 5eAaJGXSkob
2016-10-14 00:44:08 +05:30
Manish Goregaokar
2bde9462b1 Add safer bindings for RefPtr 2016-10-14 00:44:06 +05:30
Manish Goregaokar
647f8e9c5d Remove test functions from nsstring_vendor
These tests are run on the real nsstring anyway. They cause linux builds to
fail since the test functions are defined twice.
2016-10-12 21:51:06 +05:30
Manish Goregaokar
b74d07bc78 Use unsafe block on access of column count constant 2016-10-12 20:50:56 +05:30
Manish Goregaokar
0c793d7277 Implement text-overflow using nsstring bindings
MozReview-Commit-ID: BxoFVigIOyV
2016-10-12 18:12:53 +05:30
bors-servo
4ca7ce6329 Auto merge of #13695 - heycam:layer-init, r=Manishearth
avoid initializing image layers after repeat/origin values have already been written

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

@bors-servo r=manishearth

given in https://bugzilla.mozilla.org/show_bug.cgi?id=1309081

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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 _____

<!-- 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/13695)
<!-- Reviewable:end -->
2016-10-11 18:37:39 -05:00
Cameron McCormack
1a24469398 Avoid initializing image layers after repeat/origin values have been written.
MozReview-Commit-ID: LeetT5lKKKB
2016-10-11 17:49:45 +08:00
Bobby Holley
4398512c12 Fix property warnings.
MozReview-Commit-ID: BmT9CmbDZlX
2016-10-11 14:05:28 +05:30
Manish Goregaokar
4271167f82 Implement column-count for stylo 2016-10-10 20:07:16 +05:30
bors-servo
b110eb394e Auto merge of #13663 - shubheksha:fix/13657, r=Manishearth
changed set_value() to set() in gecko.mako.rs

<!-- Please describe your changes on the following line: -->
Changed `set_value()` to `set()` in gecko.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
- [x] These changes fix #13657 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because just the `set_value()` call was changed to `set()`

<!-- 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/13663)
<!-- Reviewable:end -->
2016-10-09 21:15:28 -05:00
bors-servo
fe6fac4ee2 Auto merge of #13604 - canaltinova:gradient, r=Manishearth
Implement all gradients

<!-- Please describe your changes on the following line: -->
Implementation of all gradients.
r? @Manishearth

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

<!-- Either: -->
- [ ] 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/13604)
<!-- Reviewable:end -->
2016-10-09 16:40:18 -05:00
Nazım Can Altınova
7300d9ab54 Implement all gradients in stylo 2016-10-09 22:53:17 +03:00
Shubheksha Jalan
3ece937184 changed set_value() to set() in gecko.mako.rs 2016-10-10 01:15:46 +05:30
bors-servo
5955f4a754 Auto merge of #13651 - Manishearth:au-togeckostyle, r=emilio
impl GeckoStyleCoordConvertible for Au

r? @heycam

<!-- 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/13651)
<!-- Reviewable:end -->
2016-10-09 07:52:51 -05:00
bors-servo
a0e404c79e Auto merge of #13620 - Manishearth:type-assert, r=emilio
Test that Servo_* functions have the right signatures

Fixes #12992

Needs #13617

Not very happy with this solution (and perhaps it should be done in pure Rust, though that can be split out as another easy bug).

But it works. The bindings changes are from running a regen on [bug 1308234](https://bugzilla.mozilla.org/show_bug.cgi?id=1308234)

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/13620)
<!-- Reviewable:end -->
2016-10-09 03:56:34 -05:00
Manish Goregaokar
af57a98694 Test that Servo_* functions have the right signatures
Fixes #12992
2016-10-09 09:59:00 +05:30
Manish Goregaokar
cb157b568f impl GeckoStyleCoordConvertible for Au 2016-10-09 00:36:34 +05:30
bors-servo
a25e0670b3 Auto merge of #13636 - Wafflespeanut:properties, r=Manishearth
Add 'image-rendering' support and some cleanup

<!-- 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-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes have been tested manually

![screenshot](https://cloud.githubusercontent.com/assets/6691262/19195866/eb46ffce-8cd0-11e6-8642-a9525da8bf38.png)

r? @Manishearth

<!-- 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/13636)
<!-- Reviewable:end -->
2016-10-07 16:30:29 -05:00
Ravi Shankar
e7a9e46c27 Make use of existing helper for font-stretch 2016-10-07 23:36:06 +05:30
Ravi Shankar
710157c617 Add support for 'image-rendering' in geckolib 2016-10-07 23:35:57 +05:30
bors-servo
cbc857bb78 Auto merge of #13569 - Manishearth:simpliffi, r=emilio
Start simplifying FFI ownership sugar

This is step one of a series of changes planned to make the ownership sugar easier to use. This was blocked on #13038

*very* unsure about second commit. Don't like the thought of accepting types with destructors over FFI. Probably will revert it. Leaving it in for now in case you have some insight.

Eventually at least for the borrowed stuff I want to use T directly (because the crates are merged now), instead of the fake void types. Perhaps for the others too. I might include those changes in this PR -- was originally planning to but I realized that these steps could be split out.

Tentative plan for `Owned` (assuming it's not removed) is to have `Owned<T> <-> Box<T>` (same `T`, no "FFI type") conversions. We will only use ownership wrapper types for things with destructors, and try to keep the conversion simple. I'm envisioning a couple methods for arc/strong and a few more for box/owned. We may need to introduce new wrapper types for gecko-side managed objects (`RefPtr<T>`, `UniquePtr<T>`) but that should be all the wrapper types we have in the ownership sugar.

This PR relies on the guarantee that `Option<&T>` and `Option<Box<T>>` are pointer-sized via the `NonZero` optimization. I am now less unconvinced that this is a good idea 😉.

r? @emilio

cc @mystor

<!-- 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/13569)
<!-- Reviewable:end -->
2016-10-05 00:59:56 -05:00
Ravi Shankar
361f372142 Add support for 'font-stretch' 2016-10-04 15:54:01 +05:30
Manish Goregaokar
b416ccfcae Remove Borrowed<T>/BorrowedMut<T>, use Option<&T> instead. 2016-10-04 15:01:49 +05:30
Manish Goregaokar
c76e382d80 Update glue for StyleComplexColor values 2016-10-02 09:48:41 +05:30
bors-servo
f67e5e4004 Auto merge of #13473 - KiChjang:gecko-letter-spacing, r=Manishearth,Wafflespeanut
Support letter-spacing in stylo

Fixes #12823.

r? @Manishearth

**This needs to be tested!**

<!-- 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/13473)
<!-- Reviewable:end -->
2016-09-30 09:38:26 -05:00
bors-servo
76092c437c Auto merge of #13450 - Wafflespeanut:border_spacing, r=Manishearth
Make use of Servo's border-spacing in Stylo

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

<!-- Either: -->
- [x] These changes have been tested manually

![screenshot](https://cloud.githubusercontent.com/assets/6691262/18867760/1fa46376-84c3-11e6-8e63-9fce042f5bb0.png)

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/13450)
<!-- Reviewable:end -->
2016-09-30 00:25:08 -05:00
Keith Yeung
bce6f7d6f2 Support letter-spacing in stylo 2016-09-28 00:52:43 -07:00
Ravi Shankar
24c00da08c Silence some warnings in geckolib 2016-09-27 18:35:51 +05:30
Ravi Shankar
2999581fb7 Make use of Servo's border-spacing in Stylo 2016-09-27 14:37:36 +05:30
Manish Goregaokar
bc9cbc87ba Move gecko_* into style::gecko
Prepping for the next stage where most of geckolib/ is popped in here
2016-09-24 19:25:59 +05:30
bors-servo
efdd94a2b6 Auto merge of #13331 - mrobinson:background-repeat, r=emilio
Add support for background-repeat: space and round

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

Add support for new background-repeat modes and upgrade Euclid, which now has support for basic arithmetic with Size2D.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This adds support for more background-repeat modes using the legacy
rasterization backend.

<!-- 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/13331)
<!-- Reviewable:end -->
2016-09-22 06:37:10 -05:00
Martin Robinson
68ae97fd0e Add support for background-repeat: space and round
This adds support for more background-repeat modes using the legacy
rendering backend.
2016-09-22 13:20:08 +02:00
Emilio Cobos Álvarez
52aa87bc33
Regen bindings and build fixes. 2016-09-21 21:52:43 +02:00
bors-servo
5e7d918297 Auto merge of #13212 - Manishearth:resync, r=emilio
Handle None_ => None enum changes

Pulls in changes from https://bugzilla.mozilla.org/show_bug.cgi?id=1300337

r? @SimonSapin

don't mark for landing, I'll manually r= this when I do the next sync

<!-- 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/13212)
<!-- Reviewable:end -->
2016-09-10 04:46:37 -05:00
Manish Goregaokar
7138ad7d7e Bug 1300731 - stylo: Implement mask-image; r?heycam 2016-09-10 15:27:45 +08:00
Manish Goregaokar
075a430b99 Bug 1300731 - stylo: Glue for mask-position, reuse code between background and mask; r?heycam 2016-09-10 15:27:44 +08:00
Manish Goregaokar
76651171fb Bug 1300731 - stylo: Implement mask longhands (except mask-image), write glue for most; r?heycam 2016-09-10 15:27:43 +08:00
Manish Goregaokar
3fe13a29f4
Handle None_ => None enum changes 2016-09-09 16:34:15 +08:00
Manish Goregaokar
0cf927801e Resync bindings 2016-09-09 12:25:54 +08:00
bors-servo
c46003eb05 Auto merge of #13157 - Manishearth:background-size, r=emilio
stylo: support background-size and corner gradients

Forgot to fix this in the midst of all other things fixed in #12945

<s>(not yet tested, need to figure out how to test bg-size with gradients)</s>

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/13157)
<!-- Reviewable:end -->
2016-09-04 03:45:05 -05:00
Manish Goregaokar
66c8cd9cf3 stylo: support corner linear-gradients 2016-09-04 07:47:11 +05:30
Manish Goregaokar
04c5d05727 stylo: support background-size 2016-09-04 07:47:10 +05:30
bors-servo
927cd8ebf7 Auto merge of #12991 - Manishearth:more-arc-safety, r=mystor,emilio
Add sugar for handling borrowed and owned types

Implements the changes outlined in https://github.com/servo/servo/pull/12826#discussion_r75074985

<s>Also gets things ready for the Unique/Borrowed bindings</s>

WIP for borrowed and unique in the same PR. Still need to convert all the rest of the gecko types to use the new wrappers.

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/12991)
<!-- Reviewable:end -->
2016-09-02 22:42:21 -05:00
bors-servo
58205f1a78 Auto merge of #13163 - Manishearth:conditional-compilation, r=bholley
Use conditional compilation for stylo properties; output unimplemented logs for all properties

Till now we were only emitting unimplemented property logs for properties which servo implements but stylo doesn't.
This list is getting smaller, and we really should be emitting this for any unexpected property we encounter.

I also made it so that longhands which stylo does not implement will not be compiled in stylo builds; instead of what we currently do,
which is to parse them and then basically ignore the result.

There are still a few exceptions -- we generate stubs for properties that are parts of shorthands because otherwise we'd have to add fiddly conditional compilation to the shorthand code.

r? @bholley

cc @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/13163)
<!-- Reviewable:end -->
2016-09-02 21:45:08 -05:00
Manish Goregaokar
c965beb3d9
Use conditional compilation for stylo properties 2016-09-02 17:45:48 +05:30
Manish Goregaokar
5ec2226f5b
Don't use mem::uninitialized() for making calc values
We had code relying on `nsStyleCoord::set()` being leaky (like it was before we
patched up the calc bindings). Added `nsStyleCoord::null()` for this use case
since it's not possible to construct directly anymore.
2016-09-02 11:39:52 +05:30
Manish Goregaokar
f72cd7ffbc
Review fixes and bindings resync 2016-09-02 08:58:41 +05:30
Manish Goregaokar
0d4c5674ec
Handle RawGeckoElement and friends, add support for types which are used in both maybe-null and non-null forms 2016-09-02 08:56:51 +05:30
Manish Goregaokar
9f6b772bbb
Make Arc helpers into methods 2016-09-02 08:56:42 +05:30