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

Unified Diff: third_party/WebKit/Source/core/dom/NthIndexCache.cpp

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/NthIndexCache.cpp
diff --git a/third_party/WebKit/Source/core/dom/NthIndexCache.cpp b/third_party/WebKit/Source/core/dom/NthIndexCache.cpp
index 4556addee35762d137f238e26856553eb01a0431..723f0c477dfe0716f5df084de45ad6efb692c7ad 100644
--- a/third_party/WebKit/Source/core/dom/NthIndexCache.cpp
+++ b/third_party/WebKit/Source/core/dom/NthIndexCache.cpp
@@ -222,11 +222,11 @@ unsigned NthIndexData::nthLastOfTypeIndex(Element& element) const {
}
NthIndexData::NthIndexData(ContainerNode& parent) {
- // The frequency at which we cache the nth-index for a set of siblings.
- // A spread value of 3 means every third Element will have its nth-index cached.
- // Using a spread value > 1 is done to save memory. Looking up the nth-index will
- // still be done in constant time in terms of sibling count, at most 'spread'
- // elements will be traversed.
+ // The frequency at which we cache the nth-index for a set of siblings. A
+ // spread value of 3 means every third Element will have its nth-index cached.
+ // Using a spread value > 1 is done to save memory. Looking up the nth-index
+ // will still be done in constant time in terms of sibling count, at most
+ // 'spread' elements will be traversed.
const unsigned spread = 3;
unsigned count = 0;
for (Element* sibling = ElementTraversal::firstChild(parent); sibling;
@@ -239,11 +239,12 @@ NthIndexData::NthIndexData(ContainerNode& parent) {
}
NthIndexData::NthIndexData(ContainerNode& parent, const QualifiedName& type) {
- // The frequency at which we cache the nth-index of type for a set of siblings.
- // A spread value of 3 means every third Element of its type will have its nth-index cached.
- // Using a spread value > 1 is done to save memory. Looking up the nth-index of its type will
- // still be done in less time, as most number of elements traversed
- // will be equal to find 'spread' elements in the sibling set.
+ // The frequency at which we cache the nth-index of type for a set of
+ // siblings. A spread value of 3 means every third Element of its type will
+ // have its nth-index cached. Using a spread value > 1 is done to save
+ // memory. Looking up the nth-index of its type will still be done in less
+ // time, as most number of elements traversed will be equal to find 'spread'
+ // elements in the sibling set.
const unsigned spread = 3;
unsigned count = 0;
for (Element* sibling =
« no previous file with comments | « third_party/WebKit/Source/core/dom/NodeTraversal.cpp ('k') | third_party/WebKit/Source/core/dom/PendingScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698