Commit graph

24 commits

Author SHA1 Message Date
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
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
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
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
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
Renamed from ports/geckolib/binding_tools/regen.py (Browse further)