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

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

Issue 189923002: Use new Traversal<HTML*Element> API in HTML code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/html/HTMLObjectElement.cpp ('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 6382133c6dc00dba5e8debeed5ab668d8027fad3..7c30e4dfee1ee2f11719a4745cfb765f940eee52 100644
--- a/Source/core/html/HTMLTableElement.cpp
+++ b/Source/core/html/HTMLTableElement.cpp
@@ -66,11 +66,7 @@ PassRefPtr<HTMLTableElement> HTMLTableElement::create(Document& document)
HTMLTableCaptionElement* HTMLTableElement::caption() const
{
- for (Element* child = ElementTraversal::firstWithin(*this); child; child = ElementTraversal::nextSibling(*child)) {
- if (child->hasTagName(captionTag))
- return toHTMLTableCaptionElement(child);
- }
- return 0;
+ return Traversal<HTMLTableCaptionElement>::firstChild(*this);
}
void HTMLTableElement::setCaption(PassRefPtr<HTMLTableCaptionElement> newCaption, ExceptionState& exceptionState)
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | Source/core/html/HTMLTableRowElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698