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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2556043002: Avoid WTF::Vector::at() and operator[] in core/html. (Closed)
Patch Set: _ Created 4 years 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
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 6ea360ea9f65e93b4b4cea98d18dc63c59ebca66..1556c0b15dc600190e536d80b264b7d83d341aa9 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -1230,11 +1230,9 @@ bool HTMLMediaElement::textTracksAreReady() const {
// mode was not in the disabled state when the element's resource selection
// algorithm last started now have a text track readiness state of loaded or
// failed to load.
- for (unsigned i = 0; i < m_textTracksWhenResourceSelectionBegan.size(); ++i) {
- if (m_textTracksWhenResourceSelectionBegan[i]->getReadinessState() ==
- TextTrack::Loading ||
- m_textTracksWhenResourceSelectionBegan[i]->getReadinessState() ==
- TextTrack::NotLoaded)
+ for (const auto& textTrack : m_textTracksWhenResourceSelectionBegan) {
+ if (textTrack->getReadinessState() == TextTrack::Loading ||
+ textTrack->getReadinessState() == TextTrack::NotLoaded)
return false;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698