| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 bool contains(StringImpl*) const; | 48 bool contains(StringImpl*) const; |
| 49 bool containsMultiple(StringImpl*) const; | 49 bool containsMultiple(StringImpl*) const; |
| 50 // concrete instantiations of the get<>() method template | 50 // concrete instantiations of the get<>() method template |
| 51 Element* getElementById(StringImpl*, const TreeScope*) const; | 51 Element* getElementById(StringImpl*, const TreeScope*) const; |
| 52 const Vector<Element*>& getAllElementsById(StringImpl*, const TreeScope*) co
nst; | 52 const Vector<Element*>& getAllElementsById(StringImpl*, const TreeScope*) co
nst; |
| 53 Element* getElementByMapName(StringImpl*, const TreeScope*) const; | 53 Element* getElementByMapName(StringImpl*, const TreeScope*) const; |
| 54 Element* getElementByLowercasedMapName(StringImpl*, const TreeScope*) const; | 54 Element* getElementByLowercasedMapName(StringImpl*, const TreeScope*) const; |
| 55 Element* getElementByLabelForAttribute(StringImpl*, const TreeScope*) const; | 55 Element* getElementByLabelForAttribute(StringImpl*, const TreeScope*) const; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 template<bool keyMatches(StringImpl*, Element*)> Element* get(StringImpl*, c
onst TreeScope*) const; | 58 template<bool keyMatches(StringImpl*, Element&)> Element* get(StringImpl*, c
onst TreeScope*) const; |
| 59 | 59 |
| 60 struct MapEntry { | 60 struct MapEntry { |
| 61 explicit MapEntry(Element* firstElement) | 61 explicit MapEntry(Element* firstElement) |
| 62 : element(firstElement) | 62 : element(firstElement) |
| 63 , count(1) | 63 , count(1) |
| 64 { } | 64 { } |
| 65 | 65 |
| 66 Element* element; | 66 Element* element; |
| 67 unsigned count; | 67 unsigned count; |
| 68 Vector<Element*> orderedList; | 68 Vector<Element*> orderedList; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 80 | 80 |
| 81 inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const | 81 inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const |
| 82 { | 82 { |
| 83 Map::const_iterator it = m_map.find(id); | 83 Map::const_iterator it = m_map.find(id); |
| 84 return it != m_map.end() && it->value->count > 1; | 84 return it != m_map.end() && it->value->count > 1; |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace WebCore | 87 } // namespace WebCore |
| 88 | 88 |
| 89 #endif // DocumentOrderedMap_h | 89 #endif // DocumentOrderedMap_h |
| OLD | NEW |