Chromium Code Reviews| Index: Source/core/html/CollectionType.h |
| diff --git a/Source/core/html/CollectionType.h b/Source/core/html/CollectionType.h |
| index 4e53682b6740e940ee612f93107babf73e971b3e..db7d302b992cf91477c30dc54da90192dca7ebbb 100644 |
| --- a/Source/core/html/CollectionType.h |
| +++ b/Source/core/html/CollectionType.h |
| @@ -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,14 @@ enum CollectionType { |
| LabelsNodeListType, |
| }; |
| +static const CollectionType FirstNamedCollectionType = WindowNamedItems; |
| static const CollectionType FirstLiveNodeListType = NameNodeListType; |
|
adamk
2014/04/17 18:08:08
Not sure why these aren't just members of the enum
|
| +inline bool isUnnamedHTMLCollectionType(CollectionType type) |
| +{ |
| + return type < FirstNamedCollectionType; |
| +} |
| + |
| inline bool isLiveNodeListType(CollectionType type) |
| { |
| return type >= FirstLiveNodeListType; |