From 4d54cf89ba2dcfefff3b8f03ab308ec4c57458db Mon Sep 17 00:00:00 2001 From: "hwaara%gmail.com" Date: Mon, 11 Sep 2006 16:22:22 +0000 Subject: [PATCH] Prefix members with 'm' per review comment. b=342146 NPODB git-svn-id: svn://10.0.0.236/trunk@209720 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/accessible/src/mac/mozAccessible.h | 6 +- mozilla/accessible/src/mac/mozAccessible.mm | 62 +++++++++---------- mozilla/accessible/src/mac/mozDocAccessible.h | 2 +- .../accessible/src/mac/mozDocAccessible.mm | 16 ++--- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/mozilla/accessible/src/mac/mozAccessible.h b/mozilla/accessible/src/mac/mozAccessible.h index a554ea911e0..431b55fc4aa 100644 --- a/mozilla/accessible/src/mac/mozAccessible.h +++ b/mozilla/accessible/src/mac/mozAccessible.h @@ -47,14 +47,14 @@ @interface mozAccessible : NSObject { - nsAccessible *geckoAccessible; // weak reference; it owns us. - NSMutableArray *children; // strong ref to array of children + nsAccessible *mGeckoAccessible; // weak reference; it owns us. + NSMutableArray *mChildren; // strong ref to array of children // we can be marked as 'expired' if Shutdown() is called on our geckoAccessible. // since we might still be retained by some third-party, we need to do cleanup // in |expire|, and prevent any potential harm that could come from someone using us // after this point. - BOOL isExpired; + BOOL mIsExpired; } // inits with the gecko owner. diff --git a/mozilla/accessible/src/mac/mozAccessible.mm b/mozilla/accessible/src/mac/mozAccessible.mm index e3b76a440c8..78834d0345c 100644 --- a/mozilla/accessible/src/mac/mozAccessible.mm +++ b/mozilla/accessible/src/mac/mozAccessible.mm @@ -83,8 +83,8 @@ ObjectOrUnignoredAncestor(id anObject) - (id)initWithAccessible:(nsAccessible*)accessible { if ((self = [super init])) { - geckoAccessible = accessible; - isExpired = NO; + mGeckoAccessible = accessible; + mIsExpired = NO; } return self; @@ -92,7 +92,7 @@ ObjectOrUnignoredAncestor(id anObject) - (void)dealloc { - [children release]; + [mChildren release]; [super dealloc]; } @@ -100,13 +100,13 @@ ObjectOrUnignoredAncestor(id anObject) - (BOOL)accessibilityIsIgnored { - return isExpired; + return mIsExpired; } - (NSArray*)accessibilityAttributeNames { // if we're expired, we don't support any attributes. - if (isExpired) + if (mIsExpired) return [NSArray array]; static NSArray *supportedAttributes = nil; @@ -134,7 +134,7 @@ ObjectOrUnignoredAncestor(id anObject) - (id)accessibilityAttributeValue:(NSString*)attribute { - if (isExpired) + if (mIsExpired) return nil; if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) @@ -195,7 +195,7 @@ ObjectOrUnignoredAncestor(id anObject) - (id)accessibilityHitTest:(NSPoint)point { - if (isExpired) + if (mIsExpired) return nil; #ifdef DEBUG_hakan @@ -208,7 +208,7 @@ ObjectOrUnignoredAncestor(id anObject) // see if we can find an accessible at that point. nsCOMPtr foundChild; - geckoAccessible->GetChildAtPoint ((PRInt32)geckoPoint.x, (PRInt32)geckoPoint.y, getter_AddRefs (foundChild)); + mGeckoAccessible->GetChildAtPoint ((PRInt32)geckoPoint.x, (PRInt32)geckoPoint.y, getter_AddRefs (foundChild)); if (foundChild) { // if we found something, return its native accessible. @@ -237,11 +237,11 @@ ObjectOrUnignoredAncestor(id anObject) - (id)accessibilityFocusedUIElement { - if (isExpired) + if (mIsExpired) return nil; nsCOMPtr focusedGeckoChild; - geckoAccessible->GetFocusedChild (getter_AddRefs (focusedGeckoChild)); + mGeckoAccessible->GetFocusedChild (getter_AddRefs (focusedGeckoChild)); if (focusedGeckoChild) { mozAccessible *focusedChild = [self getNativeFromGeckoAccessible:focusedGeckoChild]; @@ -258,7 +258,7 @@ ObjectOrUnignoredAncestor(id anObject) - (id )parent { nsCOMPtr accessibleParent; - nsresult rv = geckoAccessible->GetParent (getter_AddRefs (accessibleParent)); + nsresult rv = mGeckoAccessible->GetParent (getter_AddRefs (accessibleParent)); if (accessibleParent && NS_SUCCEEDED (rv)) { mozAccessible *nativeParent = [self getNativeFromGeckoAccessible:accessibleParent]; if (nativeParent) @@ -285,20 +285,20 @@ ObjectOrUnignoredAncestor(id anObject) // into a children array instead? then we could avoid this (quite expensive) // check. PRInt32 count=0; - geckoAccessible->GetChildCount (&count); + mGeckoAccessible->GetChildCount (&count); // short-circuit here. if we already have a children // array, and the count hasn't changed, just return our // cached version. - if (children && ([children count] == (unsigned)count)) - return children; + if (mChildren && ([mChildren count] == (unsigned)count)) + return mChildren; - if (!children) - children = [[NSMutableArray alloc] initWithCapacity:count]; + if (!mChildren) + mChildren = [[NSMutableArray alloc] initWithCapacity:count]; // get the array of children. nsCOMPtr childrenArray; - geckoAccessible->GetChildren(getter_AddRefs(childrenArray)); + mGeckoAccessible->GetChildren(getter_AddRefs(childrenArray)); if (childrenArray) { // get an enumerator for this array. @@ -317,18 +317,18 @@ ObjectOrUnignoredAncestor(id anObject) if (accessible) { curNative = [self getNativeFromGeckoAccessible:accessible]; if (curNative) - [children addObject:curNative]; + [mChildren addObject:curNative]; } } } - return children; + return mChildren; } - (NSValue*)position { PRInt32 x, y, width, height; - geckoAccessible->GetBounds (&x, &y, &width, &height); + mGeckoAccessible->GetBounds (&x, &y, &width, &height); NSPoint p = NSMakePoint (x, y); // the coords we get here should be top-left. @@ -349,35 +349,35 @@ ObjectOrUnignoredAncestor(id anObject) - (NSValue*)size { PRInt32 x, y, width, height; - geckoAccessible->GetBounds (&x, &y, &width, &height); + mGeckoAccessible->GetBounds (&x, &y, &width, &height); return [NSValue valueWithSize:NSMakeSize (width, height)]; } - (NSString*)role { PRUint32 roleInt = 0; - geckoAccessible->GetFinalRole (&roleInt); + mGeckoAccessible->GetFinalRole (&roleInt); return AXRoles[roleInt]; // see nsRoleMap.h } - (NSString*)title { nsAutoString title; - geckoAccessible->GetName (title); + mGeckoAccessible->GetName (title); return [NSString stringWithCharacters:title.BeginReading() length:title.Length()]; } - (NSString*)value { nsAutoString value; - geckoAccessible->GetValue (value); + mGeckoAccessible->GetValue (value); return [NSString stringWithCharacters:value.BeginReading() length:value.Length()]; } - (NSString*)customDescription { nsAutoString desc; - geckoAccessible->GetDescription (desc); + mGeckoAccessible->GetDescription (desc); return [NSString stringWithCharacters:desc.BeginReading() length:desc.Length()]; } @@ -390,27 +390,27 @@ ObjectOrUnignoredAncestor(id anObject) - (BOOL)isFocused { PRUint32 state = 0; - geckoAccessible->GetFinalState (&state); + mGeckoAccessible->GetFinalState (&state); return (state & nsIAccessible::STATE_FOCUSED) != 0; } - (BOOL)canBeFocused { PRUint32 state = 0; - geckoAccessible->GetFinalState (&state); + mGeckoAccessible->GetFinalState (&state); return (state & nsIAccessible::STATE_FOCUSABLE) != 0; } // should only be called if canBeFocused returns YES. - (BOOL)focus { - nsresult rv = geckoAccessible->TakeFocus(); + nsresult rv = mGeckoAccessible->TakeFocus(); return NS_SUCCEEDED (rv); } - (NSWindow*)window { - nsAccessibleWrap *accWrap = NS_STATIC_CAST (nsAccessibleWrap*, geckoAccessible); + nsAccessibleWrap *accWrap = NS_STATIC_CAST (nsAccessibleWrap*, mGeckoAccessible); NSWindow *nativeWindow = nil; accWrap->GetNativeWindow ((void**)&nativeWindow); @@ -431,13 +431,13 @@ ObjectOrUnignoredAncestor(id anObject) - (void)invalidateChildren { - [children removeAllObjects]; + [mChildren removeAllObjects]; } - (void)expire { [self invalidateChildren]; - isExpired = YES; + mIsExpired = YES; } #pragma mark - diff --git a/mozilla/accessible/src/mac/mozDocAccessible.h b/mozilla/accessible/src/mac/mozDocAccessible.h index dfc3981756b..c382813e192 100644 --- a/mozilla/accessible/src/mac/mozDocAccessible.h +++ b/mozilla/accessible/src/mac/mozDocAccessible.h @@ -68,6 +68,6 @@ // party tools that we do this! // // /hwaara - id parallelView; // weak ref + id mParallelView; // weak ref } @end diff --git a/mozilla/accessible/src/mac/mozDocAccessible.mm b/mozilla/accessible/src/mac/mozDocAccessible.mm index b87a1ee475c..63d5feca3fe 100644 --- a/mozilla/accessible/src/mac/mozDocAccessible.mm +++ b/mozilla/accessible/src/mac/mozDocAccessible.mm @@ -66,25 +66,25 @@ static id getNativeViewFromRootAccessible (nsAccessible // return the AXParent that our parallell NSView tells us about. - (id)parent { - if (!parallelView) - parallelView = (id)[self ourself]; + if (!mParallelView) + mParallelView = (id)[self ourself]; - return [parallelView accessibilityAttributeValue:NSAccessibilityParentAttribute]; + return [mParallelView accessibilityAttributeValue:NSAccessibilityParentAttribute]; } // this will return our parallell NSView. see mozDocAccessible.h - (id)ourself { - if (parallelView) - return (id)parallelView; + if (mParallelView) + return (id)mParallelView; - parallelView = getNativeViewFromRootAccessible (geckoAccessible); + mParallelView = getNativeViewFromRootAccessible (mGeckoAccessible); #ifdef DEBUG - if (!parallelView) + if (!mParallelView) NSLog (@"!!! can't return root accessible's native parallel view."); #endif - return parallelView; + return mParallelView; } - (NSString*)role