Bug 816375. Switch NodeFilter to WebIDL bindings. r=peterv

This commit is contained in:
Boris Zbarsky 2012-12-14 14:10:49 -05:00
Родитель 4c6b53a57f
Коммит a1a7cade04
4 изменённых файлов: 18 добавлений и 12 удалений

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

@ -1148,9 +1148,14 @@ class MethodDefiner(PropertyDefiner):
# FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=772822
# We should be able to check for special operations without an
# identifier. For now we check if the name starts with __
methods = [m for m in descriptor.interface.members if
m.isMethod() and m.isStatic() == static and
not m.isIdentifierLess()]
# Ignore non-static methods for callback interfaces
if not descriptor.interface.isCallback() or static:
methods = [m for m in descriptor.interface.members if
m.isMethod() and m.isStatic() == static and
not m.isIdentifierLess()]
else:
methods = []
self.chrome = []
self.regular = []
for m in methods:
@ -1232,9 +1237,13 @@ class AttrDefiner(PropertyDefiner):
assert not (static and unforgeable)
PropertyDefiner.__init__(self, descriptor, name)
self.name = name
attributes = [m for m in descriptor.interface.members if
m.isAttr() and m.isStatic() == static and
m.isUnforgeable() == unforgeable]
# Ignore non-static attributes for callback interfaces
if not descriptor.interface.isCallback() or static:
attributes = [m for m in descriptor.interface.members if
m.isAttr() and m.isStatic() == static and
m.isUnforgeable() == unforgeable]
else:
attributes = []
self.chrome = [m for m in attributes if isChromeOnly(m)]
self.regular = [m for m in attributes if not isChromeOnly(m)]
self.static = static

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

@ -1,5 +1,4 @@
{
"Should be able to delete Document.": true,
"Should be able to delete CharacterData.": true,
"Should be able to delete NodeFilter.": true
"Should be able to delete CharacterData.": true
}

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

@ -4,10 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://www.w3.org/TR/2012/WD-dom-20120105/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
* http://dom.spec.whatwg.org/#interface-nodefilter
*/
callback interface NodeFilter {

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

@ -49,6 +49,7 @@ webidl_files = \
HTMLPropertiesCollection.webidl \
ImageData.webidl \
Node.webidl \
NodeFilter.webidl \
NodeList.webidl \
PaintRequestList.webidl \
PannerNode.webidl \