Граф коммитов

5082 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight f922f43922 Bug 1595828 - Fix some include guards. r=froydnj
The formatting change presumably happens because clang-format treats
include guards differently.

Differential Revision: https://phabricator.services.mozilla.com/D52698

--HG--
extra : moz-landing-system : lando
2019-11-12 17:27:20 +00:00
Byron Campen [:bwc] f5e5fe0d20 Bug 1588588: Remove jsimpl for RTCStatsReport, and refactor to prepare for moving some stats functionality to RTCRtpReceiver/Sender. r=smaug,ng
Differential Revision: https://phabricator.services.mozilla.com/D49195

--HG--
extra : moz-landing-system : lando
2019-11-07 23:07:05 +00:00
Edgar Chen 9a7e35c0ce Bug 1594614 - Remove isExposedOnMainThread from IDLExposureMixins; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D52118

--HG--
extra : moz-landing-system : lando
2019-11-07 02:01:18 +00:00
Brian Grinstead d981495450 Bug 1593119 - Remove dom/xbl and the MOZ_XBL build option r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51338

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:32 +00:00
Sid Vishnoi 6023989158 Bug 1575144 - Update Geolocation implementation to match latest spec r=baku,marcosc
The Geolocation API specification renamed the following interfaces and removed the [NoInterfaceObject] annotation so that these types are now exposed to script:
* Coordinates -> GeolocationCoordinates
* Position -> GeolocationPosition
* PositionError -> GeolocationPositionError

This is done in response to an effort to remove the [NoInterfaceObject]
annotation from WebIDL.

Additionally, the following interfaces are now only exposed in Secure Contexts:
* GeolocationCoordinates
* GeolocationPosition

Differential Revision: https://phabricator.services.mozilla.com/D51972

--HG--
rename : dom/geolocation/PositionError.cpp => dom/geolocation/GeolocationPositionError.cpp
rename : dom/geolocation/PositionError.h => dom/geolocation/GeolocationPositionError.h
rename : dom/webidl/Coordinates.webidl => dom/webidl/GeolocationCoordinates.webidl
rename : dom/webidl/Position.webidl => dom/webidl/GeolocationPosition.webidl
rename : dom/webidl/PositionError.webidl => dom/webidl/GeolocationPositionError.webidl
extra : moz-landing-system : lando
2019-11-06 12:35:42 +00:00
Boris Zbarsky 3d248ab528 Bug 1592771. Add tests for round-tripping of various external strings through bindings. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D51180

--HG--
extra : moz-landing-system : lando
2019-10-30 22:09:15 +00:00
Boris Zbarsky 733a6ca66b Bug 1591514 part 2. Add assertions to FakeString that its mData is only initialized once and not used before initialization. r=mccr8
Also removes some unused API bits to make the number of entry points smaller
and safer.

Differential Revision: https://phabricator.services.mozilla.com/D50693

--HG--
extra : moz-landing-system : lando
2019-10-29 19:02:42 +00:00
Boris Zbarsky 168fcede40 Bug 1591514 part 1. Change bindings to use actual literal strings for string constants. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50692

--HG--
extra : moz-landing-system : lando
2019-10-29 00:26:28 +00:00
Boris Zbarsky 84e60db6d8 Bug 1591481 part 2. Don't force copying when external strings are passed to Web IDL bindings. r=mccr8
The codesize impact is approximately 0 (actually positive by a a few KB),
because AssignJSString is not inlined.

If we were to force-inline AssignJSString, that would actually _save_ ~115KB
based on bloaty measurements for linux64 shippable opt builds (so with LTO),
because then ConvertJSValueToString stops being inlined in bindings.
Given that ConvertJSValueToString pretty much always calls AssignJSString, so
there is no slowdown from changing which of them is inlined, this is _really_
tempting to do, but I don't want to mess with compiler inlining heuristics...
Inlining both AssignJSString and ConvertJSValueToString increases codesize by
~2MB, so that's definitely _not_ desirable.

