Bug 1227927 Part 3 - Use ranged-based for-loop to rewrite some simple loops in part 2. r=mats

This commit is contained in:
Ting-Yu Lin
2016-01-29 22:42:15 +08:00
parent 122e5b9aeb
commit 60711ad8f1
29 changed files with 46 additions and 131 deletions

View File

@@ -2917,9 +2917,7 @@ HTMLInputElement::Focus(ErrorResult& aError)
// tab to the next one.
nsIFrame* frame = GetPrimaryFrame();
if (frame) {
for (nsIFrame* childFrame = frame->PrincipalChildList().FirstChild();
childFrame;
childFrame = childFrame->GetNextSibling()) {
for (nsIFrame* childFrame : frame->PrincipalChildList()) {
// See if the child is a button control.
nsCOMPtr<nsIFormControl> formCtrl =
do_QueryInterface(childFrame->GetContent());