Bug 653295 - Fixing warning of comparision between signed and unsigned integer expressions in nsFrameSetFrame.cpp. r=bz
authorAtul Aggarwal <atulagrwl@gmail.com>
Mon, 26 Sep 2011 01:47:43 +0530
changeset 78879 7d983fc8a13c41fef193013d146474284bc4e877
parent 78878 29f857ce7e31b5a2166943d3539a93c53148905d
child 78880 44ef245b870628514f0fd9ba667788b56b0ecd65
child 78884 0c880a09186d4afeddeda29bc191a1691e86804a
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs653295
milestone9.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 653295 - Fixing warning of comparision between signed and unsigned integer expressions in nsFrameSetFrame.cpp. r=bz
layout/generic/nsFrameSetFrame.cpp
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -1356,23 +1356,20 @@ nsHTMLFramesetFrame::RecalculateBorderRe
   PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < PR_INT32_MAX / NS_MAX_FRAMESET_SPEC_COUNT);
   PRInt32 numCells = mNumRows * mNumCols; // max number of cells
   PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT
                    < UINT_MAX / sizeof(PRInt32) / NS_MAX_FRAMESET_SPEC_COUNT); 
   nsAutoArrayPtr<PRInt32> childTypes(new PRInt32[numCells]);
   if (NS_UNLIKELY(!childTypes)) {
     return;
   }
-  PRUint32 childIndex, childTypeIndex = 0;
+  PRInt32 childTypeIndex = 0;
 
-  // number of any type of children
-  PRUint32 numChildren = mContent->GetChildCount();
-  for (childIndex = 0; childIndex < numChildren; childIndex++) {
-    nsIContent *child = mContent->GetChildAt(childIndex);
-
+  for (nsIContent *child = mContent->GetFirstChild(); child;
+       child = child->GetNextSibling()) {
     if (child->IsHTML()) {
       nsINodeInfo *ni = child->NodeInfo();
 
       if (ni->Equals(nsGkAtoms::frameset)) {
         childTypes[childTypeIndex++] = FRAMESET;
       } else if (ni->Equals(nsGkAtoms::frame)) {
         childTypes[childTypeIndex++] = FRAME;
       }