Bug 620936 followup - Switch to NS_MIN; r=joe a=DONTBUILD
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 11 Jan 2011 12:10:47 -0500
changeset 60300 a36ba194fd7cdde6c86edceb205f9a67fa704f51
parent 60299 e28ce34157f14821034ca8157fbbd2ad67c27ee0
child 60301 aa79feae1ae49773b344ee3f3a21edf1cd53af59
push idunknown
push userunknown
push dateunknown
reviewersjoe, DONTBUILD
bugs620936
milestone2.0b10pre
Bug 620936 followup - Switch to NS_MIN; r=joe a=DONTBUILD
layout/forms/nsTextControlFrame.cpp
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -1097,17 +1097,17 @@ nsTextControlFrame::OffsetToDOMPoint(PRI
     if (length == 2 && PRUint32(aOffset) == textLength) {
       // If we're at the end of the text node and we have a trailing BR node,
       // set the selection on the BR node.
       NS_IF_ADDREF(*aResult = rootNode);
       *aPosition = 1;
     } else {
       // Otherwise, set the selection on the textnode itself.
       NS_IF_ADDREF(*aResult = firstNode);
-      *aPosition = PR_MIN(aOffset, textLength);
+      *aPosition = NS_MIN(aOffset, PRInt32(textLength));
     }
   } else {
     NS_IF_ADDREF(*aResult = rootNode);
     *aPosition = 0;
   }
 
   return NS_OK;
 }