Differential Revision: https://phabricator.services.mozilla.com/D50627

--HG--
extra : moz-landing-system : lando
2019-10-30 15:52:22 +00:00
Boris Zbarsky 40d45356a8 Bug 1591481 part 1. Make NormalizeUSVString fallible. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50691

--HG--
extra : moz-landing-system : lando
2019-10-29 00:24:10 +00:00
Boris Zbarsky d867da8312 Bug 1588194 part 2. Add missing property use counters to Window. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D49045

--HG--
extra : moz-landing-system : lando
2019-10-29 16:20:49 +00:00
Boris Zbarsky 89b4cac9a3 Bug 1588194 part 1. Factor out the missing property use counter code into helper functions. r=peterv
This incidentally reduces the codesize, while allowing us to call those
functions from elsewhere.  The performance impact of the extra out-of-line call
is not measurable (that is, is within the noise level) on the testcase at
<https://bugzilla.mozilla.org/attachment.cgi?id=9096814>.

Differential Revision: https://phabricator.services.mozilla.com/D49044

--HG--
extra : moz-landing-system : lando
2019-10-29 16:18:44 +00:00
Boris Zbarsky d36e5a4ea5 Bug 1214364 part 4. Only output full-featured Init methods for dictionaries that need them. r=peterv
Dictionaries that we never initialize with JS values don't need a full-featured
Init() method.  Instead, we output a cut-down Init() method that doesn't even
take a JSContext and Value as argument, and skips as much work as it can.  It
uses constant-false for "is the value present?", but also, to avoid compilation
errors due to use of `cx` and `val` in now-dead conversion code, it tells the
native-to-JS conversion machinery that the value is always missing, which lets
it skip most of the the work it would normally try to do and just output
initialization to the default value.  We only need to do this for members that
have default values; the others either remain no-passed or are required members
with no default-initialization behavior.

This saves about 330KB of codesize on Linux64 without PGO and 285KB with PGO.

Differential Revision: https://phabricator.services.mozilla.com/D48007

--HG--
extra : moz-landing-system : lando
2019-10-28 20:24:31 +00:00
Boris Zbarsky 0d2e9ff1f1 Bug 1214364 part 3. Only output ToObjectInternal methods for dictionaries that need it. r=peterv
This saves about 270KB of codesize on Linux64 without LTO, or 20KB with LTO.

The basic idea is that we can flag dictionaries that need to-JS conversion
(hence ToObjectInternal) based on various IDL uses (return value in normal
interface, argument in callback, etc) and then annotate the ones that are
converted to JS manually in C++ code.

The mozwebidlcodegen changes are needed because non-local changes (e.g. whether
a dictionary is used as a return value somewhere) can now affect the code
generation for a dictionary and hence whether the relevant binding file should
be regenerated.  Since these changes can happen in any .webidl file, we need to
check for them.  We can't track this via the dependency set on the dictionary
itself, because that would not notice new uses being added.

Differential Revision: https://phabricator.services.mozilla.com/D48006

--HG--
extra : moz-landing-system : lando
2019-10-28 23:20:11 +00:00
Boris Zbarsky bbc03b9834 Bug 1214364 part 2. Remove the dead code around MethodNotNewObjectError. r=peterv
I don't know when we stopped raising them, but we did at some point.

I am leaving the capability to not generate a union's ToJSVal method, because I will need it soon.

Differential Revision: https://phabricator.services.mozilla.com/D48554

--HG--
extra : moz-landing-system : lando
2019-10-23 18:04:30 +00:00
Boris Zbarsky 3a2aa6f9b1 Bug 1214364 part 1. Only output conversions to/from JSON for dictionaries that need it. r=peterv
This saves about 200KB of codesize on Linux64 without LTO.  No effect with LTO,
but is needed for the following patches to work.

Very few dictionaries need these conversions, so explicit opt-in is fine.

Differential Revision: https://phabricator.services.mozilla.com/D48005

