|
Add template parameter to ElementTraversal to iterate over Elements of a specific type
Add template parameter to ElementTraversal to iterate over Elements of a
specific type. The resulting code looks like:
HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstWithin(table);
This avoids having to traverse generic Elements and then explicitly check their
tag name to make sure it is a specific Element subclass.
This CL only updates one file to use this functionality. The rest of the code
will be ported in a follow-up patch to reduce patch size.
This patch is based on the following WebKit revision by < antti@apple.com>:
http://trac.webkit.org/changeset/154481
R=esprehn@chromium.org, eseidel
BUG= 346733
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168689
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+278 lines, -281 lines) |
Patch |
|
M |
Source/build/scripts/templates/ElementTypeHelpers.h.tmpl
|
View
|
|
1 chunk |
+0 lines, -22 lines |
0 comments
|
Download
|
|
M |
Source/core/core.gypi
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Document.cpp
|
View
|
1
2
3
|
5 chunks |
+17 lines, -29 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Element.h
|
View
|
1
2
3
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ElementTraversal.h
|
View
|
1
2
3
|
4 chunks |
+193 lines, -64 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/NodeIterator.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/NodeIterator.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A + |
Source/core/dom/NodeIteratorBase.h
|
View
|
|
1 chunk |
+25 lines, -25 lines |
0 comments
|
Download
|
|
A + |
Source/core/dom/NodeIteratorBase.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
D |
Source/core/dom/Traversal.h
|
View
|
|
1 chunk |
+0 lines, -58 lines |
0 comments
|
Download
|
|
D |
Source/core/dom/Traversal.cpp
|
View
|
|
1 chunk |
+0 lines, -51 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/TreeWalker.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/TreeWalker.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLTableRowsCollection.cpp
|
View
|
1
2
3
|
4 chunks |
+9 lines, -21 lines |
0 comments
|
Download
|
Total messages: 23 (0 generated)
|