OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. |
5 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void namedPropertyEnumerator(Vector<String>& names, ExceptionState&); | 52 void namedPropertyEnumerator(Vector<String>& names, ExceptionState&); |
53 | 53 |
54 // Non-DOM API | 54 // Non-DOM API |
55 void namedItems(const AtomicString& name, WillBeHeapVector<RefPtrWillBeMembe
r<Element> >&) const; | 55 void namedItems(const AtomicString& name, WillBeHeapVector<RefPtrWillBeMembe
r<Element> >&) const; |
56 bool isEmpty() const { return m_collectionIndexCache.isEmpty(*this); } | 56 bool isEmpty() const { return m_collectionIndexCache.isEmpty(*this); } |
57 bool hasExactlyOneItem() const { return m_collectionIndexCache.hasExactlyOne
Node(*this); } | 57 bool hasExactlyOneItem() const { return m_collectionIndexCache.hasExactlyOne
Node(*this); } |
58 bool elementMatches(const Element&) const; | 58 bool elementMatches(const Element&) const; |
59 | 59 |
60 // CollectionIndexCache API. | 60 // CollectionIndexCache API. |
61 bool canTraverseBackward() const { return !overridesItemAfter(); } | 61 bool canTraverseBackward() const { return !overridesItemAfter(); } |
62 Element* traverseToFirstElement() const; | 62 Element* traverseToFirst() const; |
63 Element* traverseToLastElement() const; | 63 Element* traverseToLast() const; |
64 Element* traverseForwardToOffset(unsigned offset, Element& currentElement, u
nsigned& currentOffset) const; | 64 Element* traverseForwardToOffset(unsigned offset, Element& currentElement, u
nsigned& currentOffset) const; |
65 Element* traverseBackwardToOffset(unsigned offset, Element& currentElement,
unsigned& currentOffset) const; | 65 Element* traverseBackwardToOffset(unsigned offset, Element& currentElement,
unsigned& currentOffset) const; |
66 | 66 |
67 virtual void trace(Visitor*); | 67 virtual void trace(Visitor*); |
68 | 68 |
69 protected: | 69 protected: |
70 HTMLCollection(ContainerNode& base, CollectionType, ItemAfterOverrideType); | 70 HTMLCollection(ContainerNode& base, CollectionType, ItemAfterOverrideType); |
71 | 71 |
72 class NamedItemCache FINAL : public NoBaseWillBeGarbageCollected<NamedItemCa
che> { | 72 class NamedItemCache FINAL : public NoBaseWillBeGarbageCollected<NamedItemCa
che> { |
73 public: | 73 public: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 { | 157 { |
158 if (!attrName || shouldInvalidateTypeOnAttributeChange(invalidationType(), *
attrName)) | 158 if (!attrName || shouldInvalidateTypeOnAttributeChange(invalidationType(), *
attrName)) |
159 invalidateCache(); | 159 invalidateCache(); |
160 else if (*attrName == HTMLNames::idAttr || *attrName == HTMLNames::nameAttr) | 160 else if (*attrName == HTMLNames::idAttr || *attrName == HTMLNames::nameAttr) |
161 invalidateIdNameCacheMaps(); | 161 invalidateIdNameCacheMaps(); |
162 } | 162 } |
163 | 163 |
164 } // namespace | 164 } // namespace |
165 | 165 |
166 #endif | 166 #endif |
OLD | NEW |