This depends on https://github.com/eqrion/cbindgen/pull/308. Other than that,
this should be ready to go.
There's still a bit more magic than what I'd like to eventually. I should be
able to make cbindgen not rename types if it doesn't know about them, or
something.
But this removes most of the manual binding function implementations (all but
the ones that are declared via macros, which cbindgen doesn't see across).
I need to give up on the _Drop functions taking an Owned<T> because of
instantiation order fiasco. In order to define DefaultDelete I need Owned to be
complete, but I cannot do it after including the generated file since some
declarations already instantiate the specialization. Oh well.
Differential Revision: https://phabricator.services.mozilla.com/D24798
--HG--
rename : servo/components/style/cbindgen.toml => servo/ports/geckolib/cbindgen.toml
extra : moz-landing-system : lando
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
--HG--
extra : moz-landing-system : lando
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
(Also remove stale decl for DoGetOverflowY, which cleanup_computed_getters.py
found for me.)
Differential Revision: https://phabricator.services.mozilla.com/D14618
--HG--
extra : moz-landing-system : lando
This fixes the issue that we should no longer be looking for control characters.
MozReview-Commit-ID: 8k89Aheq3NY
Differential Revision: https://phabricator.services.mozilla.com/D8876
--HG--
extra : moz-landing-system : lando
Has a single caller, from which we pass the arguments. We can just avoid that.
Differential Revision: https://phabricator.services.mozilla.com/D8276
--HG--
extra : moz-landing-system : lando
This matches the spec, https://drafts.csswg.org/css-values/#angles, which says:
> All <angle> units are compatible, and deg is their canonical unit.
And https://drafts.csswg.org/css-values/#compat, which says:
>When serializing computed values [...], compatible units [...] are converted into a single canonical unit.
And also other implementations (Blink always serializes angles as degrees in
computed style for example).
Also allows us to get rid of quite a bit of code, and makes computed angle value
representation just a number, which is nice.
Differential Revision: https://phabricator.services.mozilla.com/D8619
--HG--
extra : moz-landing-system : lando
I had this around, I couldn't work on more stuff today, but I may as well land
this.
Differential Revision: https://phabricator.services.mozilla.com/D8277
--HG--
extra : moz-landing-system : lando
This was done automatically replacing:
s/mozilla::Move/std::move/
s/ Move(/ std::move(/
s/(Move(/(std::move(/
Removing the 'using mozilla::Move;' lines.
And then with a few manual fixups, see the bug for the split series..
MozReview-Commit-ID: Jxze3adipUh
So that hacking on this header can be less painful...
MozReview-Commit-ID: LmpMnF7q9RG
--HG--
extra : source : b68215ade7403ae9c6fbf20cb64a64c04a67ee66