Commit graph

35 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
14b176019c style: Simplify a bit our generated bindings by getting rid of FooBorrowed and FooBorrowedMut.
This reduces a lot the boilerplate that's needed in order to add simple binding
functions.

This starts using &Foo and Option<&Foo> instead, and as a result we need to
remove the servo_function_signatures test, which is a bit unfortunate.

I think it's worth though, this causes problems on some platforms (see bug
1534844), and messing up the functions signature is not something that I've ever
seen (other than bug 1308234, which already had all the FooBorrowed mess which
I'm removing).

Also, cbindgen understands references and Option<&Foo>, so it will be the way to
go in the future.

After this patch we can also remove HasSimpleFFI, but I've kept it for now since
I still use it in a few places, and this patch is quite big on its own.

Differential Revision: https://phabricator.services.mozilla.com/D24092
2019-03-27 14:29:19 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Simon Sapin
b1822a39fa cargo fix --edition --features gecko 2018-11-10 17:47:28 +01:00
Emilio Cobos Álvarez
175e594652
style: Format recent patches. 2018-11-08 15:22:29 +01:00
Cameron McCormack
de5584c1f6
style: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs.
Depends on D10651

Differential Revision: https://phabricator.services.mozilla.com/D10652
2018-11-08 15:22:26 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Cameron McCormack
9865a4194c
style: Merge css::{URLValueData, ImageValue} into css::URLValue.
Differential Revision: https://phabricator.services.mozilla.com/D8061
2018-10-19 00:34:27 +02:00
chansuke
8dab4d659a
Format style component. 2018-09-09 16:24:45 +02:00
Emilio Cobos Álvarez
f564b32b75
style: Better debugging for stylesheets and URLs.
Bug: 1470145
Reviewed-by: xidorn
MozReview-Commit-ID: FIcz2K1ZYX0
2018-06-23 20:37:03 +02:00
Emilio Cobos Álvarez
63ca2a803d
style: Make clearing atoms slightly more ergonomic.
I prefer to do it this way because Atom has inline paths for static atoms and
such.

Bug: 1466609
Reviewed-by: xidorn
MozReview-Commit-ID: CFsBHl80KDY
2018-06-12 12:15:11 -07:00
Emilio Cobos Álvarez
d461a7ddbe
style: Make the threadsafe refcounting macros more reusable.
Bug: 1466609
Reviewed-by: xidorn
MozReview-Commit-ID: IanxqRksGqE
2018-06-12 12:15:10 -07:00
Bobby Holley
dfa019c884
style: Parse sheets on the thread pool.
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.

Bug: 1346988
Reviewed-by: bz,emilio
MozReview-Commit-ID: KddpGFdaqEe
2018-04-28 10:25:59 +02:00
Bobby Holley
c99bcdd4b8 Run rustfmt on selectors, servo_arc, and style.
This was generated with:

./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style

Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Xidorn Quan
80ab893e3a Use Servo data to back @counter-style rule. 2018-04-05 09:33:45 +10:00
Xidorn Quan
ac7467221a Use Servo data to back @font-face rule in Gecko. 2018-04-04 09:33:07 +10:00
Emilio Cobos Álvarez
b5f8edc4ae
style: Unconditionally implement Debug for RefPtr.
Bindgen doesn't know how to derive debug for a Gecko font family list. Hopefully
it doesn't need to.

Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: 4iZKzjad6K9
2017-10-31 17:31:17 +01:00
Cameron McCormack
4d9dd4b757 style: Use a SharedFontList object to store font-family values for Gecko. 2017-10-04 13:38:07 +08:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Manish Goregaokar
74519cc1a7 stylo: Make Servo Arc types use ptr to T instead of ptr to ArcInner<T> 2017-07-17 18:03:09 -07:00
Xidorn Quan
11ac1e894e Add basic integration of @counter-style. 2017-05-16 14:42:33 +10:00
Emilio Cobos Álvarez
e6fc0aae14
Update bindgen.
MozReview-Commit-ID: Dyyvo6YMTcL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:17:02 +02:00
cku
7d1ef34698 stylo: Export RefPtr<ImageValue> to stylo. 2017-05-09 16:46:47 +08:00
Anthony Ramine
3c68c28ff7 Implement grid-template-areas (fixes #16079) 2017-05-04 19:10:45 +02:00
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
bors-servo
42f58503c0 Auto merge of #16169 - servo:stylo-heapsize, r=emilio
Remove heapsize for Stylo

It doesn’t seem to be used, and is causing compilation trouble for Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1350581

<!-- 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/16169)
<!-- Reviewable:end -->
2017-04-05 03:59:26 -05:00
Xidorn Quan
37585309e9 Use a UrlExtraData type alias to unify url handling logic. 2017-04-03 21:57:16 +10:00
Xidorn Quan
0a97a0df0c Create URLExtraData for holding base uri, referrer, and principal. 2017-04-03 14:30:33 +10:00
Xidorn Quan
e36b92507e Add FFI for nsCSSFontFaceRule. 2017-03-30 10:46:46 +11:00
Simon Sapin
94eb159137 Remove heapsize for Stylo 2017-03-28 17:50:52 +02:00
Manish Goregaokar
fa9881b829 stylo: Add mako template for URLOrNone, use for marker-* properties
MozReview-Commit-ID: 4QKKzJ1DVYP
2017-02-18 02:43:31 -08:00
Manish Goregaokar
d87b710fdd stylo: Store servo computed values for animation properties
MozReview-Commit-ID: IoQLN5tdIBw
2017-01-11 15:24:53 -08:00
Emilio Cobos Álvarez
f97e5ff9aa
style: Document the RefPtr sugar module. 2017-01-02 12:57:59 +01: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
Manish Goregaokar
bb5f351f4a stylo: support transform 2016-11-10 16:38:15 -08:00
Manish Goregaokar
2bde9462b1 Add safer bindings for RefPtr 2016-10-14 00:44:06 +05:30