--HG--
extra : moz-landing-system : lando
2019-10-23 15:58:29 +00:00
Kagami Sascha Rosylight 8ae1d6eba9 Bug 1591849 - Support [Pure] for stringifier attributes r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50795

--HG--
extra : moz-landing-system : lando
2019-10-28 20:39:09 +00:00
Kagami Sascha Rosylight e30a6dbb4a Bug 824857: Support IDL stringifier attributes r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D48355

--HG--
extra : moz-landing-system : lando
2019-10-23 04:55:54 +00:00
Boris Zbarsky a0b4a1fee2 Bug 1582892. Expose the number of strings in a Web IDL enum in a nice way. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49536

--HG--
extra : moz-landing-system : lando
2019-10-23 03:54:39 +00:00
Daniel Varga ae5334abca Backed out changeset f9a4c8d67be3 (bug 1582892) for build bustage at build/src/dom/console/ConsoleInstance. On a CLOSED TREE 2019-10-23 06:13:54 +03:00
Boris Zbarsky e09da7b0c7 Bug 1582892. Expose the number of strings in a Web IDL enum in a nice way. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49536

--HG--
extra : moz-landing-system : lando
2019-10-18 03:26:43 +00:00
Boris Zbarsky 6b4b1eb4fb Bug 1589285 part 1. Expose a nicer way to get strings given a Web IDL enum value. r=edgar
Returning a span ensures that consumers don't try to use this without a length,
but does hide the fact that our string is always null-terminated, at least for
the moment...

Differential Revision: https://phabricator.services.mozilla.com/D49531

--HG--
extra : moz-landing-system : lando
2019-10-17 23:20:48 +00:00
Sylvestre Ledru 7c309095ea Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D49056

--HG--
extra : moz-landing-system : lando
2019-10-21 14:13:44 +00:00
Jan de Mooij 29c575f795 Bug 1586991 part 24 - Don't assume JS atoms are null-terminated in GetArrayIndexFromId. r=bzbarsky
This also adds a GetLinearStringCharAt helper function to simplify GetArrayIndexFromId.

Differential Revision: https://phabricator.services.mozilla.com/D49723

--HG--
extra : moz-landing-system : lando
2019-10-19 17:55:01 +00:00
Boris Zbarsky e7ff63c252 Bug 1582592. Improve the default return type for example codegen's GetParentObject. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49467

