initial import
[vuplus_webkit] / Source / WebCore / html / CollectionType.h
1 /*
2  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
4  * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB.  If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22
23 #ifndef CollectionType_h
24 #define CollectionType_h
25
26 namespace WebCore {
27
28 enum CollectionType {
29     // unnamed collection types cached in the document
30
31     DocImages,    // all <img> elements in the document
32     DocApplets,   // all <object> and <applet> elements
33     DocEmbeds,    // all <embed> elements
34     DocObjects,   // all <object> elements
35     DocForms,     // all <form> elements
36     DocLinks,     // all <a> _and_ <area> elements with a value for href
37     DocAnchors,   // all <a> elements with a value for name
38     DocScripts,   // all <script> elements
39
40     DocAll,       // "all" elements (IE)
41     NodeChildren, // first-level children (IE)
42
43     // named collection types cached in the document
44
45     WindowNamedItems,
46     DocumentNamedItems,
47
48     // types not cached in the document; these are types that can't be used on a document
49
50     TableTBodies, // all <tbody> elements in this table
51     TSectionRows, // all row elements in this table section
52     TRCells,      // all cells in this row
53     SelectOptions,
54     DataListOptions,
55     MapAreas,
56
57     OtherCollection
58 };
59
60 static const CollectionType FirstUnnamedDocumentCachedType = DocImages;
61 static const unsigned NumUnnamedDocumentCachedTypes = NodeChildren - DocImages + 1;
62
63 static const CollectionType FirstNamedDocumentCachedType = WindowNamedItems;
64 static const unsigned NumNamedDocumentCachedTypes = DocumentNamedItems - WindowNamedItems + 1;
65
66 } // namespace
67
68 #endif