webidl icon indicating copy to clipboard operation
webidl copied to clipboard

No mixin [NoInterfaceObject] usage

Open annevk opened this issue 8 years ago • 12 comments
trafficstars

Per https://github.com/heycam/webidl/pull/423#issuecomment-326332460 this exists. I'd like to study such usage and see if we can get rid of it.

annevk avatar Sep 01 '17 08:09 annevk

Here's a manually filtered list I build for #363 based on running awk on Gecko's src files:

  • Geolocation
  • Coordinates
  • Position
  • PositionError
  • DeviceAcceleration
  • DeviceRotationRate
  • ConstrainablePattern
  • WEBGL_compressed_texture_astc
  • WEBGL_compressed_texture_s3tc_srgb
  • WEBGL_draw_buffers.
  • WEBGL_lose_context
  • ANGLE_instanced_arrays
  • EXT_blend_minmax
  • EXT_color_buffer_float
  • EXT_disjoint_timer_query
  • OES_standard_derivatives
  • OES_vertex_array_object.

tobie avatar Sep 01 '17 08:09 tobie

Thanks, seems like we could just drop the keyword from those and be done with it. I guess part of the problem is some of those specifications not being maintained, but that can be fixed one way or another.

annevk avatar Sep 01 '17 08:09 annevk

Well, we'd want to make sure suddenly exposing these interfaces to the Web doesn't break stuff, no?

tobie avatar Sep 01 '17 08:09 tobie

Yeah, I suppose the ones with overly generic names should be prefixed, but seems safe otherwise.

annevk avatar Sep 01 '17 08:09 annevk

Prefixing is an observable change. No idea if it would have real impact, though.

tobie avatar Sep 01 '17 08:09 tobie

How is it observable?

annevk avatar Sep 01 '17 08:09 annevk

navigator.geolocation.getCurrentPosition(p => console.log(Object.prototype.toString.call(p)));
// [object Position]

tobie avatar Sep 01 '17 08:09 tobie

Sigh. Part of the reason we had [NoInterfaceObject] was the ability to ship objects and change the name later. I guess that's another reason we should really get rid of it (and decide on names we can live with upfront).

annevk avatar Sep 01 '17 08:09 annevk

WebGL seems fixed. I filed issues against two other specifications I identified from the list above. Anything else?

annevk avatar Jan 15 '19 09:01 annevk

Searching through Blink, External in the HTML spec needs fixing. There's also https://github.com/w3c/mediacapture-main/issues/501 which is weird.

domenic avatar Jan 15 '19 15:01 domenic

Also https://w3c.github.io/webappsec-feature-policy/#featurepolicy ... a little hard to tell since Blink doesn't have interface mixin syntax yet, so lots of stuff is mixed together.

domenic avatar Jan 15 '19 16:01 domenic

Fwiw, that's why I haven't looked at this in Gecko either. It'll be a lot simpler once we implement mixin syntax...

bzbarsky avatar Jan 15 '19 16:01 bzbarsky