Last Comment Bug 666863 - a11y namespace
: a11y namespace
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla8
Assigned To: Trevor Saunders (:tbsaunde)
:
Mentors:
Depends on:
Blocks: namespaceify
  Show dependency treegraph
 
Reported: 2011-06-24 00:09 PDT by Trevor Saunders (:tbsaunde)
Modified: 2012-11-17 20:19 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
part1 (34.32 KB, patch)
2011-07-27 06:00 PDT, Trevor Saunders (:tbsaunde)
surkov.alexander: review+
Details | Diff | Splinter Review

Description Trevor Saunders (:tbsaunde) 2011-06-24 00:09:33 PDT

    
Comment 1 Trevor Saunders (:tbsaunde) 2011-07-27 06:00:13 PDT
Created attachment 548757 [details] [diff] [review]
part1
Comment 2 alexander :surkov 2011-07-28 00:47:58 PDT
Comment on attachment 548757 [details] [diff] [review]
part1

Review of attachment 548757 [details] [diff] [review]:
-----------------------------------------------------------------

r=me

::: accessible/src/base/Makefile.in
@@ +86,5 @@
>    nsAccessibilityService.h \
>    nsAccessible.h \
>    nsAccessNode.h \
>    nsARIAMap.h \
>  	States.h \

remove it from exports

@@ +93,5 @@
> +EXPORTS_NAMESPACES = mozilla/a11y
> +
> +EXPORTS_mozilla/a11y = \
> +	States.h \
> +	$(NULL)

nit: use spaces instead tabs

::: accessible/src/base/States.h
@@ +42,5 @@
>  
>  #include <prtypes.h>
>  
> +namespace mozilla {
> +  namespace a11y {

nit: no indent

@@ +306,5 @@
>     */
>    const PRUint64 EXPANDABLE = ((PRUint64) 0x1) << 46;
>  }
> +}
> +}

} // namespace states
} // namespace a11y
} // namespace mozilla

::: accessible/src/base/nsAccessible.h
@@ +444,5 @@
>      // XXX In order to implement this we would need to follow every link
>      // Perhaps we can get information about invalid links from the cache
>      // In the mean time authors can use role="link" aria-invalid="true"
>      // to force it for links they internally know to be invalid
> +    return (0 == (State() & mozilla::a11y::states::INVALID));

typedef mozilla::a11y::states to states inside private section of the class

::: accessible/src/mac/nsAccessibleWrap.h
@@ +85,5 @@
>      
>      PRInt32 GetUnignoredChildCount(PRBool aDeepCount);
>      
>      PRBool HasPopup () {
> +      return (NativeState() & mozilla::a11y::states::HASPOPUP);

if you typedefed then you can use states namespace directly
Comment 3 alexander :surkov 2011-07-28 01:02:44 PDT
anything else to be done here? other exported things (except a11yGeneric.h) are prefixed by 'ns' namespace what makes them allowed globals. As far as I know a11y folders aren't included into other modules so probably no win to namespace things like filters or AccIterator. Should we keep exported headers in public folder?
Comment 4 Trevor Saunders (:tbsaunde) 2011-07-28 19:25:47 PDT
landed http://hg.mozilla.org/integration/mozilla-inbound/489b47df5c6e
Comment 5 Boris Zbarsky [:bz] 2011-07-28 23:18:07 PDT
Backed out from mozilla-inbound because the patch doesn't compile on Windows.
Comment 6 alexander :surkov 2011-07-28 23:28:48 PDT
e:/builds/moz2_slave/m-in-w32/build/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp(80) : error C2653: 'states' : is not a class or namespace name

e:/builds/moz2_slave/m-in-w32/build/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp(80) : error C2065: 'UNAVAILABLE' : undeclared identifier

Trevor, you forgot to do using namespace mozilla::a11y.
Comment 7 Trevor Saunders (:tbsaunde) 2011-07-31 20:27:56 PDT
try harder http://hg.mozilla.org/integration/mozilla-inbound/rev/cc7357dfd1e2
Comment 8 Marco Bonardo [::mak] 2011-08-01 08:06:46 PDT
http://hg.mozilla.org/mozilla-central/rev/cc7357dfd1e2

Note You need to log in before you can comment on or make changes to this bug.