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
Родитель a2f56bac6b
Коммит e650da245b
6 изменённых файлов: 36 добавлений и 13 удалений

Просмотреть файл

@ -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.

Просмотреть файл

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

Просмотреть файл

@ -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>

Просмотреть файл

@ -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

Просмотреть файл

@ -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',
}

Просмотреть файл

@ -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 <> \