Chromium Code Reviews| Index: Source/core/dom/NodeListsNodeData.cpp |
| diff --git a/Source/core/timing/PerformanceEntry.cpp b/Source/core/dom/NodeListsNodeData.cpp |
| similarity index 67% |
| copy from Source/core/timing/PerformanceEntry.cpp |
| copy to Source/core/dom/NodeListsNodeData.cpp |
| index ee615282af2c991a4caf02bf27be698a05d72ac9..b3ced7fecada0eee915e2fb01c96bd78ae5468a5 100644 |
| --- a/Source/core/timing/PerformanceEntry.cpp |
| +++ b/Source/core/dom/NodeListsNodeData.cpp |
| @@ -29,41 +29,29 @@ |
| */ |
| #include "config.h" |
| -#include "core/timing/PerformanceEntry.h" |
|
adamk
2014/07/14 17:29:26
Unfortunate that git thinks this is a copy...maybe
Inactive
2014/07/14 17:35:13
Yes, this is a straight move of code from NodeRare
|
| +#include "core/dom/NodeListsNodeData.h" |
| namespace WebCore { |
| -PerformanceEntry::PerformanceEntry(const String& name, const String& entryType, double startTime, double finishTime) |
| - : m_name(name) |
| - , m_entryType(entryType) |
| - , m_startTime(startTime) |
| - , m_duration(finishTime - startTime) |
| +void NodeListsNodeData::invalidateCaches(const QualifiedName* attrName) |
| { |
| - ScriptWrappable::init(this); |
| -} |
| - |
| -PerformanceEntry::~PerformanceEntry() |
| -{ |
| -} |
| - |
| -String PerformanceEntry::name() const |
| -{ |
| - return m_name; |
| -} |
| + NodeListAtomicNameCacheMap::const_iterator atomicNameCacheEnd = m_atomicNameCaches.end(); |
| + for (NodeListAtomicNameCacheMap::const_iterator it = m_atomicNameCaches.begin(); it != atomicNameCacheEnd; ++it) |
| + it->value->invalidateCacheForAttribute(attrName); |
| -String PerformanceEntry::entryType() const |
| -{ |
| - return m_entryType; |
| -} |
| + if (attrName) |
| + return; |
| -double PerformanceEntry::startTime() const |
| -{ |
| - return m_startTime; |
| + TagCollectionCacheNS::iterator tagCacheEnd = m_tagCollectionCacheNS.end(); |
| + for (TagCollectionCacheNS::iterator it = m_tagCollectionCacheNS.begin(); it != tagCacheEnd; ++it) |
| + it->value->invalidateCache(); |
| } |
| -double PerformanceEntry::duration() const |
| +void NodeListsNodeData::trace(Visitor* visitor) |
| { |
| - return m_duration; |
| + visitor->trace(m_childNodeList); |
| + visitor->trace(m_atomicNameCaches); |
| + visitor->trace(m_tagCollectionCacheNS); |
| } |
| } // namespace WebCore |