Closed Bug 1452862 Opened 6 years ago Closed 6 years ago

Remove pointless WebIDL QueryInterface implementations

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We have these on a bunch of things that can't be QIed to anything other than nsISupports.  Chances are these can all go away.
BarProp, CaretPosition, Crypto, CSSMozDocumentRule, CSSPrimitiveValue,
CSSStyleDeclaration, CSSStyleRule, CSSValueList, DOMImplementation,
DOMTokenList, FileList, FrameLoader, FormData, HTMLCollection, History,
MimeTypeArray, NamedNodeMap, MutationObserver, MutationRecord, Navigator,
NodeIterator, PaintRequest, PaintRequestList, Plugin, Rect,
SVGAnimatedEnumeration, SVGAnimatedInteger, SVGAnimatedNumber,
SVGAnimatedNumberList, SVGAnimatedPreserveAspectRatio, SVGAnimatedString,
SVGLengthList, SVGNumberList, SVGPathSegList, SVGPoint, SVGPointList,
SVGPreserveAspectRatio, SVGRect, SVGStringList, SVGTransformList, Touch,
TouchList, TreeWalker, ValidityState only implement nsISupports, so
there's no point QIing them.

DOMStringMap, FrameLoader, NodeIterator, SVGPoint, StyleSheet only implement
non-scriptable non-shimmed interfaces (nsIMutationObserver, nsISVGPoint,
nsICSSLoaderObserver), so can't be usefully QIed from script.

Notification, OfflineResourceList, Performance, Screen,
WebSocket, XMLHttpRequestUpload only implement nsIDOMEventTarget, and nothing
QIs to that in script.

PluginArray QIs to nsIObserver but doesn't expose any corresponding methods.
None of the QIs to that interface seem to be on PluginArray objects.

Range QIs to nsIDOMRange, but there is no JS code that QIs to that.

XMLSerializer doesn't even implement nsISupports.

MozReview-Commit-ID: Fil5cBd4K4d
Attachment #8966476 - Flags: review?(kyle)
BarProp, CaretPosition, Crypto, CSSMozDocumentRule, CSSPrimitiveValue,
CSSStyleDeclaration, CSSStyleRule, CSSValueList, DOMImplementation,
DOMTokenList, FileList, FrameLoader, FormData, HTMLCollection, History,
MimeTypeArray, NamedNodeMap, MutationObserver, MutationRecord, Navigator,
NodeIterator, PaintRequest, PaintRequestList, Plugin, Rect,
SVGAnimatedEnumeration, SVGAnimatedInteger, SVGAnimatedNumber,
SVGAnimatedNumberList, SVGAnimatedPreserveAspectRatio, SVGAnimatedString,
SVGLengthList, SVGNumberList, SVGPathSegList, SVGPoint, SVGPointList,
SVGPreserveAspectRatio, SVGRect, SVGStringList, SVGTransformList, Touch,
TouchList, TreeWalker, ValidityState only implement nsISupports, so
there's no point QIing them.

DOMStringMap, FrameLoader, NodeIterator, SVGPoint, StyleSheet only implement
non-scriptable non-shimmed interfaces (nsIMutationObserver, nsISVGPoint,
nsICSSLoaderObserver), so can't be usefully QIed from script.

EventSource, Notification, OfflineResourceList, Performance, Screen,
WebSocket, XMLHttpRequestUpload only implement nsIDOMEventTarget, and nothing
QIs to that in script.

PluginArray QIs to nsIObserver but doesn't expose any corresponding methods.
None of the QIs to that interface seem to be on PluginArray objects.

Range QIs to nsIDOMRange, but there is no JS code that QIs to that.

NodeList QIs to nsIDOMNodeList, but there is no JS code that QIs to that.

XMLSerializer doesn't even implement nsISupports.

MozReview-Commit-ID: Fil5cBd4K4d
Attachment #8966478 - Flags: review?(kyle)
Attachment #8966476 - Attachment is obsolete: true
Attachment #8966476 - Flags: review?(kyle)
Blocks: 1453053
Attachment #8966478 - Flags: review?(kyle) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/38849d14221a
Remove various pointless QueryInterface implementations from bindings.  r=qdot
https://hg.mozilla.org/mozilla-central/rev/38849d14221a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: