| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bool containsMultiple(const AtomicString&) const; | 55 bool containsMultiple(const AtomicString&) const; |
| 56 // concrete instantiations of the get<>() method template | 56 // concrete instantiations of the get<>() method template |
| 57 Element* getElementById(const AtomicString&, const TreeScope*) const; | 57 Element* getElementById(const AtomicString&, const TreeScope*) const; |
| 58 const HeapVector<Member<Element>>& getAllElementsById(const AtomicString&, c
onst TreeScope*) const; | 58 const HeapVector<Member<Element>>& getAllElementsById(const AtomicString&, c
onst TreeScope*) const; |
| 59 Element* getElementByMapName(const AtomicString&, const TreeScope*) const; | 59 Element* getElementByMapName(const AtomicString&, const TreeScope*) const; |
| 60 Element* getElementByLowercasedMapName(const AtomicString&, const TreeScope*
) const; | 60 Element* getElementByLowercasedMapName(const AtomicString&, const TreeScope*
) const; |
| 61 Element* getElementByLabelForAttribute(const AtomicString&, const TreeScope*
) const; | 61 Element* getElementByLabelForAttribute(const AtomicString&, const TreeScope*
) const; |
| 62 | 62 |
| 63 DECLARE_TRACE(); | 63 DECLARE_TRACE(); |
| 64 | 64 |
| 65 #if ENABLE(ASSERT) | 65 #if DCHECK_IS_ON() |
| 66 // While removing a ContainerNode, ID lookups won't be precise should the tr
ee | 66 // While removing a ContainerNode, ID lookups won't be precise should the tr
ee |
| 67 // have elements with duplicate IDs contained in the element being removed. | 67 // have elements with duplicate IDs contained in the element being removed. |
| 68 // Rare trees, but ID lookups may legitimately fail across such removals; | 68 // Rare trees, but ID lookups may legitimately fail across such removals; |
| 69 // this scope object informs DocumentOrderedMaps about the transitory | 69 // this scope object informs DocumentOrderedMaps about the transitory |
| 70 // state of the underlying tree. | 70 // state of the underlying tree. |
| 71 class RemoveScope { | 71 class RemoveScope { |
| 72 STACK_ALLOCATED(); | 72 STACK_ALLOCATED(); |
| 73 public: | 73 public: |
| 74 RemoveScope(); | 74 RemoveScope(); |
| 75 ~RemoveScope(); | 75 ~RemoveScope(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 inline bool DocumentOrderedMap::containsMultiple(const AtomicString& id) const | 117 inline bool DocumentOrderedMap::containsMultiple(const AtomicString& id) const |
| 118 { | 118 { |
| 119 Map::const_iterator it = m_map.find(id); | 119 Map::const_iterator it = m_map.find(id); |
| 120 return it != m_map.end() && it->value->count > 1; | 120 return it != m_map.end() && it->value->count > 1; |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace blink | 123 } // namespace blink |
| 124 | 124 |
| 125 #endif // DocumentOrderedMap_h | 125 #endif // DocumentOrderedMap_h |
| OLD | NEW |