--HG--
extra : moz-landing-system : lando
2019-10-17 22:08:54 +00:00
Boris Zbarsky e68130b666 Bug 1587819. Convert [HTMLConstructor] to being an extended attribute on constructor operations. r=edgar
The changes to the IDL files were done by running this in dom/webidl:

  perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor,\n Exposed=Window\]\ninterface ([A-Za-z]+) : HTMLElement \{/[Exposed=Window]\ninterface \1 : HTMLElement {\n  [HTMLConstructor] constructor();\n/g' *.webidl

and then fixing any remaining parser failures.  That involved hand-editing the
following files:

  TestCodeGen.webidl
  XULFrameElement.webidl
  XULMenuElement.webidl
  XULTextElement.webidl
  XULTreeElement.webidl
  HTMLAudioElement.webidl
  HTMLDialogElement.webidl
  HTMLElement.webidl
  HTMLEmbedElement.webidl
  HTMLFormElement.webidl
  HTMLImageElement.webidl
  HTMLObjectElement.webidl
  HTMLOptionElement.webidl
  HTMLSlotElement.webidl
  HTMLVideoElement.webidl
  XULElement.webidl
  XULPopupElement.webidl

Differential Revision: https://phabricator.services.mozilla.com/D49349

--HG--
extra : moz-landing-system : lando
2019-10-17 15:38:39 +00:00
Boris Zbarsky 6a8f96bfba Bug 1588845. Update Other and ArgumentNameKeyword productions in Web IDL parser to spec changes. r=edgar
See https://github.com/heycam/webidl/issues/813

Differential Revision: https://phabricator.services.mozilla.com/D49324

--HG--
extra : moz-landing-system : lando
2019-10-16 09:52:39 +00:00
Boris Zbarsky dd7b61f437 Bug 1568249. Remove all the LegacyQueryInterface machinery from Web IDL. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D48250

--HG--
extra : moz-landing-system : lando
2019-10-11 21:15:57 +00:00
Boris Zbarsky 17e55fc804 Bug 1568883. Remove the QI implementation from Web IDL elements. r=peterv,mossop
The XBL test is being removed because it was the only remaining consumer of
xbl's implements="interfacename" in the tree, and was triggering QI on elements
for that codepath.

I've verified that a try run that MOZ_CRASHes when the C++ binding
QueryInterface implementation is invoked is green with these changes.

Differential Revision: https://phabricator.services.mozilla.com/D48249

--HG--
extra : moz-landing-system : lando
2019-10-11 22:10:20 +00:00
Jan de Mooij 6febd292ea Bug 1586683 - Remove flat strings from JSAPI. r=jwalden,bzbarsky
We want to remove flat strings (JSFlatString). With this patch we only expose
linear strings (JSLinearString) to API consumers.

This is very mechanical for the most part, because code typically only cares
about linear strings and not the null-termination aspect.

CTypes's Library.cpp has some Windows-specific code where we relied on null-terminated
strings. This patch adds JS_CopyStringCharsZ for that use case.

Differential Revision: https://phabricator.services.mozilla.com/D48314

--HG--
extra : moz-landing-system : lando
2019-10-14 09:32:07 +00:00
shindli e7b5981fa2 Backed out 2 changesets (bug 1568883, bug 1568249) for causing c1 failures in dom/base/test/chrome/test_cpows.xul CLOSED TREE
Backed out changeset b1a2422a6fa0 (bug 1568249)
Backed out changeset d3f5f69f38a8 (bug 1568883)
2019-10-12 00:07:48 +03:00
Boris Zbarsky 9c62fd6061 Bug 1585684. Fix error message for permission failures when passing a union member. r=peterv
The new error message is still not great, but it's a lot better than having %s
as the description of what's going on.

Differential Revision: https://phabricator.services.mozilla.com/D47915

--HG--
extra : moz-landing-system : lando
2019-10-09 09:22:05 +00:00
Boris Zbarsky 092c3345a8 Bug 1568249. Remove all the LegacyQueryInterface machinery from Web IDL. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D48250

--HG--
extra : moz-landing-system : lando
2019-10-07 13:12:55 +00:00
Boris Zbarsky 226ca6e774 Bug 1568883. Remove the QI implementation from Web IDL elements. r=peterv,mossop
The XBL test is being removed because it was the only remaining consumer of
xbl's implements="interfacename" in the tree, and was triggering QI on elements
for that codepath.

I've verified that a try run that MOZ_CRASHes when the C++ binding
QueryInterface implementation is invoked is green with these changes.

Differential Revision: https://phabricator.services.mozilla.com/D48249

--HG--
extra : moz-landing-system : lando
2019-10-09 09:19:32 +00:00
Boris Zbarsky 5f2a4a2274 Bug 1584630. Implement missing property use counters for HTMLDocument. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D47504

--HG--
extra : moz-landing-system : lando
2019-10-11 16:56:36 +00:00
Brendan Dahl c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

Differential Revision: https://phabricator.services.mozilla.com/D45613

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Ricky Stewart c010710916 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=firefox-build-system-reviewers,mshal
(Same content as bad revision https://phabricator.services.mozilla.com/D48230, but with a very small change to config/external/icu/data/moz.build to fix the build breakage.)

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=833f6a69fcac689488a640b43e8e0bdaa086a56c

Differential Revision: https://phabricator.services.mozilla.com/D48409

--HG--
extra : moz-landing-system : lando
2019-10-07 21:15:19 +00:00
Daniel Varga 052ef806b5 Backed out changeset 8d95f2c8867b (bug 1586358) for build bustage with FATAL ERROR PROCESSING MOZBUILD FILE. On a CLOSED TREE
--HG--
extra : rebase_source : 325fbad2455afc7f693087e75fa57dba79f4d86b
2019-10-07 20:22:08 +03:00
Ricky Stewart 940d91af38 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=nalexander
This patch doesn't remove all references to GENERATED_FILES, but does remove most of them, leaving only those which can't be trivially translated to the new template.

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e4a25230c3992b9c5519ceb351fb37f6b2bf605e

Differential Revision: https://phabricator.services.mozilla.com/D48230

--HG--
extra : moz-landing-system : lando
2019-10-07 15:31:05 +00:00
Sylvestre Ledru f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D47737

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Dzmitry Malyshau b91906eeac Bug 1581710 - Update WebGPU IDL bindings r=jgilbert,bzbarsky
This mostly updates the bindings to the current state.
No actual logic backing them yet.

*Note*: the IDL does *not* need to be checked for matching the upstream spec precisely at this stage. The upstream is evolving, we just need to update in order to start integrating the implementation. What needs to be checked is - how C++ represents the IDL, esp with regards to derived classes, events, and hierarchies.

The trickiest points, arguably, are:
  - WebGPU -> GPU prefix change
  - the goop for interfaces that are not final

Differential Revision: https://phabricator.services.mozilla.com/D46166

--HG--
rename : dom/webgpu/InputState.cpp => dom/webgpu/DeviceLostInfo.cpp
rename : dom/webgpu/Fence.h => dom/webgpu/DeviceLostInfo.h
rename : dom/webgpu/BlendState.cpp => dom/webgpu/OutOfMemoryError.cpp
rename : dom/webgpu/LogEntry.h => dom/webgpu/OutOfMemoryError.h
rename : dom/webgpu/BindGroup.h => dom/webgpu/ProgrammablePassEncoder.cpp
rename : dom/webgpu/BlendState.cpp => dom/webgpu/RenderBundle.cpp
rename : dom/webgpu/BlendState.h => dom/webgpu/RenderBundle.h
rename : dom/webgpu/AttachmentState.cpp => dom/webgpu/ValidationError.cpp
rename : dom/webgpu/AttachmentState.h => dom/webgpu/ValidationError.h
extra : moz-landing-system : lando
2019-10-02 16:46:03 +00:00
Boris Zbarsky a1e9012980 Bug 1584009 part 1. Loosen up the check for dictionary-containing-union-containing-dictionary. r=peterv
Since unions can now end up a in binding header, it's only a problem when the
two dictionaries are in one header and the union is in a different one.  If all
three are in the same header, for example, there is no issue.

Differential Revision: https://phabricator.services.mozilla.com/D47195

--HG--
extra : moz-landing-system : lando
2019-10-02 14:16:34 +00:00
Gurzau Raul 1a47fa0d8f Backed out 2 changesets (bug 1584009) for build bustages at MediaTrackConstraints.h on a CLOSED TREE.
Backed out changeset 1693187dbddf (bug 1584009)
Backed out changeset 0932a7fdb46b (bug 1584009)
2019-10-02 17:12:33 +03:00
Boris Zbarsky 860640c3fc Bug 1584009 part 1. Loosen up the check for dictionary-containing-union-containing-dictionary. r=peterv
Since unions can now end up a in binding header, it's only a problem when the
two dictionaries are in one header and the union is in a different one.  If all
three are in the same header, for example, there is no issue.

Differential Revision: https://phabricator.services.mozilla.com/D47195

--HG--
extra : moz-landing-system : lando
2019-10-02 13:10:34 +00:00
Steve Fink 91b1ffaac3 Bug 1560667 - Collection of fixes for things uncovered by improvements to the hazard analysis. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D46534

--HG--
extra : moz-landing-system : lando
2019-10-02 03:20:33 +00:00
Brindusan Cristian 8416452282 Backed out changeset 1ca9b7056c58 (bug 1581710) for mochitest failures at test_enabled.html. CLOSED TREE
--HG--
rename : dom/webgpu/ValidationError.cpp => dom/webgpu/AttachmentState.cpp
rename : dom/webgpu/ValidationError.h => dom/webgpu/AttachmentState.h
rename : dom/webgpu/RenderBundle.cpp => dom/webgpu/BlendState.cpp
rename : dom/webgpu/RenderBundle.h => dom/webgpu/BlendState.h
rename : dom/webgpu/DeviceLostInfo.cpp => dom/webgpu/InputState.cpp
rename : dom/webgpu/OutOfMemoryError.h => dom/webgpu/LogEntry.h
2019-10-02 06:04:25 +03:00
Dzmitry Malyshau 068927599a Bug 1581710 - Update WebGPU IDL bindings r=jgilbert,bzbarsky
This mostly updates the bindings to the current state.
No actual logic backing them yet.

*Note*: the IDL does *not* need to be checked for matching the upstream spec precisely at this stage. The upstream is evolving, we just need to update in order to start integrating the implementation. What needs to be checked is - how C++ represents the IDL, esp with regards to derived classes, events, and hierarchies.

The trickiest points, arguably, are:
  - WebGPU -> GPU prefix change
  - the goop for interfaces that are not final

Differential Revision: https://phabricator.services.mozilla.com/D46166

--HG--
rename : dom/webgpu/InputState.cpp => dom/webgpu/DeviceLostInfo.cpp
rename : dom/webgpu/Fence.h => dom/webgpu/DeviceLostInfo.h
rename : dom/webgpu/BlendState.cpp => dom/webgpu/OutOfMemoryError.cpp
rename : dom/webgpu/LogEntry.h => dom/webgpu/OutOfMemoryError.h
rename : dom/webgpu/BindGroup.h => dom/webgpu/ProgrammablePassEncoder.cpp
rename : dom/webgpu/BlendState.cpp => dom/webgpu/RenderBundle.cpp
rename : dom/webgpu/BlendState.h => dom/webgpu/RenderBundle.h
rename : dom/webgpu/AttachmentState.cpp => dom/webgpu/ValidationError.cpp
rename : dom/webgpu/AttachmentState.h => dom/webgpu/ValidationError.h
extra : moz-landing-system : lando
2019-10-02 01:42:07 +00:00
Boris Zbarsky 44c015a4b0 Bug 1584431 part 4. Use the new length-aware versions of JS_StringEqualsAscii and JS_FlatStringEqualsAscii where possible. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D47393

--HG--
extra : moz-landing-system : lando
2019-09-27 21:25:23 +00:00
Steve Fink 50cb5abc66 Bug 1583684 - Fix some rooting hazards in DOM bindings r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D47020

--HG--
extra : moz-landing-system : lando
2019-09-26 23:50:14 +00:00
Boris Zbarsky e5497b955e Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
For review purposes, the important changes are in dom/bindings/Configuration.py
and dom/bindings/parser.

The changes to the IDL files were done by running these in dom/webidl
and dom/bindings/test:

  perl -pi -e 's/^interface ([A-Za-z0-9_]+)($| [:{])/[Exposed=Window]\ninterface \1\2/' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor\]\n\[Exposed=Window\]/[HTMLConstructor,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[NoInterfaceObject\]\n\[Exposed=Window\]/[NoInterfaceObject,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\n\[Exposed=Window\]/[ChromeOnly,\n Exposed=Window]/g' *.webidl

And running this in dom/chrome-webidl:

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\ninterface/[ChromeOnly, Exposed=Window]\ninterface/g' *.webidl

and then fixing all the resulting parser failures.  I then verified that the
generated code is the same as before this change.

Differential Revision: https://phabricator.services.mozilla.com/D46697

--HG--
extra : moz-landing-system : lando
2019-09-27 15:26:14 +00:00