Bug 860591. Install WebIDL quickstubs for event interfaces as needed. r=smaug

This commit is contained in:
Boris Zbarsky 2013-04-12 10:51:25 -04:00
parent add8499ced
commit 5099725926
6 changed files with 36 additions and 13 deletions

View File

@ -61,7 +61,9 @@ DOMCI_CASTABLE_INTERFACE(nsGenericHTMLElement, nsGenericHTMLElement, 6, \
_extra) \
DOMCI_CASTABLE_INTERFACE(nsHTMLDocument, nsIDocument, 7, _extra) \
DOMCI_CASTABLE_INTERFACE(nsStyledElement, nsStyledElement, 8, _extra) \
DOMCI_CASTABLE_INTERFACE(nsSVGElement, nsIContent, 9, _extra)
DOMCI_CASTABLE_INTERFACE(nsSVGElement, nsIContent, 9, _extra) \
DOMCI_CASTABLE_INTERFACE(nsDOMMouseEvent, nsIDOMMouseEvent, 10, _extra) \
DOMCI_CASTABLE_INTERFACE(nsDOMUIEvent, nsIDOMUIEvent, 11, _extra)
// Make sure all classes mentioned in DOMCI_CASTABLE_INTERFACES
// have been declared.

View File

@ -573,6 +573,7 @@ DOMInterfaces = {
'MouseEvent': {
'nativeType': 'nsDOMMouseEvent',
'hasXPConnectImpls': True,
},
'MozChannel': [
@ -974,6 +975,7 @@ DOMInterfaces = {
'UIEvent': {
'nativeType': 'nsDOMUIEvent',
'hasXPConnectImpls': True
},
'URL' : [{

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<script>
var timeEvent = document.createEvent('TimeEvent');
var mutationEvent = document.createEvent('MutationEvents');
mutationEvent.__proto__ = timeEvent;
mutationEvent.target;
var mouseScrollEvent = document.createEvent("MouseScrollEvents");
var mouseEvent = document.createEvent("MouseEvents");
mouseEvent.__proto__ = mouseScrollEvent;
mouseEvent.relatedTarget;
var uiEvent = document.createEvent("UIEvents");
uiEvent.__proto__ = mouseScrollEvent;
uiEvent.rangeParent;
</script>
</head>
</html>

View File

@ -2,4 +2,5 @@ asserts-if(cocoaWidget,0-1) load 769464.html
load 822340-1.html
load 822340-2.html
load 832899.html
load 860591.html
load 860551.html

View File

@ -62,18 +62,6 @@ members = [
'nsIDOMMozNamedAttrMap.length',
'nsIDOMDOMStringList.*',
'nsIDOMEvent.type',
'nsIDOMEvent.target',
'nsIDOMEvent.currentTarget',
'nsIDOMEvent.eventPhase',
'nsIDOMEvent.bubbles',
'nsIDOMEvent.cancelable',
'nsIDOMEvent.timeStamp',
'nsIDOMEvent.stopPropagation',
'nsIDOMEvent.preventDefault',
'nsIDOMEvent.initEvent',
'nsIDOMEvent.defaultPrevented',
'nsIDOMEvent.stopImmediatePropagation',
'nsIDOMKeyEvent.*',
'nsIDOMDragEvent.*',
'nsIDOMNotifyPaintEvent.*',
@ -207,6 +195,9 @@ customIncludes = [
'nsPerformance.h',
'mozilla/dom/HTMLDocumentBinding.h',
'mozilla/dom/EventTargetBinding.h',
'mozilla/dom/EventBinding.h',
'mozilla/dom/MouseEventBinding.h',
'mozilla/dom/UIEventBinding.h',
]
customReturnInterfaces = [
@ -256,4 +247,7 @@ newBindingProperties = {
'nsIDOMDocument': 'mozilla::dom::DocumentBinding::sNativePropertyHooks.mNativeProperties.regular',
'nsIDOMHTMLDocument': 'mozilla::dom::HTMLDocumentBinding::sNativePropertyHooks.mNativeProperties.regular',
'nsIDOMEventTarget': 'mozilla::dom::EventTargetBinding::sNativePropertyHooks.mNativeProperties.regular',
'nsIDOMEvent': 'mozilla::dom::EventBinding::sNativePropertyHooks.mNativeProperties.regular',
'nsIDOMMouseEvent': 'mozilla::dom::MouseEventBinding::sNativePropertyHooks.mNativeProperties.regular',
'nsIDOMUIEvent': 'mozilla::dom::UIEventBinding::sNativePropertyHooks.mNativeProperties.regular',
}

View File

@ -17,6 +17,8 @@
#include "nsICSSDeclaration.h"
#include "nsSVGElement.h"
#include "nsDOMEvent.h"
#include "nsDOMMouseEvent.h"
#include "nsDOMUIEvent.h"
#include "mozilla/dom/EventTargetBinding.h"
#include "mozilla/dom/NodeBinding.h"
#include "mozilla/dom/ElementBinding.h"
@ -52,6 +54,8 @@ NEW_BINDING(nsIDocument, Document);
NEW_BINDING(nsDocument, Document);
NEW_BINDING(nsSVGElement, SVGElement);
NEW_BINDING(nsDOMEvent, Event);
NEW_BINDING(nsDOMMouseEvent, MouseEvent);
NEW_BINDING(nsDOMUIEvent, UIEvent);
#define DEFINE_UNWRAP_CAST(_interface, _base, _bit) \
template <> \