Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: third_party/WebKit/Source/core/dom/NodeListsNodeData.cpp

Issue 2868823002: getElementsByTagName() should take a qualifiedName in parameter (Closed)
Patch Set: Rebased And Align with review comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google 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 23 matching lines...) Expand all
34 34
35 namespace blink { 35 namespace blink {
36 36
37 void NodeListsNodeData::InvalidateCaches(const QualifiedName* attr_name) { 37 void NodeListsNodeData::InvalidateCaches(const QualifiedName* attr_name) {
38 for (const auto& cache : atomic_name_caches_) 38 for (const auto& cache : atomic_name_caches_)
39 cache.value->InvalidateCacheForAttribute(attr_name); 39 cache.value->InvalidateCacheForAttribute(attr_name);
40 40
41 if (attr_name) 41 if (attr_name)
42 return; 42 return;
43 43
44 for (auto& cache : tag_collection_cache_ns_) 44 for (auto& cache : tag_collection_ns_caches_)
45 cache.value->InvalidateCache(); 45 cache.value->InvalidateCache();
46 } 46 }
47 47
48 DEFINE_TRACE(NodeListsNodeData) { 48 DEFINE_TRACE(NodeListsNodeData) {
49 visitor->Trace(child_node_list_); 49 visitor->Trace(child_node_list_);
50 visitor->Trace(atomic_name_caches_); 50 visitor->Trace(atomic_name_caches_);
51 visitor->Trace(tag_collection_cache_ns_); 51 visitor->Trace(tag_collection_ns_caches_);
52 } 52 }
53 53
54 DEFINE_TRACE_WRAPPERS(NodeListsNodeData) { 54 DEFINE_TRACE_WRAPPERS(NodeListsNodeData) {
55 visitor->TraceWrappersWithManualWriteBarrier(child_node_list_); 55 visitor->TraceWrappersWithManualWriteBarrier(child_node_list_);
56 for (const auto list : atomic_name_caches_.Values()) { 56 for (const auto list : atomic_name_caches_.Values()) {
57 if (IsHTMLCollectionType(list->GetType())) { 57 if (IsHTMLCollectionType(list->GetType())) {
58 visitor->TraceWrappersWithManualWriteBarrier( 58 visitor->TraceWrappersWithManualWriteBarrier(
59 static_cast<const HTMLCollection*>(list.Get())); 59 static_cast<const HTMLCollection*>(list.Get()));
60 } else { 60 } else {
61 visitor->TraceWrappersWithManualWriteBarrier( 61 visitor->TraceWrappersWithManualWriteBarrier(
62 static_cast<const LiveNodeList*>(list.Get())); 62 static_cast<const LiveNodeList*>(list.Get()));
63 } 63 }
64 } 64 }
65 for (const auto list : tag_collection_cache_ns_.Values()) { 65 for (const auto list : tag_collection_ns_caches_.Values()) {
66 visitor->TraceWrappersWithManualWriteBarrier(list.Get()); 66 visitor->TraceWrappersWithManualWriteBarrier(list.Get());
67 } 67 }
68 } 68 }
69 69
70 } // namespace blink 70 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/NodeListsNodeData.h ('k') | third_party/WebKit/Source/core/dom/TagCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698