Commit Graph

1788 Commits

Author SHA1 Message Date
Nicholas Nethercote
bf48aecf29 Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8.
nsIXPCScriptable flags handling in xpc_map_end.h is a bit of a mess.

- Half the flags relate to whether various functions are defined (PreCreate,
  GetProperty, etc). These are set using the XPC_MAP_WANT_* macros;
  for each one xpc_map_end.h  inserts the corresponding flag using the
  preprocessor (see XPC_MAP_CLASSNAME::GetScriptableFlags()).

- The other half of the flags relate to other things (IS_GLOBAL_OBJECT,
  DONT_REFLECT_INTERFACE_NAMES, etc). These are set using the XPC_MAP_FLAGS
  macro.

Having two similar but different mechanisms to set the flags for a class is
confusing. (Indeed, until recently we had some classes where a single flag was
redundantly specified via both mechanisms.) Note also that the classes done in
dom/base/nsIDOMClassInfo.h also specify all the flags in a single value,
similar to how XPC_MAP_FLAGS works.

This patch removes the XPC_MAP_WANT_* macros. All flags are now set
via XPC_MAP_FLAGS. This is a significant simplification to xpc_map_end.h and
all the places that use it.

The downside of this change is that I had to change the flag constants from
class constants (i.e. nsIXPCScriptable::FOO) to macros (i.e.
NSIXPCSCRIPTABLE_FOO) because they need to be used in #if statements like this
in xpc_map_end.h:

  #if !((XPC_MAP_FLAGS) & NSIXPCSCRIPTABLE_WANT_PRECREATE)

and you can't use a '::'-qualified name inside a #if. I think this downside is
outweighed by the simplification described above.

Overall the patch removes 80 lines of code.

