diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-26 11:37:00 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-26 11:36:36 +0100 |
commit | f474b2b60ec57205facd4eec2181ebe69b686772 (patch) | |
tree | 42a132541a82c97039ea8a98b40e5012187ede28 /Source/WebCore/html/HTMLCollection.cpp | |
parent | 061d58bc0fa016cfeed744fd3e4663460635d69b (diff) | |
download | qtwebkit-f474b2b60ec57205facd4eec2181ebe69b686772.tar.gz |
Imported WebKit commit 76dac539db7ece7079963adfcfe878d8e2f7d861 (http://svn.webkit.org/repository/webkit/trunk@135696)
New snapshot that fixes build after QMacStyle removal
Change-Id: Idea95c96c73b49158d52861db2a4b8d2c51766b0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/html/HTMLCollection.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLCollection.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/WebCore/html/HTMLCollection.cpp b/Source/WebCore/html/HTMLCollection.cpp index da2a4bfca..df20954de 100644 --- a/Source/WebCore/html/HTMLCollection.cpp +++ b/Source/WebCore/html/HTMLCollection.cpp @@ -176,7 +176,7 @@ static NodeListInvalidationType invalidationTypeExcludingIdAndNameAttributes(Col HTMLCollection::HTMLCollection(Node* ownerNode, CollectionType type, ItemAfterOverrideType itemAfterOverrideType) - : DynamicNodeListCacheBase(ownerNode, rootTypeFromCollectionType(type), invalidationTypeExcludingIdAndNameAttributes(type), + : LiveNodeListBase(ownerNode, rootTypeFromCollectionType(type), invalidationTypeExcludingIdAndNameAttributes(type), WebCore::shouldOnlyIncludeDirectChildren(type), type, itemAfterOverrideType) { document()->registerNodeListCache(this); @@ -290,14 +290,14 @@ static Node* firstNode(bool forward, Node* rootNode, bool onlyIncludeDirectChild } template <bool forward> -Node* DynamicNodeListCacheBase::iterateForNextNode(Node* current) const +Node* LiveNodeListBase::iterateForNextNode(Node* current) const { bool onlyIncludeDirectChildren = shouldOnlyIncludeDirectChildren(); CollectionType collectionType = type(); Node* rootNode = this->rootNode(); for (; current; current = nextNode<forward>(rootNode, current, onlyIncludeDirectChildren)) { if (isNodeList(collectionType)) { - if (current->isElementNode() && static_cast<const DynamicNodeList*>(this)->nodeMatches(toElement(current))) + if (current->isElementNode() && static_cast<const LiveNodeList*>(this)->nodeMatches(toElement(current))) return toElement(current); } else { if (current->isElementNode() && isAcceptableElement(collectionType, toElement(current))) @@ -310,7 +310,7 @@ Node* DynamicNodeListCacheBase::iterateForNextNode(Node* current) const // Without this ALWAYS_INLINE, length() and item() can be 100% slower. template<bool forward> ALWAYS_INLINE -Node* DynamicNodeListCacheBase::itemBeforeOrAfter(Node* previous) const +Node* LiveNodeListBase::itemBeforeOrAfter(Node* previous) const { Node* current; if (LIKELY(!!previous)) // Without this LIKELY, length() and item() can be 10% slower. @@ -325,13 +325,13 @@ Node* DynamicNodeListCacheBase::itemBeforeOrAfter(Node* previous) const } // Without this ALWAYS_INLINE, length() and item() can be 100% slower. -ALWAYS_INLINE Node* DynamicNodeListCacheBase::itemBefore(Node* previous) const +ALWAYS_INLINE Node* LiveNodeListBase::itemBefore(Node* previous) const { return itemBeforeOrAfter<false>(previous); } // Without this ALWAYS_INLINE, length() and item() can be 100% slower. -ALWAYS_INLINE Node* DynamicNodeListCacheBase::itemAfter(unsigned& offsetInArray, Node* previous) const +ALWAYS_INLINE Node* LiveNodeListBase::itemAfter(unsigned& offsetInArray, Node* previous) const { if (UNLIKELY(overridesItemAfter())) // Without this UNLIKELY, length() can be 100% slower. return static_cast<const HTMLCollection*>(this)->virtualItemAfter(offsetInArray, toElement(previous)); @@ -339,7 +339,7 @@ ALWAYS_INLINE Node* DynamicNodeListCacheBase::itemAfter(unsigned& offsetInArray, return itemBeforeOrAfter<true>(previous); } -bool ALWAYS_INLINE DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedItem(unsigned offset) const +bool ALWAYS_INLINE LiveNodeListBase::isLastItemCloserThanLastOrCachedItem(unsigned offset) const { ASSERT(isLengthCacheValid()); unsigned distanceFromLastItem = cachedLength() - offset; @@ -349,7 +349,7 @@ bool ALWAYS_INLINE DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedIte return cachedItemOffset() < offset && distanceFromLastItem < offset - cachedItemOffset(); } -bool ALWAYS_INLINE DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem(unsigned offset) const +bool ALWAYS_INLINE LiveNodeListBase::isFirstItemCloserThanCachedItem(unsigned offset) const { ASSERT(isItemCacheValid()); if (cachedItemOffset() < offset) @@ -359,7 +359,7 @@ bool ALWAYS_INLINE DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem(uns return offset < distanceFromCachedItem; } -ALWAYS_INLINE void DynamicNodeListCacheBase::setItemCache(Node* item, unsigned offset, unsigned elementsArrayOffset) const +ALWAYS_INLINE void LiveNodeListBase::setItemCache(Node* item, unsigned offset, unsigned elementsArrayOffset) const { setItemCache(item, offset); if (overridesItemAfter()) { @@ -369,18 +369,18 @@ ALWAYS_INLINE void DynamicNodeListCacheBase::setItemCache(Node* item, unsigned o ASSERT(!elementsArrayOffset); } -unsigned DynamicNodeListCacheBase::lengthCommon() const +unsigned LiveNodeListBase::length() const { if (isLengthCacheValid()) return cachedLength(); - itemCommon(UINT_MAX); + item(UINT_MAX); ASSERT(isLengthCacheValid()); return cachedLength(); } -Node* DynamicNodeListCacheBase::itemCommon(unsigned offset) const +Node* LiveNodeListBase::item(unsigned offset) const { if (isItemCacheValid() && cachedItemOffset() == offset) return cachedItem(); @@ -416,7 +416,7 @@ Node* DynamicNodeListCacheBase::itemCommon(unsigned offset) const return itemBeforeOrAfterCachedItem(offset); } -Node* DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem(unsigned offset) const +Node* LiveNodeListBase::itemBeforeOrAfterCachedItem(unsigned offset) const { unsigned currentOffset = cachedItemOffset(); Node* currentItem = cachedItem(); |