Commit graph

38 commits

Author SHA1 Message Date
bors-servo
2390503772 Auto merge of #14038 - upsuper:bug1294299, r=heycam
Add Element.style support for stylo

<!-- Please describe your changes on the following line: -->
This is the Servo side change of [bug 1294299](https://bugzilla.mozilla.org/show_bug.cgi?id=1294299) which has been reviewed by @heycam, @emilio, and @SimonSapin.

This should not be merged until the Gecko side change gets merged into mozilla-central.

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
- [ ] 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/14038)
<!-- Reviewable:end -->
2016-11-03 23:42:06 -05:00
Cameron McCormack
5bae1e0262 Whitelist ThreadSafeFooHolder types in bindings.rs. 2016-11-03 18:00:57 +08:00
Xidorn Quan
e8a3d935ad Add static atoms for CSS properties from Gecko 2016-11-03 15:01:46 +11:00
Xidorn Quan
1af2edf190 Add binding functions for length and item getter of DeclarationBlock 2016-11-03 14:48:47 +11:00
Bobby Holley
833af4521a Regenerate bindings for mozilla-central rev e3279760cd977aac30bd9e8032d3ee71f55d2a67. 2016-10-30 15:25:40 -07:00
bors-servo
398f505ace Auto merge of #13974 - heycam:rm-bindgen-option, r=emilio
Stop passing now-unrecognized --no-type-renaming to rust-bindgen.

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

r? @emilio

---
<!-- 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/13974)
<!-- Reviewable:end -->
2016-10-29 22:26:10 -05:00
Bobby Holley
be89f73675 Rename NodeData and associated data structures to Element*.
MozReview-Commit-ID: 96VsmsoZtjZ
2016-10-29 14:58:07 -07:00
Cameron McCormack
99cd19e410 Stop passing now-unrecognized --no-type-renaming to rust-bindgen. 2016-10-29 17:50:05 +08:00
Cameron McCormack
df4194154e Regenerate bindings.
MozReview-Commit-ID: LTpO8Kt3ALk
2016-10-28 19:28:59 +08:00
Xidorn Quan
3303a978b9 Use nsACString to pass string params for bindings 2016-10-25 18:22:45 +11:00
Xidorn Quan
109bf2a755 Move RawGecko{Node,Element,Document} to bindings 2016-10-24 20:43:42 +11:00
Xidorn Quan
b7fffb3829 Use str for bindgen output directly. 2016-10-22 13:59:20 +11:00
Bobby Holley
adf0fe9b9a Rearrange some data structures in preparation for the new incremental restyle algorithm.
MozReview-Commit-ID: 8iOALQylOuK
2016-10-21 13:00:01 -07:00
Cameron McCormack
605c2e0100 Regenerate bindings. 2016-10-19 12:19:41 +08:00
Manish Goregaokar
f967647226 Declare nullable strong borrowed ref type for RawServoDeclarationBlock. 2016-10-18 16:48:27 +11:00
Xidorn Quan
edeeafe5a7 Rename ServoDeclarationBlock to RawServoDeclarationBlock. 2016-10-18 15:48:36 +11:00
Cameron McCormack
3c20d12824 Make some lists in regen.py neater. 2016-10-17 10:05:50 +08:00
Manish Goregaokar
17a46418dc Add bindings for constructing nsStyleQuoteValues
MozReview-Commit-ID: EjuzgZKMpPp
2016-10-14 00:44:07 +05:30
Manish Goregaokar
398a6343b3 Vendor m-c's nsstring in-tree
It is called nsstring_vendor since libgkrust already depends on nsstring, and
we can't have two crates with the same name in-tree. We can't directly depend
on the in-tree one since this will stop independent `./mach build-geckolib` builds from working.

MozReview-Commit-ID: CR4tHgzXWFZ
2016-10-12 18:12:52 +05:30
bors-servo
7e192ce644 Auto merge of #13700 - Manishearth:bindgen-testing, r=emilio
Run bindings tests with whole crate

We currently run bindgen's autogenerated `#[test]` blocks directly on the structs files.

That is, after generating them, we run `rustc --test` on them. This works fine for now, but
if you want to refer to types defined outside of these files (e.g. in https://bugzilla.mozilla.org/show_bug.cgi?id=1309165),
the tests are broken.

This puts a `cargo test -p style` in `./mach test-stylo`. I disabled doctests because they were failing (unable to find the `ns!()` and `atom!()` macros), and I couldn't figure out why -- will investigate in a later bug.

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/13700)
<!-- Reviewable:end -->
2016-10-12 00:14:35 -05:00
Manish Goregaokar
3d7c997a4f Run bindings tests with whole crate 2016-10-12 10:00:31 +05:30
Bobby Holley
a5aed43cd8 Fix bindings.rs warnings.
MozReview-Commit-ID: G03MWTQMkWt
2016-10-11 14:05:29 +05:30
Bobby Holley
8abc1bd275 Eliminate warning about unsafe references to extern static variables.
MozReview-Commit-ID: 7UJNBaEWnH7
2016-10-11 14:05:27 +05:30
Manish Goregaokar
9812034b96 Regen bindings 2016-10-10 15:34:49 +05:30
Ravi Shankar
2b4d301fbf Import NS_FONT_* constants for font-* glue 2016-10-09 22:40:51 +05:30
Rafael Gomes Dantas
5be551e10e Script-generated tests for Servo_* gecko bindings 2016-10-06 16:18:54 +01:00
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
Manish Goregaokar
b416ccfcae Remove Borrowed<T>/BorrowedMut<T>, use Option<&T> instead. 2016-10-04 15:01:49 +05:30
Ravi Shankar
854258c76e Add NS_FONT_STRETCH_* to bindgen script 2016-10-03 20:40:34 +05:30
bors-servo
7914f14caa Auto merge of #13518 - upsuper:patch-1, r=emilio
Move --use-msvc-mangling out from clang flags.

`--use-msvc-mangling` is not a clang flag, but a flag for bindgen.

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/13518)
<!-- Reviewable:end -->
2016-10-01 09:47:00 -05:00
Ravi Shankar
fa06b922c7 Refactor geckolib atoms regen script 2016-09-30 20:48:36 +05:30
bors-servo
c834e57f4d Auto merge of #13477 - Manishearth:regen, r=emilio
Regenerate bindings

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/13477)
<!-- Reviewable:end -->
2016-09-30 08:39:50 -05:00
Xidorn Quan
910853f12a Move --use-msvc-mangling out from clang flags. 2016-09-30 11:09:43 +10:00
Manish Goregaokar
ac80fcf220 Fix indent in regen.py; fix imports 2016-09-28 13:26:16 +02:00
Ravi Shankar
67d26b36a1 Minor cleanup to the bindgen scripts 2016-09-27 18:07:39 +05:30
Ravi Shankar
1924df0c00 Update README for bindgen tools 2016-09-27 18:07:30 +05:30
Manish Goregaokar
b2e592b121 Move most of geckolib into style::gecko 2016-09-26 09:07:17 +02:00
Manish Goregaokar
c6787458d9 Move gecko_bindings and gecko_string_cache into the style crate 2016-09-24 19:25:55 +05:30