Bug 1635319 Part 3 - Use range-based for loops instead of ChildListIterator in other layout directories. r=mats

Differential Revision: https://phabricator.services.mozilla.com/D75654
This commit is contained in:
Ting-Yu Lin 2020-05-18 01:12:26 +00:00
Родитель f99a520eb6
Коммит b98820d020
3 изменённых файлов: 6 добавлений и 13 удалений

Просмотреть файл

@ -182,11 +182,8 @@ void nsFontFaceUtils::MarkDirtyForFontChange(nsIFrame* aSubtreeRoot,
}
}
nsIFrame::ChildListIterator lists(f);
for (; !lists.IsDone(); lists.Next()) {
nsFrameList::Enumerator childFrames(lists.CurrentList());
for (; !childFrames.AtEnd(); childFrames.Next()) {
nsIFrame* kid = childFrames.get();
for (const auto& childList : f->GetChildLists()) {
for (nsIFrame* kid : childList.mList) {
stack.AppendElement(std::make_pair(kid, alreadyScheduled));
}
}

Просмотреть файл

@ -200,9 +200,8 @@ void nsDeckFrame::Animate(nsIFrame* aParentBox, bool start) {
imgFrame->StopAnimation();
}
for (nsIFrame::ChildListIterator childLists(aParentBox); !childLists.IsDone();
childLists.Next()) {
for (nsIFrame* child : childLists.CurrentList()) {
for (const auto& childList : aParentBox->GetChildLists()) {
for (nsIFrame* child : childList.mList) {
Animate(child, start);
}
}

Просмотреть файл

@ -272,11 +272,8 @@ int32_t nsScrollbarFrame::MoveToNewPosition() {
return curpos;
}
// notify all nsSliderFrames of the change
nsIFrame::ChildListIterator childLists(this);
for (; !childLists.IsDone(); childLists.Next()) {
nsFrameList::Enumerator childFrames(childLists.CurrentList());
for (; !childFrames.AtEnd(); childFrames.Next()) {
nsIFrame* f = childFrames.get();
for (const auto& childList : nsIFrame::GetChildLists()) {
for (nsIFrame* f : childList.mList) {
nsSliderFrame* sliderFrame = do_QueryFrame(f);
if (sliderFrame) {
sliderFrame->AttributeChanged(kNameSpaceID_None, nsGkAtoms::curpos,