|
Make sure the root node of selector queries is a ContainerNode
Make sure the root node of selector queries is a ContainerNode by moving the
querySelector*() methods from the Node class to the ContainerNode class. These
methods are exposed to JS on Document and Element, both of which are
container nodes.
Doing this gets rid of an unnecessary container node check in SelectorQuery
and also enables using the slightly faster firstWithin(ContainerNode) over
firstWithin(Node) traversal method.
R=eseidel, esprehn, adamk
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165783
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+71 lines, -68 lines) |
Patch |
|
M |
Source/core/dom/ContainerNode.h
|
View
|
1
2
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ContainerNode.cpp
|
View
|
1
2
|
2 chunks |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Node.h
|
View
|
1
2
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Node.cpp
|
View
|
1
2
|
2 chunks |
+0 lines, -27 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/SelectorQuery.h
|
View
|
1
2
|
4 chunks |
+14 lines, -13 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/SelectorQuery.cpp
|
View
|
1
2
|
15 chunks |
+18 lines, -18 lines |
0 comments
|
Download
|
|
M |
Source/core/inspector/InspectorDOMAgent.cpp
|
View
|
1
2
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/web/WebNode.cpp
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/web/tests/TouchActionTest.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 9 (0 generated)
|