Bug 1425440 - Get rid of GetChildAt_Deprecated in nsPresContext, r=catalinb
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 05 Jan 2018 14:36:47 +0100
changeset 449754 d47e642852b17e46c178d26d324b245199e2bc3c
parent 449753 a37695e59774af91ca8e9e50bee369364cf4feaa
child 449755 bba4a6269557ba7214a09c9c260f83d9a84885e8
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscatalinb
bugs1425440
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1425440 - Get rid of GetChildAt_Deprecated in nsPresContext, r=catalinb
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1288,19 +1288,19 @@ void nsPresContext::SetImgAnimations(nsI
   nsCOMPtr<nsIImageLoadingContent> imgContent(do_QueryInterface(aParent));
   if (imgContent) {
     nsCOMPtr<imgIRequest> imgReq;
     imgContent->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
                            getter_AddRefs(imgReq));
     SetImgAnimModeOnImgReq(imgReq, aMode);
   }
 
-  uint32_t count = aParent->GetChildCount();
-  for (uint32_t i = 0; i < count; ++i) {
-    SetImgAnimations(aParent->GetChildAt_Deprecated(i), aMode);
+  for (nsIContent* childContent = aParent->GetFirstChild();
+       childContent; childContent = childContent->GetNextSibling()) {
+    SetImgAnimations(childContent, aMode);
   }
 }
 
 void
 nsPresContext::SetSMILAnimations(nsIDocument *aDoc, uint16_t aNewMode,
                                  uint16_t aOldMode)
 {
   if (aDoc->HasAnimationController()) {