Home | History | Annotate | Download | only in html
      1 /*
      2  * Copyright (C) 1999 Lars Knoll (knoll (at) kde.org)
      3  *           (C) 1999 Antti Koivisto (koivisto (at) 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 HTMLCollection types cached in the document.
     30     DocImages,    // all <img> elements in the document
     31     DocApplets,   // all <object> and <applet> elements
     32     DocEmbeds,    // all <embed> elements
     33     DocForms,     // all <form> elements
     34     DocLinks,     // all <a> _and_ <area> elements with a value for href
     35     DocAnchors,   // all <a> elements with a value for name
     36     DocScripts,   // all <script> elements
     37     DocAll,       // "all" elements (IE)
     38 
     39     // Named collection types cached in the document.
     40     WindowNamedItems,
     41     DocumentNamedItems,
     42 
     43     // Unnamed HTMLCollection types cached in elements.
     44     NodeChildren, // first-level children (ParentNode DOM interface)
     45     TableTBodies, // all <tbody> elements in this table
     46     TSectionRows, // all row elements in this table section
     47     TableRows,
     48     TRCells,      // all cells in this row
     49     SelectOptions,
     50     SelectedOptions,
     51     DataListOptions,
     52     MapAreas,
     53     FormControls,
     54 
     55     // Live NodeList.
     56     ChildNodeListType,
     57     ClassNodeListType,
     58     NameNodeListType,
     59     TagNodeListType,
     60     HTMLTagNodeListType,
     61     RadioNodeListType,
     62     LabelsNodeListType,
     63 };
     64 
     65 static const CollectionType FirstNodeListType = ChildNodeListType;
     66 
     67 inline bool isNodeList(CollectionType type)
     68 {
     69     return type >= FirstNodeListType;
     70 }
     71 
     72 } // namespace
     73 
     74 #endif
     75