michael@0: # -*- Mode: Python -*- michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: name = 'DOM' michael@0: michael@0: # A quick warning: michael@0: # michael@0: # Attributes or methods that call GetCurrentNativeCallContext must not be michael@0: # quick-stubbed, because quick stubs don't generate a native call context. michael@0: # qsgen.py has no way of knowing which attributes and methods do this, as it michael@0: # looks at interfaces, not implementations. The symptoms, if you quick-stub michael@0: # one of those, can be really weird, because GetCurrentNativeCallContext michael@0: # doesn't crash--it may in fact return a plausible wrong answer. michael@0: michael@0: members = [ michael@0: # dom/interfaces/base michael@0: # michael@0: # Note that many implementations of interfaces in this directory michael@0: # use GetCurrentNativeCallContext, notably: michael@0: # - nsIDOMLocation.reload michael@0: # - nsIDOMNSHistory.go michael@0: # - nsIDOMJSPluginArray.refresh michael@0: # - nsIDOMWindow.postMessage michael@0: # - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog} michael@0: # michael@0: # (And nsIDOMModalContentWindow.returnValue is an attribute of type michael@0: # nsIVariant, which qsgen.py can't handle.) michael@0: # michael@0: # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try. michael@0: #'nsIDOMLocation.hostname', michael@0: #'nsIDOMLocation.href', michael@0: michael@0: # dom/interfaces/storage michael@0: 'nsIDOMStorage.setItem', michael@0: 'nsIDOMStorage.length', michael@0: 'nsIDOMStorage.getItem', michael@0: 'nsIDOMStorage.key', michael@0: 'nsIDOMStorage.removeItem', michael@0: 'nsIDOMStorage.clear', michael@0: michael@0: # dom/interfaces/xpath michael@0: 'nsIDOMXPathExpression.evaluate', michael@0: 'nsIDOMXPathNSResolver.lookupNamespaceURI', michael@0: 'nsIDOMXPathResult.snapshotItem', michael@0: 'nsIDOMXPathResult.iterateNext', michael@0: 'nsIDOMXPathResult.snapshotLength', michael@0: 'nsIDOMXPathResult.resultType', michael@0: 'nsIDOMXPathResult.numberValue', michael@0: 'nsIDOMXPathResult.stringValue', michael@0: 'nsIDOMXPathResult.booleanValue', michael@0: 'nsIDOMXPathResult.singleNodeValue', michael@0: 'nsIDOMNSXPathExpression.evaluateWithContext', michael@0: michael@0: # layout/xul/base/public michael@0: 'nsIBoxObject.x', michael@0: 'nsIBoxObject.y', michael@0: 'nsIBoxObject.screenX', michael@0: 'nsIBoxObject.screenY', michael@0: 'nsIBoxObject.width', michael@0: 'nsIBoxObject.height', michael@0: michael@0: # dom/indexedDB michael@0: 'nsIIndexedDatabaseManager.*', michael@0: michael@0: # dom/quota michael@0: 'nsIQuotaManager.*', michael@0: 'nsIQuotaRequest.*', michael@0: 'nsIUsageCallback.*', michael@0: ] michael@0: michael@0: # Most interfaces can be found by searching the includePath; to find michael@0: # nsIDOMEvent, for example, just look for nsIDOMEvent.idl. But IDL filenames michael@0: # for very long interface names are slightly abbreviated, and many interfaces michael@0: # don't have their own files, just for extra wackiness. So qsgen.py needs michael@0: # a little help. michael@0: # michael@0: irregularFilenames = { michael@0: # stowaways michael@0: 'nsIDOMBlob': 'nsIDOMFile', michael@0: 'nsIIndexedDatabaseUsageCallback': 'nsIIndexedDatabaseManager', michael@0: 'nsITelephoneCallback': 'nsITelephone', michael@0: } michael@0: michael@0: customIncludes = [ michael@0: 'mozilla/dom/BindingUtils.h', michael@0: 'mozilla/dom/EventTargetBinding.h', michael@0: 'mozilla/dom/WindowBinding.h', michael@0: ] michael@0: michael@0: nsIDOMStorage_Clear_customMethodCallCode = """ michael@0: rv = self->Clear(); michael@0: if (NS_SUCCEEDED(rv)) michael@0: JS_ClearNonGlobalObject(cx, obj); michael@0: """ michael@0: michael@0: customMethodCalls = { michael@0: 'nsIDOMStorage_Clear': { michael@0: 'code': nsIDOMStorage_Clear_customMethodCallCode michael@0: }, michael@0: } michael@0: michael@0: newBindingProperties = { michael@0: # Once the last entry here goes away, we can make the sNativePropertyHooks michael@0: # of bindings static. michael@0: 'nsIDOMEventTarget': '&mozilla::dom::EventTargetBinding::sNativePropertyHooks->mNativeProperties', michael@0: 'nsIDOMWindow': '&mozilla::dom::WindowBinding::sNativePropertyHooks->mNativeProperties', michael@0: }