Closed Bug 1423562 Opened 2 years ago Closed 4 months ago

IDL: remove [PrimaryGlobal]

Categories

(Core :: DOM: Bindings (WebIDL), enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: annevk, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

See https://github.com/w3c/web-platform-tests/pull/8585 for test changes.

Background and other specification changes linked from https://github.com/heycam/webidl/issues/365.
jdm, servo might need these changes too...
This probably depends on 1414372, though I'm not sure what the end result was with the exposure sets of mixins, exactly.  Certainly we want to get to a point where our internal validation knows which things are interfaces and which mixins, because the former needs to enforce an exposure set and the latter needs to not enforce it.
Depends on: 1414372
Priority: -- → P3
Component: DOM → DOM: Bindings (WebIDL)
Depends on: 1574195
Depends on: 1574201

There are no callers who want this. They all filter out external interfaces in various ways; we might as well do it up front.

This avoids us needing to stick [Exposed=Window] on all of them.

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.

Attachment #9094361 - Attachment description: Bug 1423562 part 1. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=peterv → Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=peterv
Assignee: nobody → bzbarsky
Attachment #9094361 - Attachment description: Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=peterv → Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
Attachment #9094360 - Attachment description: Bug 1423562 part 2. Change external interfaces to not have exposure sets. r=peterv → Bug 1423562 part 2. Change external interfaces to not have exposure sets. r=edgar
Attachment #9094359 - Attachment description: Bug 1423562 part 1. Change Configuration.getDescriptors to never return external interface descriptors. r=peterv → Bug 1423562 part 1. Change Configuration.getDescriptors to never return external interface descriptors. r=edgar
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a6f61b05da7
part 1.  Change Configuration.getDescriptors to never return external interface descriptors.  r=edgar
https://hg.mozilla.org/integration/autoland/rev/7cdac5476150
part 2.  Change external interfaces to not have exposure sets.  r=edgar
https://hg.mozilla.org/integration/autoland/rev/2416d17d33c1
part 3.  Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything.  r=edgar
You need to log in before you can comment on or make changes to this bug.