Bug 530392 - Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in /xpfe/, r=roc
authorJae-Seong Lee-Russo <lusian@gmail.com>
Sun, 13 Dec 2009 09:32:10 -0800
changeset 35672 a795d222898aacc84fcaf4b7e21f56b961669575
parent 35671 763b42a826498be2c917f787b283e37c8ae13af7
child 35673 e89ef920772f51dcaa58a6c000882f2d4d3a51b1
push id10672
push userphilringnalda@gmail.com
push dateSun, 13 Dec 2009 17:32:43 +0000
treeherdermozilla-central@e89ef920772f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs530392
milestone1.9.3a1pre
Bug 530392 - Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in /xpfe/, r=roc
xpfe/appshell/src/nsXULWindow.cpp
--- a/xpfe/appshell/src/nsXULWindow.cpp
+++ b/xpfe/appshell/src/nsXULWindow.cpp
@@ -1134,25 +1134,25 @@ PRBool nsXULWindow::LoadSizeFromXUL()
   PRInt32 specHeight = currHeight;
   nsAutoString sizeString;
   PRInt32 appPerDev = AppUnitsPerDevPixel();
 
   rv = windowElement->GetAttribute(NS_LITERAL_STRING("width"), sizeString);
   if (NS_SUCCEEDED(rv)) {
     temp = sizeString.ToInteger(&errorCode);
     if (NS_SUCCEEDED(errorCode) && temp > 0) {
-      specWidth = CSSToDevPixels(PR_MAX(temp, 100), appPerDev);
+      specWidth = CSSToDevPixels(NS_MAX(temp, 100), appPerDev);
       gotSize = PR_TRUE;
     }
   }
   rv = windowElement->GetAttribute(NS_LITERAL_STRING("height"), sizeString);
   if (NS_SUCCEEDED(rv)) {
     temp = sizeString.ToInteger(&errorCode);
     if (NS_SUCCEEDED(errorCode) && temp > 0) {
-      specHeight = CSSToDevPixels(PR_MAX(temp, 100), appPerDev);
+      specHeight = CSSToDevPixels(NS_MAX(temp, 100), appPerDev);
       gotSize = PR_TRUE;
     }
   }
 
   if (gotSize) {
     // constrain to screen size
     nsCOMPtr<nsIDOMWindowInternal> domWindow;
     GetWindowDOMWindow(getter_AddRefs(domWindow));
@@ -1686,18 +1686,18 @@ NS_IMETHODIMP nsXULWindow::SizeShellTo(n
     PRInt32 winCX = 0;
     PRInt32 winCY = 0;
 
     GetSize(&winCX, &winCY);
     // There's no point in trying to make the window smaller than the
     // desired docshell size --- that's not likely to work. This whole
     // function assumes that the outer docshell is adding some constant
     // "border" chrome to aShellItem.
-    winCX = PR_MAX(winCX + widthDelta, aCX);
-    winCY = PR_MAX(winCY + heightDelta, aCY);
+    winCX = NS_MAX(winCX + widthDelta, aCX);
+    winCY = NS_MAX(winCY + heightDelta, aCY);
     SetSize(winCX, winCY, PR_TRUE);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsXULWindow::ExitModalLoop(nsresult aStatus)
 {