diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 5740ac03c5d..07ec9286d7b 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -4315,7 +4315,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, (void**)getter_AddRefs(selectElement)); if (NS_SUCCEEDED(res) && selectElement) { nsCOMPtr childContent; - aContainer->ChildAt(i, *getter_AddRefs(childContent)); + aContainer->ChildAt(aNewIndexInContainer, *getter_AddRefs(childContent)); if (childContent) { RemoveDummyFrameFromSelect(aPresContext, shell, aContainer, childContent, selectElement); } diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 5740ac03c5d..07ec9286d7b 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -4315,7 +4315,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, (void**)getter_AddRefs(selectElement)); if (NS_SUCCEEDED(res) && selectElement) { nsCOMPtr childContent; - aContainer->ChildAt(i, *getter_AddRefs(childContent)); + aContainer->ChildAt(aNewIndexInContainer, *getter_AddRefs(childContent)); if (childContent) { RemoveDummyFrameFromSelect(aPresContext, shell, aContainer, childContent, selectElement); }