more window mediator whitespace cleanup, no bug

This commit is contained in:
Josh Aas 2009-01-05 12:58:59 -06:00
parent 5a88fcd9ff
commit bf282eac6f
2 changed files with 33 additions and 37 deletions

View File

@ -77,8 +77,8 @@ class nsAppShellWindowEnumerator : public nsISimpleEnumerator {
friend class nsWindowMediator;
public:
nsAppShellWindowEnumerator (const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsAppShellWindowEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsAppShellWindowEnumerator();
NS_IMETHOD GetNext(nsISupports **retval) = 0;
NS_IMETHOD HasMoreElements(PRBool *retval);
@ -100,8 +100,8 @@ protected:
class nsASDOMWindowEnumerator : public nsAppShellWindowEnumerator {
public:
nsASDOMWindowEnumerator (const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASDOMWindowEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowEnumerator();
NS_IMETHOD GetNext(nsISupports **retval);
};
@ -109,8 +109,8 @@ public:
class nsASXULWindowEnumerator : public nsAppShellWindowEnumerator {
public:
nsASXULWindowEnumerator (const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASXULWindowEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowEnumerator();
NS_IMETHOD GetNext(nsISupports **retval);
};
@ -122,9 +122,8 @@ public:
class nsASDOMWindowEarlyToLateEnumerator : public nsASDOMWindowEnumerator {
public:
nsASDOMWindowEarlyToLateEnumerator(
const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASDOMWindowEarlyToLateEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowEarlyToLateEnumerator();
@ -135,9 +134,8 @@ protected:
class nsASXULWindowEarlyToLateEnumerator : public nsASXULWindowEnumerator {
public:
nsASXULWindowEarlyToLateEnumerator(
const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASXULWindowEarlyToLateEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowEarlyToLateEnumerator();
@ -148,9 +146,8 @@ protected:
class nsASDOMWindowFrontToBackEnumerator : public nsASDOMWindowEnumerator {
public:
nsASDOMWindowFrontToBackEnumerator(
const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASDOMWindowFrontToBackEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowFrontToBackEnumerator();
@ -161,9 +158,8 @@ protected:
class nsASXULWindowFrontToBackEnumerator : public nsASXULWindowEnumerator {
public:
nsASXULWindowFrontToBackEnumerator(
const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASXULWindowFrontToBackEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowFrontToBackEnumerator();
@ -174,9 +170,8 @@ protected:
class nsASDOMWindowBackToFrontEnumerator : public nsASDOMWindowEnumerator {
public:
nsASDOMWindowBackToFrontEnumerator (
const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASDOMWindowBackToFrontEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowBackToFrontEnumerator();
@ -187,9 +182,8 @@ protected:
class nsASXULWindowBackToFrontEnumerator : public nsASXULWindowEnumerator {
public:
nsASXULWindowBackToFrontEnumerator (
const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
nsASXULWindowBackToFrontEnumerator(const PRUnichar* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowBackToFrontEnumerator();

View File

@ -119,7 +119,7 @@ NS_IMETHODIMP nsWindowMediator::RegisterWindow(nsIXULWindow* inWindow)
mTimeStamp++;
// Create window info struct and add to list of windows
nsWindowInfo* windowInfo = new nsWindowInfo (inWindow, mTimeStamp);
nsWindowInfo* windowInfo = new nsWindowInfo(inWindow, mTimeStamp);
if (!windowInfo)
return NS_ERROR_OUT_OF_MEMORY;
@ -156,7 +156,7 @@ nsWindowMediator::UnregisterWindow(nsWindowInfo *inInfo)
((nsAppShellWindowEnumerator*)mEnumeratorList[index])->WindowRemoved(inInfo);
if (mListeners) {
WindowTitleData winData = {inInfo->mWindow.get(), nsnull };
WindowTitleData winData = { inInfo->mWindow.get(), nsnull };
mListeners->EnumerateForwards(notifyCloseWindow, (void*)&winData);
}
@ -315,7 +315,7 @@ nsWindowMediator::GetMostRecentWindow(const PRUnichar* inType, nsIDOMWindowInter
nsWindowInfo *info = MostRecentWindowInfo(inType);
if (info && info->mWindow) {
nsCOMPtr <nsIDOMWindowInternal> DOMWindow;
nsCOMPtr<nsIDOMWindowInternal> DOMWindow;
if(NS_SUCCEEDED(GetDOMWindow(info->mWindow, DOMWindow))) {
*outWindow = DOMWindow;
NS_ADDREF(*outWindow);
@ -394,7 +394,8 @@ nsWindowMediator::CalculateZPosition(
nsIWidget *inBelow,
PRUint32 *outPosition,
nsIWidget **outBelow,
PRBool *outAltered) {
PRBool *outAltered)
{
if (!outBelow)
return NS_ERROR_NULL_POINTER;
@ -523,7 +524,8 @@ NS_IMETHODIMP
nsWindowMediator::SetZPosition(
nsIXULWindow *inWindow,
PRUint32 inPosition,
nsIXULWindow *inBelow) {
nsIXULWindow *inBelow)
{
nsWindowInfo *inInfo,
*belowInfo;
@ -577,8 +579,8 @@ nsWindowMediator::SetZPosition(
}
NS_IMETHODIMP
nsWindowMediator::GetZLevel(nsIXULWindow *aWindow, PRUint32 *_retval) {
nsWindowMediator::GetZLevel(nsIXULWindow *aWindow, PRUint32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = nsIXULWindow::normalZ;
nsWindowInfo *info = GetInfoFor(aWindow);
@ -592,8 +594,8 @@ nsWindowMediator::GetZLevel(nsIXULWindow *aWindow, PRUint32 *_retval) {
}
NS_IMETHODIMP
nsWindowMediator::SetZLevel(nsIXULWindow *aWindow, PRUint32 aZLevel) {
nsWindowMediator::SetZLevel(nsIXULWindow *aWindow, PRUint32 aZLevel)
{
nsAutoLock lock(mListLock);
nsWindowInfo *info = GetInfoFor(aWindow);
@ -625,8 +627,8 @@ nsWindowMediator::SetZLevel(nsIXULWindow *aWindow, PRUint32 aZLevel) {
was moved.
*/
void
nsWindowMediator::SortZOrderFrontToBack() {
nsWindowMediator::SortZOrderFrontToBack()
{
nsWindowInfo *scan, // scans list looking for problems
*search, // searches for correct placement for scan window
*prev, // previous search element
@ -684,8 +686,8 @@ nsWindowMediator::SortZOrderFrontToBack() {
// see comment for SortZOrderFrontToBack
void
nsWindowMediator::SortZOrderBackToFront() {
nsWindowMediator::SortZOrderBackToFront()
{
nsWindowInfo *scan, // scans list looking for problems
*search, // searches for correct placement for scan window
*lowest; // bottom-most window in list