|
Consistently cache ElementData::length() before loops
Consistently cache ElementData::length() before loops as this method is not
a simple getter (it contains a conditional branch) and we don't want to call
it for each iteration of the loop.
Previously, it was only cached before some of the loops. This CL makes this
consistent. Also, use length for the variable instead of len, as we prefer to
avoid abbreviations, as per coding style.
Same thing for Element::attributeCount() as it calls ElementData::length().
R=adamk, eseidel
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167794
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+45 lines, -25 lines) |
Patch |
|
M |
Source/core/css/SelectorChecker.cpp
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/Element.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/Element.cpp
|
View
|
1
2
3
4
|
4 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ElementData.h
|
View
|
1
2
3
|
4 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ElementData.cpp
|
View
|
1
2
|
5 chunks |
+12 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Node.cpp
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLEmbedElement.cpp
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLObjectElement.cpp
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/page/PageSerializer.cpp
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/xml/XPathStep.cpp
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/xml/parser/XMLDocumentParser.cpp
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 21 (0 generated)
|