Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 3ffd916606a5ea6f02b9c26b6234b3f2abb35e44..74322e34fb6c88ce5c816c46a7494bbf62868138 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -3852,15 +3852,15 @@ void HTMLMediaElement::setMediaGroup(const AtomicString& group) |
| // 4. If there is another media element whose Document is the same as m's Document (even if one or both |
| // of these elements are not actually in the Document), |
| WeakMediaElementSet elements = documentToElementSetMap().get(&document()); |
| - for (WeakMediaElementSet::iterator i = elements.begin(); i != elements.end(); ++i) { |
| - if (*i == this) |
| + for (const auto& i : elements) { |
|
sof
2014/10/21 09:58:43
Let's go with a longer name -- element?
riju_
2014/11/04 17:50:52
Done.
|
| + if (i == this) |
| continue; |
| // and which also has a mediagroup attribute, and whose mediagroup attribute has the same value as |
| // the new value of m's mediagroup attribute, |
| - if ((*i)->mediaGroup() == group) { |
| + if (i->mediaGroup() == group) { |
| // then let controller be that media element's current media controller. |
| - setControllerInternal((*i)->controller()); |
| + setControllerInternal(i->controller()); |
| return; |
| } |
| } |