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

Unified Diff: Source/core/html/track/LoadableTextTrack.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/HTMLTableSectionElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/LoadableTextTrack.cpp
diff --git a/Source/core/html/track/LoadableTextTrack.cpp b/Source/core/html/track/LoadableTextTrack.cpp
index dd692848f1118ffa4a7164944fd5548c28c2a8a7..247330c0d727c48dde20c5ec510482edabc0d45c 100644
--- a/Source/core/html/track/LoadableTextTrack.cpp
+++ b/Source/core/html/track/LoadableTextTrack.cpp
@@ -155,10 +155,10 @@ size_t LoadableTextTrack::trackElementIndex()
ASSERT(m_trackElement->parentNode());
size_t index = 0;
- for (Element* child = ElementTraversal::firstWithin(*m_trackElement->parentNode()); child; child = ElementTraversal::nextSibling(*child)) {
- if (!child->hasTagName(trackTag) || !child->parentNode())
+ for (HTMLTrackElement* track = Traversal<HTMLTrackElement>::firstChild(*m_trackElement->parentNode()); track; track = Traversal<HTMLTrackElement>::nextSibling(*track)) {
+ if (!track->parentNode())
continue;
- if (child == m_trackElement)
+ if (track == m_trackElement)
return index;
++index;
}
« no previous file with comments | « Source/core/html/HTMLTableSectionElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698