Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / CollectionType.h
index 4e53682..f57a0c2 100644 (file)
@@ -36,10 +36,6 @@ enum CollectionType {
     DocScripts,   // all <script> elements
     DocAll,       // "all" elements (IE)
 
-    // Named collection types cached in the document.
-    WindowNamedItems,
-    DocumentNamedItems,
-
     // Unnamed HTMLCollection types cached in elements.
     NodeChildren, // first-level children (ParentNode DOM interface)
     TableTBodies, // all <tbody> elements in this table
@@ -52,6 +48,11 @@ enum CollectionType {
     MapAreas,
     FormControls,
 
+    // Named HTMLCollection types cached in the document.
+    WindowNamedItems,
+    DocumentNamedItems,
+
+    // Named HTMLCollection types cached in elements.
     ClassCollectionType,
     TagCollectionType,
     HTMLTagCollectionType,
@@ -63,8 +64,19 @@ enum CollectionType {
     LabelsNodeListType,
 };
 
+static const CollectionType FirstNamedCollectionType = WindowNamedItems;
 static const CollectionType FirstLiveNodeListType = NameNodeListType;
 
+inline bool isUnnamedHTMLCollectionType(CollectionType type)
+{
+    return type < FirstNamedCollectionType;
+}
+
+inline bool isHTMLCollectionType(CollectionType type)
+{
+    return type < FirstLiveNodeListType;
+}
+
 inline bool isLiveNodeListType(CollectionType type)
 {
     return type >= FirstLiveNodeListType;