Commit graph

58 commits

Author SHA1 Message Date
Xidorn Quan
5909a4b213 Avoid write atoms files when not necessary
This would avoid rebuilding style component even when nothing is changed
when using "mach build-geckolib --with-gecko".
2016-12-28 17:49:34 +11:00
Xidorn Quan
7f06c554d9 Remove static atoms of CSS properties 2016-12-16 18:14:40 +11:00
Xidorn Quan
3633384f10 Update atoms when build geckolib with gecko 2016-12-16 17:02:25 +11:00
Xidorn Quan
6e78325866 Remove script and doc no longer relevant 2016-12-10 00:33:41 -10:00
Xidorn Quan
446ee7bcc3 Make regen_atoms.py work by itself 2016-12-10 00:33:41 -10:00
Xidorn Quan
1cefd1bef0 Do build-time bindgen
Majority of build_gecko.rs is just the straightforward conversion from
regen.py. There are two differences that:
1. Side in whitelist is changed to mozilla::Side
2. std::atomic__My_base is added to opaque types for Windows
2016-12-10 00:33:41 -10:00
Cameron McCormack
8310962b90 Update regen.py for recent mozilla-central and rust-bindgen. 2016-12-08 00:29:08 -10:00
Emilio Cobos Álvarez
5832507e56 stylo: Whitelist some stuff to work-around bindgen generating too many tests. 2016-12-08 00:27:32 -10:00
Emilio Cobos Álvarez
eafa13c724 stylo: Use proper namespaces in bindings.
This allows us to incrementally remove both bindgen hacks and stylo hacks.
2016-12-08 00:27:32 -10:00
Emilio Cobos Álvarez
606ea019b7
stylo: Use bindgen master again.
Stylo has been stuck with an old version of bindgen from quite a bit of time,
this commit does the minimal stuff to put it working again with master.
2016-12-05 00:14:49 -08:00
Cameron McCormack
2b0d76d825 Update regen.py for recent mozilla-central changes. 2016-12-03 23:06:36 -10:00
Xidorn Quan
bddd467c0e Add insertRule/deleteRule support for stylo 2016-12-01 16:20:02 +11:00
Bobby Holley
992f7dddf4 Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-24 17:07:38 -08:00
Xidorn Quan
a9296bc89c Add stylo FFI for CSSStyleRule 2016-11-24 10:28:38 +11:00
Xidorn Quan
9d4ab0d3e9 Add stylo FFI for CSSRuleList 2016-11-24 10:28:38 +11:00
Xidorn Quan
9ad80f280a Remove unused check_bindings 2016-11-23 15:24:40 +11:00
bors-servo
95bc7ece47 Auto merge of #14268 - Manishearth:regen, r=bholley
Regenerate bindings

Don't merge 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/14268)
<!-- Reviewable:end -->
2016-11-21 12:19:39 -06:00
Cameron McCormack
c6be1a8995 Regenerate bindings.
MozReview-Commit-ID: LLZf2HKBpjF
2016-11-21 11:35:02 +08:00
Manish Goregaokar
3d5b26ac26 Uplift bitfield fix for nsChangeHint 2016-11-18 21:45:12 -08:00
Manish Goregaokar
bb5f351f4a stylo: support transform 2016-11-10 16:38:15 -08:00
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