mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 718627 - Part 3: Make helper GetObjectOrRepresentedView() public in mozAccessible.h. r=surkov
This commit is contained in:
parent
097c1a221c
commit
f96c1b1020
@ -44,6 +44,18 @@
|
||||
|
||||
@class mozRootAccessible;
|
||||
|
||||
/**
|
||||
* All mozAccessibles are either abstract objects (that correspond to XUL
|
||||
* widgets, HTML frames, etc) or are attached to a certain view; for example
|
||||
* a document view. When we hand an object off to an AT, we always want
|
||||
* to give it the represented view, in the latter case.
|
||||
*/
|
||||
inline id <mozAccessible>
|
||||
GetObjectOrRepresentedView(id <mozAccessible> aObject)
|
||||
{
|
||||
return [aObject hasRepresentedView] ? [aObject representedView] : aObject;
|
||||
}
|
||||
|
||||
@interface mozAccessible : NSObject <mozAccessible>
|
||||
{
|
||||
/**
|
||||
|
@ -71,21 +71,6 @@ ConvertCocoaToGeckoPoint(NSPoint &aInPoint, nsPoint &aOutPoint)
|
||||
aOutPoint.MoveTo ((nscoord)aInPoint.x, (nscoord)(mainScreenHeight - aInPoint.y));
|
||||
}
|
||||
|
||||
// all mozAccessibles are either abstract objects (that correspond to XUL widgets, HTML frames, etc) or are
|
||||
// attached to a certain view; for example a document view. when we hand an object off to an AT, we always want
|
||||
// to give it the represented view, in the latter case.
|
||||
static inline id <mozAccessible>
|
||||
GetObjectOrRepresentedView(id <mozAccessible> anObject)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
if ([anObject hasRepresentedView])
|
||||
return [anObject representedView];
|
||||
return anObject;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
|
||||
}
|
||||
|
||||
// returns the passed in object if it is not ignored. if it's ignored, will return
|
||||
// the first unignored ancestor.
|
||||
static inline id
|
||||
|
@ -245,7 +245,7 @@ using namespace mozilla::a11y;
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
NSAccessibilityPostNotification([self hasRepresentedView] ? [self representedView] : self,
|
||||
NSAccessibilityPostNotification(GetObjectOrRepresentedView(self),
|
||||
NSAccessibilityValueChangedNotification);
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
|
Loading…
Reference in New Issue
Block a user