--HG--
extra : rebase_source : 6d5c341d0deba8f1529d81c17bb8819e09620b05
2017-01-23 13:33:58 +11:00
Boris Zbarsky
41da750c3e Bug 851892 part 20. Remove the remaining bits we added to support a mix of WebIDL and non-WebIDL rules. r=peterv 2017-01-13 10:41:05 -05:00
Boris Zbarsky
bbf09020fb Bug 851892 part 19. Convert CSSCounterStyleRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
b7f22f88b0 Bug 851892 part 18. Convert CSSKeyframesRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
fa5fe536da Bug 851892 part 17. Convert CSSKeyframeRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
284cc54462 Bug 851892 part 16. Convert CSSFontFeatureValuesRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
5398bc5f13 Bug 851892 part 15. Convert CSSFontFaceRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
b1b80495aa Bug 851892 part 14. Convert CSSPageRule to WebIDL. r=peterv,heycam
The PutForwards bit is a new feature, but easy enough to implement here.
2017-01-13 10:41:04 -05:00
Boris Zbarsky
4ce77bc3a3 Bug 851892 part 13. Convert media, supports, and moz-document rules to WebIDL. r=peterv,heycam 2017-01-13 10:41:03 -05:00
Boris Zbarsky
2daa8920fe Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
d274f30b35 Bug 851892 part 11. Convert CSSImportRule to WebIDL. r=peterv,heycam,mccr8
Note that the .media PutForwards is a new feature coming along for the ride now
that we're using the spec IDL.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
03dbb8c08b Bug 851892 part 10. Convert CSSNamespaceRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:03 -05:00
Boris Zbarsky
1d545c87da Bug 851892 part 6. Make css::Rule inherit from nsIDOMCSSRule. r=heycam 2017-01-13 10:41:02 -05:00
Boris Zbarsky
68f0d1f0fa Bug 851892 part 3. Give CSS rules a PreCreate hook so we can safely wrappercache them. r=peterv 2017-01-13 10:41:02 -05:00
Sebastian Hengst
72d2ef9dde Backed out changeset ca8c00f9738d (bug 851892) 2017-01-20 19:30:55 +01:00
Sebastian Hengst
7f2820fd7b Backed out changeset 271c7cd7b59a (bug 851892) 2017-01-20 19:30:41 +01:00
Sebastian Hengst
e21b4b941f Backed out changeset 9dee4f98503c (bug 851892) 2017-01-20 19:30:23 +01:00
Sebastian Hengst
e533169d2c Backed out changeset eab8ccda41b8 (bug 851892) 2017-01-20 19:30:19 +01:00
Sebastian Hengst
d4070f77eb Backed out changeset 31103a03f2c2 (bug 851892) 2017-01-20 19:30:14 +01:00
Sebastian Hengst
927a298938 Backed out changeset 1bbbc436690d (bug 851892) 2017-01-20 19:30:10 +01:00
Sebastian Hengst
7185ac1f02 Backed out changeset 34c280ac5f73 (bug 851892) 2017-01-20 19:30:05 +01:00
Sebastian Hengst
d93216e56b Backed out changeset 332bb85695a9 (bug 851892) 2017-01-20 19:30:01 +01:00
Sebastian Hengst
9815df27fe Backed out changeset 430f2759de65 (bug 851892) 2017-01-20 19:29:56 +01:00
Sebastian Hengst
72128a359b Backed out changeset 76136a4cadcc (bug 851892) 2017-01-20 19:29:52 +01:00
Sebastian Hengst
715a24f4ba Backed out changeset 663ad79f5c13 (bug 851892) 2017-01-20 19:29:47 +01:00
Sebastian Hengst
530e4006d3 Backed out changeset f62d345e9d41 (bug 851892) 2017-01-20 19:29:42 +01:00
Sebastian Hengst
d310ee3521 Backed out changeset c79e8bee853e (bug 851892) 2017-01-20 19:29:38 +01:00
Boris Zbarsky
7b5144e947 Bug 851892 part 20. Remove the remaining bits we added to support a mix of WebIDL and non-WebIDL rules. r=peterv 2017-01-13 10:41:05 -05:00
Boris Zbarsky
0c99ca4a95 Bug 851892 part 19. Convert CSSCounterStyleRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
86f140582c Bug 851892 part 18. Convert CSSKeyframesRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
85811452d4 Bug 851892 part 17. Convert CSSKeyframeRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
ffb7175144 Bug 851892 part 16. Convert CSSFontFeatureValuesRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
aa1b340502 Bug 851892 part 15. Convert CSSFontFaceRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
c6365390a7 Bug 851892 part 14. Convert CSSPageRule to WebIDL. r=peterv,heycam
The PutForwards bit is a new feature, but easy enough to implement here.
2017-01-13 10:41:04 -05:00
Boris Zbarsky
85499be2bd Bug 851892 part 13. Convert media, supports, and moz-document rules to WebIDL. r=peterv,heycam 2017-01-13 10:41:03 -05:00
Boris Zbarsky
2132f0075d Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
a5709a4cb8 Bug 851892 part 11. Convert CSSImportRule to WebIDL. r=peterv,heycam,mccr8
Note that the .media PutForwards is a new feature coming along for the ride now
that we're using the spec IDL.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
1e1b760bf1 Bug 851892 part 10. Convert CSSNamespaceRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:03 -05:00
Boris Zbarsky
18c01c8290 Bug 851892 part 6. Make css::Rule inherit from nsIDOMCSSRule. r=heycam 2017-01-13 10:41:02 -05:00
Boris Zbarsky
ead4958276 Bug 851892 part 3. Give CSS rules a PreCreate hook so we can safely wrappercache them. r=peterv 2017-01-13 10:41:02 -05:00
Phil Ringnalda
686006613e Backed out 20 changesets (bug 851892) for load failures in Android crashtest-4
Backed out changeset b9c4115cdeac (bug 851892)
Backed out changeset 5f491bf49b85 (bug 851892)
Backed out changeset 9bf5bcb3e8c5 (bug 851892)
Backed out changeset a9cab46e8b45 (bug 851892)
Backed out changeset 73858e15c8c0 (bug 851892)
Backed out changeset a25638588b6b (bug 851892)
Backed out changeset d58e0e5069ef (bug 851892)
Backed out changeset d8da2a3d8f10 (bug 851892)
Backed out changeset a8da3c34983f (bug 851892)
Backed out changeset 29cf8acbd21e (bug 851892)
Backed out changeset c53cd7bdf8b3 (bug 851892)
Backed out changeset e841a2796375 (bug 851892)
Backed out changeset 2eab85b00159 (bug 851892)
Backed out changeset ca4b1fb9cae4 (bug 851892)
Backed out changeset 74c0ba66f108 (bug 851892)
Backed out changeset 719bb9f41e5b (bug 851892)
Backed out changeset d6aa4c6192df (bug 851892)
Backed out changeset dc81a167a75d (bug 851892)
Backed out changeset 65422477b3a5 (bug 851892)
Backed out changeset 3089dd379077 (bug 851892)
2017-01-15 11:50:10 -08:00
Boris Zbarsky
2e450c06d0 Bug 851892 part 20. Remove the remaining bits we added to support a mix of WebIDL and non-WebIDL rules. r=peterv 2017-01-13 10:41:05 -05:00
Boris Zbarsky
f035fcf088 Bug 851892 part 19. Convert CSSCounterStyleRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
e5e72465fa Bug 851892 part 18. Convert CSSKeyframesRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
d195e29770 Bug 851892 part 17. Convert CSSKeyframeRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
04f7e7401b Bug 851892 part 16. Convert CSSFontFeatureValuesRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
3cbcb3bbc9 Bug 851892 part 15. Convert CSSFontFaceRule to WebIDL. r=peterv,heycam 2017-01-13 10:41:04 -05:00
Boris Zbarsky
34027d6d12 Bug 851892 part 14. Convert CSSPageRule to WebIDL. r=peterv,heycam
The PutForwards bit is a new feature, but easy enough to implement here.
2017-01-13 10:41:04 -05:00
Boris Zbarsky
53db7fe244 Bug 851892 part 13. Convert media, supports, and moz-document rules to WebIDL. r=peterv,heycam 2017-01-13 10:41:03 -05:00
Boris Zbarsky
12d9bfeec4 Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00