Index: Source/core/dom/NodeFilter.idl |
diff --git a/Source/core/dom/NodeFilter.idl b/Source/core/dom/NodeFilter.idl |
index 7d52e408bcd357454b9731bd38d0e788954a7357..d4320655e493cca6403a3b8e96fc9fe5eaed54f8 100644 |
--- a/Source/core/dom/NodeFilter.idl |
+++ b/Source/core/dom/NodeFilter.idl |
@@ -18,30 +18,34 @@ |
* Boston, MA 02110-1301, USA. |
*/ |
+// https://dom.spec.whatwg.org/#interface-nodefilter |
+ |
+// FIXME: NodeFilter should be a callback interface. crbug.com/462946 |
[ |
DependentLifetime, |
WillBeGarbageCollected, |
] interface NodeFilter { |
- // Constants returned by acceptNode |
- const short FILTER_ACCEPT = 1; |
- const short FILTER_REJECT = 2; |
- const short FILTER_SKIP = 3; |
+ // Constants for acceptNode() |
+ // FIXME: acceptNode()'s return type and these constants should be unsigned short. |
+ const short FILTER_ACCEPT = 1; |
+ const short FILTER_REJECT = 2; |
+ const short FILTER_SKIP = 3; |
// Constants for whatToShow |
- const unsigned long SHOW_ALL = 0xFFFFFFFF; |
- const unsigned long SHOW_ELEMENT = 0x00000001; |
- const unsigned long SHOW_ATTRIBUTE = 0x00000002; |
- const unsigned long SHOW_TEXT = 0x00000004; |
- const unsigned long SHOW_CDATA_SECTION = 0x00000008; |
- const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010; |
- const unsigned long SHOW_ENTITY = 0x00000020; |
- const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040; |
- const unsigned long SHOW_COMMENT = 0x00000080; |
- const unsigned long SHOW_DOCUMENT = 0x00000100; |
- const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200; |
- const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400; |
- const unsigned long SHOW_NOTATION = 0x00000800; |
- |
- [RaisesException] short acceptNode([Default=Undefined] optional Node n); |
+ const unsigned long SHOW_ALL = 0xFFFFFFFF; |
+ const unsigned long SHOW_ELEMENT = 0x1; |
+ const unsigned long SHOW_ATTRIBUTE = 0x2; // historical |
+ const unsigned long SHOW_TEXT = 0x4; |
+ const unsigned long SHOW_CDATA_SECTION = 0x8; // historical |
+ const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical |
+ const unsigned long SHOW_ENTITY = 0x20; // historical |
+ const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40; |
+ const unsigned long SHOW_COMMENT = 0x80; |
+ const unsigned long SHOW_DOCUMENT = 0x100; |
+ const unsigned long SHOW_DOCUMENT_TYPE = 0x200; |
+ const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400; |
+ const unsigned long SHOW_NOTATION = 0x800; // historical |
+ // FIXME: The node argument should not be optional. |
+ [RaisesException] short acceptNode([Default=Undefined] optional Node node); |
}; |