|
Minimize calls to Node::nodeType() as it is virtual
Minimize calls to Node::nodeType() as it is virtual and there are sometimes
better alternative (i.e. Node flags). This patch leverages Node flags when
possible (using methods such as isElementNode(), isDocumentFragment(), ...). It
also caches the result of Node::nodeType() when suitable to avoid calling it
several times in a row.
R=eseidel@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175405
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+34 lines, -30 lines) |
Patch |
|
M |
Source/core/dom/Document.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
3 comments
|
Download
|
|
M |
Source/core/dom/DocumentFragment.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/Node.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
2 comments
|
Download
|
|
M |
Source/core/dom/Range.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/inspector/DOMPatchSupport.cpp
|
View
|
|
2 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/inspector/InspectorController.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/inspector/InspectorDOMAgent.cpp
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/inspector/InspectorStyleSheet.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/xml/XPathStep.cpp
|
View
|
|
2 chunks |
+12 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/core/xml/XPathUtil.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 8 (0 generated)
|