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

Unified Diff: Source/core/html/HTMLTableElement.cpp

Issue 412033004: Use Traversal<>::firstChild() instead of firstWithin() when iterating over children (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/core/dom/ParentNode.h ('k') | Source/core/html/HTMLTableRowElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableElement.cpp
diff --git a/Source/core/html/HTMLTableElement.cpp b/Source/core/html/HTMLTableElement.cpp
index 95be5d366aa6919bd427f62b776c0234961dd5f6..0ae3932b783e69104ba30ab0d60f2ea0a659b9cf 100644
--- a/Source/core/html/HTMLTableElement.cpp
+++ b/Source/core/html/HTMLTableElement.cpp
@@ -77,7 +77,7 @@ void HTMLTableElement::setCaption(PassRefPtrWillBeRawPtr<HTMLTableCaptionElement
HTMLTableSectionElement* HTMLTableElement::tHead() const
{
- for (HTMLElement* child = Traversal<HTMLElement>::firstWithin(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
+ for (HTMLElement* child = Traversal<HTMLElement>::firstChild(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
if (child->hasTagName(theadTag))
return toHTMLTableSectionElement(child);
}
@@ -89,7 +89,7 @@ void HTMLTableElement::setTHead(PassRefPtrWillBeRawPtr<HTMLTableSectionElement>
deleteTHead();
HTMLElement* child;
- for (child = Traversal<HTMLElement>::firstWithin(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
+ for (child = Traversal<HTMLElement>::firstChild(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag))
break;
}
@@ -99,7 +99,7 @@ void HTMLTableElement::setTHead(PassRefPtrWillBeRawPtr<HTMLTableSectionElement>
HTMLTableSectionElement* HTMLTableElement::tFoot() const
{
- for (HTMLElement* child = Traversal<HTMLElement>::firstWithin(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
+ for (HTMLElement* child = Traversal<HTMLElement>::firstChild(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
if (child->hasTagName(tfootTag))
return toHTMLTableSectionElement(child);
}
@@ -111,7 +111,7 @@ void HTMLTableElement::setTFoot(PassRefPtrWillBeRawPtr<HTMLTableSectionElement>
deleteTFoot();
HTMLElement* child;
- for (child = Traversal<HTMLElement>::firstWithin(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
+ for (child = Traversal<HTMLElement>::firstChild(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag) && !child->hasTagName(theadTag))
break;
}
« no previous file with comments | « Source/core/dom/ParentNode.h ('k') | Source/core/html/HTMLTableRowElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698