import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1001637 - Make math tables implement the nsIAccessibleTable interface. r=surkov (ebbb4325d6)
- Bug 1149118 - Expose radio group with the correct role on OS X, r=surkov (4d4a95735c)
- Bug 1113153 - use 'paragraph' role for paragraphs only, introduce 'text' role for small text containers, r=marcoz (14c4fa5881)
- Bug 1175164 - Do not expose MathML semantics element in the accessibility tree. r=surkov (3945ae0367)
- Bug 930843 part.1 Add test for checking isTrust attribute value of DOMActivate event r=smaug (14a49dd447)
- Bug 930843 part.2 NS_UI_ACTIVATE event should be trusted event even if it's caused by an untrusted event r=smaug (e0af6165b5)
- Bug 1156315 - Call DispatchInputEvent in more places on OS X. r=dvander (e24f42c09f)
- Bug 1186015 part.1 Rename nsIMEContext to mozilla::widget::IMEContext r=jimm (077bf6e772)
- Bug 1186015 part.2 Rename nsIMM32Handler to mozilla::widget::IMMHandler r=jimm+m_kato (a2098e33b5)
- Bug 1184533 Rewrite range check in aOffset of nsIMM32Handler::GetCharacterRectOfSelectedTextAt() r=emk (fb68bc3c56)
- Bug 555642 part.1 nsCaret should have a way to override the caret visible state for hiding caret temporarily and nsEditor should hide caret if composition string doesn't have caret information r=roc (9de4aa366c)
- Bug 1171847 Remove unnecessary ',' in logging code in nsTextStore::Initialize() r=m_kato (78d0d43625)
- Bug 1181714 nsTextStore should store previous focused document manager until new document manager actually gets focus r=m_kato (fd7e820af2)
- Bug 1176950 nsTextStore should keep storing locked content until NOTIFY_IME_OF_COMPOSITION_UPDATE is notified r=emk (0a12349575)
- Bug 1137539 part.1 Implement TSFStaticSink::IsGoogleJapaneseInputActive() r=emk (68d1f9a0ec)
- Bug 1137539 part.2 Implement TSFStaticSink::IsATOKActive() r=emk (51a4208bfa)
- Bug 1137539 part.3 Implement TSFStaticSink::IsFreeChangJieActive() r=emk (affbb81b96)
- Bug 1137539 part.4 Implement TSFStaticSink::IsEasyChangjeiActive() r=emk (abd3e674b6)
- Bug 1186014 Rename nsTextStore to mozilla::widget::TSFTextStore r=jimm+m_kato (ca63351f94)
- Bug 1187351 TSFTextStore should forget modified range at notifying TSF of layout change since GetTextExt() shouldn't return TS_E_NOLAYOUT after that r=emk (48878793e0)
-  Bg 1187367 TSFTextStore shouldn't destroy native caret for ATOK until notifying TSF of layout change r=emk (a2a4022d15)
- Bug 1187566 TSFTextStore::Content should compute mMinTextModified Offset only with the latest composition string and original composition string, and also the hack should be enabled on Win10 r=emk (1368885efe)
- Bug 1050644 part.1 Add methods to check whether the active TIP is Chinese TIP which deosn't show candidate window in e10s mode r=emk (1b783e682e)
- Bug 1050644 part.2 Hack ITextStoreACP::GetTextExt()'s offset for some Chinese TIPs of MS r=emk (c05cec10ce)
- Bug 1187579 Enable TSF in e10s mode r=m_kato (1ae106231a)
- Bug 555642 part.2 IME handlers on Windows shouldn't append caret range if the caret is in the target clause which doesn't have specific style r=m_kato (88bae2c8da)
- Bug 1196124 Fix mismatch of printf style string and following arguments of MOZ_LOG() in IMMHandler::GetCharacterRectOfSelectedTextAt() r=m_kato (0f6debd0d3)
- Bug 90712 Cancel composition when Enter key message isn't consumed by IME r=m_kato (0febdb1fd9)
- pointer style (6c984274cd)
- Bug 1177268 - implement aria-rowcount/index and aria-colcount/index, r=marcoz (92ac300374)
- Bug 1153135 - Return possibility PEN working while APZC is enabled. r=jimm (8bc77ff84f)
- Bug 1171073 - Suppress content scrolling issue on 64-bit platforms. r=kats (62db0dead3)
- Bug 1121946, Implement e10 cursor drag feedback on Windows, r=jmathies (6e8218d202)
- Bug 1144650 - Don't dispatch touch-based mouse events when APZ is handling touch. r=jimm (53ebea0d90)
- Bug 1163056 - InkCollector activation at first PEN event. r=jimm (b28e0ee58b)
- Bug 895274 part.3 Make the enum of event messages a named enum IGNORE IDL r=smaug (32e04a4e90)
- spacing (b9249221dc)
- Bug 1182966 - Part 3: Add some final annotations to DomainSet. r=mrbkap (3455822e89)
- Bug 1050122 - Part 1: Enable Nuwa on debug builds, and kill it if the preference is false. r=khuey (46685a7bf3)
- Bug 1146229: Remove calling convention modifier from local variable. r=surkov (e5f4b6e5d5)
- bug 1168932 - Implement ProxyCreated and ProxyDestroyed to update mozAccessibles r=tbsaunde (77a007fa21)
- Bug 1169701 - Fire native OS X accessibility events for proxied accessibles r=tbsaunde (c4847135a8)
- bug 1172523 - fire useful text change events for proxies r=lsock (85b7f995b8)
- remove spurious file (229c787360)
- bug 1171117 - Fix cairo to build on iOS. r=jrmuizel (45709c8fe3)
- Bug 963738 - Annotate XPCNativeMember, r=terrence (d1afdde52b)
- Bug 1148383 - Add testcase for previously fixed object metadata issue r=terrence (2c1b762cba)
- Bug 1149797 - Update browser jstests to treat ecma_6/extensions tests as 1.8, so that let is interpreted as a statement and not as an expression. r=bustage in a CLOSED TREE (ac6127d6bc)
- Bug 1150858 - Unwrap the correct object in ArrayBuffer.transfer (r=sfink) (cf67906802)
- Bug 1150380 - IonMonkey: MIPS: Fix JitRuntime::generateProfilerExitFrameTailStub. r=rankov (eeac49ddce)
- use RootedValue for POW as in 1135708 (34c1c3d191)
- Bug 1196648: IonMonkey - Don't run the lazy link stub for asmjs to jit fastpath, r=nbp (686d495371)
- Bug 1121947, Implement e10 cursor drag feedback on Mac, r=smaug (f48df2d1)
- and sync widget/TextEvents.h and TextRange.h with AF.
pull/8/head
roytam1 7 months ago
parent 88653c1804
commit b91a6a24cc
  1. 9
      accessible/atk/AccessibleWrap.cpp
  2. 2
      accessible/base/ARIAMap.cpp
  3. 28
      accessible/base/MarkupMap.h
  4. 5
      accessible/base/Platform.h
  5. 42
      accessible/base/Role.h
  6. 43
      accessible/base/RoleMap.h
  7. 21
      accessible/base/nsAccUtils.cpp
  8. 2
      accessible/base/nsAccUtils.h
  9. 38
      accessible/base/nsAccessibilityService.cpp
  10. 8
      accessible/base/nsCoreUtils.cpp
  11. 13
      accessible/base/nsCoreUtils.h
  12. 24
      accessible/generic/ARIAGridAccessible-inl.h
  13. 43
      accessible/generic/ARIAGridAccessible.cpp
  14. 26
      accessible/generic/ARIAGridAccessible.h
  15. 10
      accessible/generic/Accessible.cpp
  16. 2
      accessible/generic/Accessible.h
  17. 9
      accessible/generic/HyperTextAccessible.cpp
  18. 1
      accessible/generic/OuterDocAccessible.h
  19. 45
      accessible/html/HTMLTableAccessible.cpp
  20. 2
      accessible/html/HTMLTableAccessible.h
  21. 42
      accessible/interfaces/nsIAccessibleRole.idl
  22. 17
      accessible/ipc/DocAccessibleParent.cpp
  23. 5
      accessible/ipc/DocAccessibleParent.h
  24. 2
      accessible/ipc/PDocAccessible.ipdl
  25. 8
      accessible/mac/AccessibleWrap.h
  26. 136
      accessible/mac/AccessibleWrap.mm
  27. 44
      accessible/mac/Platform.mm
  28. 1
      accessible/mac/moz.build
  29. 9
      accessible/mac/mozAccessible.h
  30. 20
      accessible/mac/mozAccessible.mm
  31. 6
      accessible/other/Platform.cpp
  32. 11
      accessible/tests/mochitest/attributes/test_obj_group.html
  33. 12
      accessible/tests/mochitest/elm/test_HTMLSpec.html
  34. 26
      accessible/tests/mochitest/elm/test_MathMLSpec.html
  35. 5
      accessible/tests/mochitest/role.js
  36. 8
      accessible/tests/mochitest/role/test_aria.html
  37. 6
      accessible/tests/mochitest/role/test_general.html
  38. 29
      accessible/tests/mochitest/table.js
  39. 1
      accessible/tests/mochitest/table/a11y.ini
  40. 128
      accessible/tests/mochitest/table/test_mtable.html
  41. 3
      accessible/tests/mochitest/table/test_struct_ariatreegrid.html
  42. 2
      accessible/tests/mochitest/tree/test_aria_list.html
  43. 4
      accessible/tests/mochitest/tree/test_aria_presentation.html
  44. 6
      accessible/tests/mochitest/tree/test_dockids.html
  45. 2
      accessible/tests/mochitest/tree/test_formctrl.xul
  46. 2
      accessible/tests/mochitest/tree/test_invalid_img.xhtml
  47. 4
      accessible/tests/mochitest/tree/test_txtcntr.html
  48. 10
      accessible/tests/mochitest/treeupdate/test_textleaf.html
  49. 6
      accessible/windows/msaa/Platform.cpp
  50. 2
      accessible/xpcom/xpcAccessibleTable.cpp
  51. 2
      accessible/xul/XULFormControlAccessible.cpp
  52. 7
      b2g/app/B2GLoader.cpp
  53. 2
      b2g/app/b2g.js
  54. 3
      browser/components/shell/nsMacShellService.cpp
  55. 4
      caps/DomainPolicy.h
  56. 9
      dom/base/Element.cpp
  57. 2
      dom/base/FragmentOrElement.cpp
  58. 41
      dom/base/nsContentUtils.cpp
  59. 16
      dom/base/nsContentUtils.h
  60. 19
      dom/base/nsCopySupport.cpp
  61. 6
      dom/base/nsCopySupport.h
  62. 43
      dom/base/nsDOMWindowUtils.cpp
  63. 60
      dom/base/nsFocusManager.cpp
  64. 6
      dom/base/nsFocusManager.h
  65. 4
      dom/base/nsGkAtomList.h
  66. 14
      dom/base/nsGlobalWindow.cpp
  67. 5
      dom/base/nsGlobalWindow.h
  68. 8
      dom/base/nsGlobalWindowCommands.cpp
  69. 8
      dom/base/nsPIDOMWindow.h
  70. 6
      dom/base/nsScriptElement.cpp
  71. 2
      dom/events/AnimationEvent.cpp
  72. 3
      dom/events/BeforeAfterKeyboardEvent.cpp
  73. 2
      dom/events/ClipboardEvent.cpp
  74. 3
      dom/events/CompositionEvent.cpp
  75. 4
      dom/events/DataTransfer.cpp
  76. 3
      dom/events/DragEvent.cpp
  77. 22
      dom/events/Event.cpp
  78. 2
      dom/events/Event.h
  79. 136
      dom/events/EventListenerManager.cpp
  80. 54
      dom/events/EventListenerManager.h
  81. 71
      dom/events/EventStateManager.cpp
  82. 9
      dom/events/EventStateManager.h
  83. 2
      dom/events/IMEStateManager.cpp
  84. 4
      dom/events/InputEvent.cpp
  85. 2
      dom/events/InternalMutationEvent.h
  86. 7
      dom/events/KeyboardEvent.cpp
  87. 5
      dom/events/MouseEvent.cpp
  88. 4
      dom/events/MouseScrollEvent.cpp
  89. 2
      dom/events/MutationEvent.cpp
  90. 8
      dom/events/NotifyPaintEvent.cpp
  91. 8
      dom/events/NotifyPaintEvent.h
  92. 3
      dom/events/PointerEvent.cpp
  93. 3
      dom/events/SimpleGestureEvent.cpp
  94. 8
      dom/events/TextComposition.cpp
  95. 8
      dom/events/TextComposition.h
  96. 3
      dom/events/TouchEvent.cpp
  97. 2
      dom/events/TransitionEvent.cpp
  98. 2
      dom/events/UIEvent.cpp
  99. 3
      dom/events/WheelEvent.cpp
  100. 2
      dom/events/WheelHandlingHelper.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1426,6 +1426,15 @@ MaiAtkObject::FireStateChangeEvent(uint64_t aState, bool aEnabled)
}
}
void
a11y::ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
int32_t aStart, uint32_t aLen, bool aIsInsert,
bool aFromUser)
{
MaiAtkObject* atkObj = MAI_ATK_OBJECT(GetWrapperFor(aTarget));
atkObj->FireTextChangeEvent(aStr, aStart, aLen, aIsInsert, aFromUser);
}
#define OLD_TEXT_INSERTED "text_changed::insert"
#define OLD_TEXT_REMOVED "text_changed::delete"
static const char* oldTextChangeStrings[2][2] = {

@ -478,7 +478,7 @@ static nsRoleMapEntry sWAIRoleMaps[] =
},
{ // radiogroup
&nsGkAtoms::radiogroup,
roles::GROUPING,
roles::RADIO_GROUP,
kUseMapRole,
eNoValue,
eNoAction,

@ -103,6 +103,10 @@ MARKUPMAP(li,
New_HTMLListitem,
0)
MARKUPMAP(map,
nullptr,
roles::TEXT_CONTAINER)
MARKUPMAP(math,
New_HyperText,
roles::MATHML_MATH)
@ -205,22 +209,22 @@ MARKUPMAP(mmultiscripts_,
roles::MATHML_MULTISCRIPTS)
MARKUPMAP(mtable_,
New_HyperText,
New_HTMLTableAccessible,
roles::MATHML_TABLE,
AttrFromDOM(align, align),
AttrFromDOM(columnlines_, columnlines_),
AttrFromDOM(rowlines_, rowlines_))
MARKUPMAP(mlabeledtr_,
New_HyperText,
New_HTMLTableRowAccessible,
roles::MATHML_LABELED_ROW)
MARKUPMAP(mtr_,
New_HyperText,
New_HTMLTableRowAccessible,
roles::MATHML_TABLE_ROW)
MARKUPMAP(mtd_,
New_HyperText,
New_HTMLTableCellAccessible,
roles::MATHML_CELL)
MARKUPMAP(maction_,
@ -233,18 +237,6 @@ MARKUPMAP(merror_,
New_HyperText,
roles::MATHML_ERROR)
MARKUPMAP(semantics_,
New_HyperText,
roles::MATHML_SEMANTICS)
MARKUPMAP(annotation_,
New_HyperText,
roles::MATHML_ANNOTATION)
MARKUPMAP(annotation_xml_,
New_HyperText,
roles::MATHML_XML_ANNOTATION)
MARKUPMAP(mstack_,
New_HyperText,
roles::MATHML_STACK,
@ -304,6 +296,10 @@ MARKUPMAP(output,
roles::SECTION,
Attr(live, polite))
MARKUPMAP(p,
nullptr,
roles::PARAGRAPH)
MARKUPMAP(progress,
New_HTMLProgress,
0)

@ -6,6 +6,8 @@
#include <stdint.h>
class nsString;
namespace mozilla {
namespace a11y {
@ -70,6 +72,9 @@ void ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType);
void ProxyStateChangeEvent(ProxyAccessible* aTarget, uint64_t aState,
bool aEnabled);
void ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset);
void ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
int32_t aStart, uint32_t aLen, bool aIsInsert,
bool aFromUser);
} // namespace a11y
} // namespace mozilla

@ -926,57 +926,53 @@ enum Role {
*/
MATHML_ERROR = 157,
/**
* A MathML semantics annotation element (semantics in MathML).
*/
MATHML_SEMANTICS = 158,
/**
* A MathML annotation (annotation in MathML).
*/
MATHML_ANNOTATION = 159,
/**
* A MathML XML annotation (annotation-xml in MathML).
*/
MATHML_XML_ANNOTATION = 160,
/**
* A MathML stacked (rows of numbers) element (mstack in MathML).
*/
MATHML_STACK = 161,
MATHML_STACK = 158,
/**
* A MathML long division element (mlongdiv in MathML).
*/
MATHML_LONG_DIVISION = 162,
MATHML_LONG_DIVISION = 159,
/**
* A MathML stack group (msgroup in MathML).
*/
MATHML_STACK_GROUP = 163,
MATHML_STACK_GROUP = 160,
/**
* A MathML stack row (msrow in MathML).
*/
MATHML_STACK_ROW = 164,
MATHML_STACK_ROW = 161,
/**
* MathML carries, borrows, or crossouts for a row (mscarries in MathML).
*/
MATHML_STACK_CARRIES = 165,
MATHML_STACK_CARRIES = 162,
/**
* A MathML carry, borrow, or crossout for a column (mscarry in MathML).
*/
MATHML_STACK_CARRY = 166,
MATHML_STACK_CARRY = 163,
/**
* A MathML line in a stack (msline in MathML).
*/
MATHML_STACK_LINE = 167,
MATHML_STACK_LINE = 164,
/**
* A group containing radio buttons
*/
RADIO_GROUP = 165,
/**
* A text container exposing brief amount of information. See related
* TEXT_CONTAINER role.
*/
TEXT = 166,
LAST_ROLE = MATHML_STACK_LINE
LAST_ROLE = TEXT
};
} // namespace role

@ -754,7 +754,7 @@ ROLE(TERMINAL,
ROLE(TEXT_CONTAINER,
"text container",
ATK_ROLE_TEXT,
ATK_ROLE_SECTION,
NSAccessibilityGroupRole,
USE_ROLE_STRING,
IA2_ROLE_TEXT_FRAME,
@ -1280,30 +1280,6 @@ ROLE(MATHML_ERROR,
IA2_ROLE_UNKNOWN,
eNoNameRule)
ROLE(MATHML_SEMANTICS,
"mathml semantics",
ATK_ROLE_UNKNOWN,
NSAccessibilityUnknownRole,
0,
IA2_ROLE_UNKNOWN,
eNoNameRule)
ROLE(MATHML_ANNOTATION,
"mathml annotation",
ATK_ROLE_UNKNOWN,
NSAccessibilityUnknownRole,
0,
IA2_ROLE_UNKNOWN,
eNoNameRule)
ROLE(MATHML_XML_ANNOTATION,
"mathml xml annotation",
ATK_ROLE_UNKNOWN,
NSAccessibilityUnknownRole,
0,
IA2_ROLE_UNKNOWN,
eNoNameRule)
ROLE(MATHML_STACK,
"mathml stack",
ATK_ROLE_UNKNOWN,
@ -1359,3 +1335,20 @@ ROLE(MATHML_STACK_LINE,
0,
IA2_ROLE_UNKNOWN,
eNoNameRule)
ROLE(RADIO_GROUP,
"grouping",
ATK_ROLE_PANEL,
NSAccessibilityRadioGroupRole,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
eNoNameRule)
ROLE(TEXT,
"text",
ATK_ROLE_STATIC,
NSAccessibilityGroupRole,
USE_ROLE_STRING,
IA2_ROLE_TEXT_FRAME,
eNameFromSubtreeIfReqRule)

@ -242,6 +242,27 @@ nsAccUtils::IsARIASelected(Accessible* aAccessible)
nsGkAtoms::_true, eCaseMatters);
}
Accessible*
nsAccUtils::TableFor(Accessible* aRow)
{
if (aRow) {
Accessible* table = aRow->Parent();
if (table) {
roles::Role tableRole = table->Role();
if (tableRole == roles::GROUPING) { // if there's a rowgroup.
table = table->Parent();
if (table)
tableRole = table->Role();
}
return tableRole == roles::TABLE || tableRole == roles::TREE_TABLE ?
table : nullptr;
}
}
return nullptr;
}
HyperTextAccessible*
nsAccUtils::GetTextContainer(nsINode* aNode)
{

@ -134,6 +134,8 @@ public:
*/
static HyperTextAccessible* GetTextContainer(nsINode* aNode);
static Accessible* TableFor(Accessible* aRow);
/**
* Return true if the DOM node of given accessible has aria-selected="true"
* attribute.

@ -196,6 +196,18 @@ static Accessible* New_HTMLOutput(nsIContent* aContent, Accessible* aContext)
static Accessible* New_HTMLProgress(nsIContent* aContent, Accessible* aContext)
{ return new HTMLProgressMeterAccessible(aContent, aContext->Document()); }
static Accessible*
New_HTMLTableAccessible(nsIContent* aContent, Accessible* aContext)
{ return new HTMLTableAccessible(aContent, aContext->Document()); }
static Accessible*
New_HTMLTableRowAccessible(nsIContent* aContent, Accessible* aContext)
{ return new HTMLTableRowAccessible(aContent, aContext->Document()); }
static Accessible*
New_HTMLTableCellAccessible(nsIContent* aContent, Accessible* aContext)
{ return new HTMLTableCellAccessible(aContent, aContext->Document()); }
static Accessible*
New_HTMLTableHeaderCell(nsIContent* aContent, Accessible* aContext)
{
@ -1074,11 +1086,12 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
}
if (!newAcc && content->IsHTMLElement()) { // HTML accessibles
bool isARIATableOrCell = roleMapEntry &&
(roleMapEntry->accTypes & (eTableCell | eTable));
bool isARIATablePart = roleMapEntry &&
(roleMapEntry->accTypes & (eTableCell | eTableRow | eTable));
if (!isARIATableOrCell ||
if (!isARIATablePart ||
frame->AccessibleType() == eHTMLTableCellType ||
frame->AccessibleType() == eHTMLTableRowType ||
frame->AccessibleType() == eHTMLTableType) {
// Prefer to use markup to decide if and what kind of accessible to create,
const MarkupMapInfo* markupMap =
@ -1090,13 +1103,17 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
newAcc = CreateAccessibleByFrameType(frame, content, aContext);
}
// In case of ARIA grids use grid-specific classes if it's not native table
// based.
if (isARIATableOrCell && (!newAcc || newAcc->IsGenericHyperText())) {
// In case of ARIA grid or table use table-specific classes if it's not
// native table based.
if (isARIATablePart && (!newAcc || newAcc->IsGenericHyperText())) {
if ((roleMapEntry->accTypes & eTableCell)) {
if (aContext->IsTableRow())
newAcc = new ARIAGridCellAccessibleWrap(content, document);
} else if (roleMapEntry->IsOfType(eTableRow)) {
if (aContext->IsTable())
newAcc = new ARIARowAccessible(content, document);
} else if (roleMapEntry->IsOfType(eTable)) {
newAcc = new ARIAGridAccessibleWrap(content, document);
}
@ -1173,12 +1190,15 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
newAcc = markupMap->new_func(content, aContext);
// Fall back to text when encountering Content MathML.
if (!newAcc && !content->IsAnyOfMathMLElements(nsGkAtoms::mpadded_,
if (!newAcc && !content->IsAnyOfMathMLElements(nsGkAtoms::annotation_,
nsGkAtoms::annotation_xml_,
nsGkAtoms::mpadded_,
nsGkAtoms::mphantom_,
nsGkAtoms::maligngroup_,
nsGkAtoms::malignmark_,
nsGkAtoms::mspace_)) {
newAcc = new HyperTextAccessible(content, document);
nsGkAtoms::mspace_,
nsGkAtoms::semantics_)) {
newAcc = new HyperTextAccessible(content, document);
}
}
}

@ -118,11 +118,11 @@ nsCoreUtils::DispatchClickEvent(nsITreeBoxObject *aTreeBoxObj,
}
void
nsCoreUtils::DispatchMouseEvent(uint32_t aEventType, int32_t aX, int32_t aY,
nsCoreUtils::DispatchMouseEvent(EventMessage aMessage, int32_t aX, int32_t aY,
nsIContent *aContent, nsIFrame *aFrame,
nsIPresShell *aPresShell, nsIWidget *aRootWidget)
{
WidgetMouseEvent event(true, aEventType, aRootWidget,
WidgetMouseEvent event(true, aMessage, aRootWidget,
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
event.refPoint = LayoutDeviceIntPoint(aX, aY);
@ -137,14 +137,14 @@ nsCoreUtils::DispatchMouseEvent(uint32_t aEventType, int32_t aX, int32_t aY,
}
void
nsCoreUtils::DispatchTouchEvent(uint32_t aEventType, int32_t aX, int32_t aY,
nsCoreUtils::DispatchTouchEvent(EventMessage aMessage, int32_t aX, int32_t aY,
nsIContent* aContent, nsIFrame* aFrame,
nsIPresShell* aPresShell, nsIWidget* aRootWidget)
{
if (!dom::TouchEvent::PrefEnabled())
return;
WidgetTouchEvent event(true, aEventType, aRootWidget);
WidgetTouchEvent event(true, aMessage, aRootWidget);
event.time = PR_IntervalNow();

@ -6,6 +6,7 @@
#ifndef nsCoreUtils_h_
#define nsCoreUtils_h_
#include "mozilla/EventForwards.h"
#include "nsIContent.h"
#include "nsIDocument.h" // for GetShell()
#include "nsIPresShell.h"
@ -49,7 +50,7 @@ public:
/**
* Send mouse event to the given element.
*
* @param aEventType [in] an event type (see BasicEvents.h for constants)
* @param aMessage [in] an event message (see EventForwards.h)
* @param aX [in] x coordinate in dev pixels
* @param aY [in] y coordinate in dev pixels
* @param aContent [in] the element
@ -57,14 +58,15 @@ public:
* @param aPresShell [in] the presshell for the element
* @param aRootWidget [in] the root widget of the element
*/
static void DispatchMouseEvent(uint32_t aEventType, int32_t aX, int32_t aY,
static void DispatchMouseEvent(mozilla::EventMessage aMessage,
int32_t aX, int32_t aY,
nsIContent *aContent, nsIFrame *aFrame,
nsIPresShell *aPresShell, nsIWidget *aRootWidget);
/**
* Send a touch event with a single touch point to the given element.
*
* @param aEventType [in] an event type (see BasicEvents.h for constants)
* @param aMessage [in] an event message (see EventForwards.h)
* @param aX [in] x coordinate in dev pixels
* @param aY [in] y coordinate in dev pixels
* @param aContent [in] the element
@ -72,7 +74,8 @@ public:
* @param aPresShell [in] the presshell for the element
* @param aRootWidget [in] the root widget of the element
*/
static void DispatchTouchEvent(uint32_t aEventType, int32_t aX, int32_t aY,
static void DispatchTouchEvent(mozilla::EventMessage aMessage,
int32_t aX, int32_t aY,
nsIContent* aContent, nsIFrame* aFrame,
nsIPresShell* aPresShell, nsIWidget* aRootWidget);
@ -223,7 +226,7 @@ public:
* attribute or wrong value then false is returned.
*/
static bool GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr,
int32_t *aUInt);
int32_t* aUInt);
/**
* Returns language for the given node.

@ -10,35 +10,15 @@
#include "ARIAGridAccessible.h"
#include "AccIterator.h"
#include "nsAccUtils.h"
namespace mozilla {
namespace a11y {
inline Accessible*
ARIAGridCellAccessible::TableFor(Accessible* aRow) const
{
if (aRow) {
Accessible* table = aRow->Parent();
if (table) {
roles::Role tableRole = table->Role();
if (tableRole == roles::GROUPING) { // if there's a rowgroup.
table = table->Parent();
if (table)
tableRole = table->Role();
}
return tableRole == roles::TABLE || tableRole == roles::TREE_TABLE ?
table : nullptr;
}
}
return nullptr;
}
inline int32_t
ARIAGridCellAccessible::RowIndexFor(Accessible* aRow) const
{
Accessible* table = TableFor(aRow);
Accessible* table = nsAccUtils::TableFor(aRow);
if (table) {
int32_t rowIdx = 0;
Accessible* row = nullptr;

@ -485,6 +485,34 @@ ARIAGridAccessible::SetARIASelected(Accessible* aAccessible,
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// ARIARowAccessible
////////////////////////////////////////////////////////////////////////////////
ARIARowAccessible::
ARIARowAccessible(nsIContent* aContent, DocAccessible* aDoc) :
AccessibleWrap(aContent, aDoc)
{
mGenericTypes |= eTableRow;
}
NS_IMPL_ISUPPORTS_INHERITED0(ARIARowAccessible, Accessible)
GroupPos
ARIARowAccessible::GroupPosition()
{
int32_t count = 0, index = 0;
if (nsCoreUtils::GetUIntAttr(nsAccUtils::TableFor(this)->GetContent(),
nsGkAtoms::aria_rowcount, &count) &&
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_rowindex, &index)) {
return GroupPos(0, index, count);
}
return AccessibleWrap::GroupPosition();
}
////////////////////////////////////////////////////////////////////////////////
// ARIAGridCellAccessible
////////////////////////////////////////////////////////////////////////////////
@ -508,7 +536,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(ARIAGridCellAccessible, HyperTextAccessible)
TableAccessible*
ARIAGridCellAccessible::Table() const
{
Accessible* table = TableFor(Row());
Accessible* table = nsAccUtils::TableFor(Row());
return table ? table->AsTable() : nullptr;
}
@ -613,3 +641,16 @@ ARIAGridCellAccessible::NativeAttributes()
return attributes.forget();
}
GroupPos
ARIAGridCellAccessible::GroupPosition()
{
int32_t count = 0, index = 0;
if (nsCoreUtils::GetUIntAttr(Table()->AsAccessible()->GetContent(),
nsGkAtoms::aria_colcount, &count) &&
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_colindex, &index)) {
return GroupPos(0, index, count);
}
return GroupPos();
}

@ -73,6 +73,24 @@ protected:
};
/**
* Accessible for ARIA row.
*/
class ARIARowAccessible : public AccessibleWrap
{
public:
ARIARowAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
// Accessible
virtual mozilla::a11y::GroupPos GroupPosition() override;
protected:
virtual ~ARIARowAccessible() {}
};
/**
* Accessible for ARIA gridcell and rowheader/columnheader.
*/
@ -88,6 +106,7 @@ public:
virtual TableCellAccessible* AsTableCell() override { return this; }
virtual void ApplyARIAState(uint64_t* aState) const override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
virtual mozilla::a11y::GroupPos GroupPosition() override;
protected:
virtual ~ARIAGridCellAccessible() {}
@ -98,14 +117,9 @@ protected:
Accessible* Row() const
{
Accessible* row = Parent();
return row && row->Role() == roles::ROW ? row : nullptr;
return row && row->IsTableRow() ? row : nullptr;
}
/**
* Return a table for the given row.
*/
Accessible* TableFor(Accessible* aRow) const;
/**
* Return index of the given row.
*/

@ -864,6 +864,16 @@ Accessible::HandleAccEvent(AccEvent* aEvent)
ipcDoc->SendEvent(id, event->GetCaretOffset());
break;
}
case nsIAccessibleEvent::EVENT_TEXT_INSERTED:
case nsIAccessibleEvent::EVENT_TEXT_REMOVED: {
AccTextChangeEvent* event = downcast_accEvent(aEvent);
ipcDoc->SendTextChangeEvent(id, event->ModifiedText(),
event->GetStartOffset(),
event->GetLength(),
event->IsTextInserted(),
event->IsFromUserInput());
break;
}
default:
ipcDoc->SendEvent(id, aEvent->GetEventType());
}

@ -82,6 +82,8 @@ enum ENameValueFlag {
struct GroupPos
{
GroupPos() : level(0), posInSet(0), setSize(0) { }
GroupPos(int32_t aLevel, int32_t aPosInSet, int32_t aSetSize) :
level(aLevel), posInSet(aPosInSet), setSize(aSetSize) { }
int32_t level;
int32_t posInSet;

@ -63,12 +63,11 @@ HyperTextAccessible::NativeRole()
if (r != roles::NOTHING)
return r;
// Treat block frames as paragraphs
nsIFrame *frame = GetFrame();
if (frame && frame->GetType() == nsGkAtoms::blockFrame)
return roles::PARAGRAPH;
nsIFrame* frame = GetFrame();
if (frame && frame->GetType() == nsGkAtoms::inlineFrame)
return roles::TEXT;
return roles::TEXT_CONTAINER; // In ATK this works
return roles::TEXT_CONTAINER;
}
uint64_t

@ -52,6 +52,7 @@ Accessible::AsOuterDoc()
{
return IsOuterDoc() ? static_cast<OuterDocAccessible*>(this) : nullptr;
}
} // namespace a11y
} // namespace mozilla

@ -60,6 +60,9 @@ NS_IMPL_ISUPPORTS_INHERITED0(HTMLTableCellAccessible, HyperTextAccessible)
role
HTMLTableCellAccessible::NativeRole()
{
if (mContent->IsMathMLElement(nsGkAtoms::mtd_)) {
return roles::MATHML_CELL;
}
return roles::CELL;
}
@ -140,6 +143,19 @@ HTMLTableCellAccessible::NativeAttributes()
return attributes.forget();
}
GroupPos
HTMLTableCellAccessible::GroupPosition()
{
int32_t count = 0, index = 0;
if (nsCoreUtils::GetUIntAttr(Table()->AsAccessible()->GetContent(),
nsGkAtoms::aria_colcount, &count) &&
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_colindex, &index)) {
return GroupPos(0, index, count);
}
return HyperTextAccessibleWrap::GroupPosition();
}
////////////////////////////////////////////////////////////////////////////////
// HTMLTableCellAccessible: TableCellAccessible implementation
@ -148,8 +164,7 @@ HTMLTableCellAccessible::Table() const
{
Accessible* parent = const_cast<HTMLTableCellAccessible*>(this);
while ((parent = parent->Parent())) {
roles::Role role = parent->Role();
if (role == roles::TABLE || role == roles::TREE_TABLE)
if (parent->IsTable())
return parent->AsTable();
}
@ -349,9 +364,27 @@ NS_IMPL_ISUPPORTS_INHERITED0(HTMLTableRowAccessible, Accessible)
role
HTMLTableRowAccessible::NativeRole()
{
if (mContent->IsMathMLElement(nsGkAtoms::mtr_)) {
return roles::MATHML_TABLE_ROW;
} else if (mContent->IsMathMLElement(nsGkAtoms::mlabeledtr_)) {
return roles::MATHML_LABELED_ROW;
}
return roles::ROW;
}
GroupPos
HTMLTableRowAccessible::GroupPosition()
{
int32_t count = 0, index = 0;
if (nsCoreUtils::GetUIntAttr(nsAccUtils::TableFor(this)->GetContent(),
nsGkAtoms::aria_rowcount, &count) &&
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_rowindex, &index)) {
return GroupPos(0, index, count);
}
return AccessibleWrap::GroupPosition();
}
////////////////////////////////////////////////////////////////////////////////
// HTMLTableAccessible
////////////////////////////////////////////////////////////////////////////////
@ -384,6 +417,9 @@ HTMLTableAccessible::CacheChildren()
role
HTMLTableAccessible::NativeRole()
{
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) {
return roles::MATHML_TABLE;
}
return roles::TABLE;
}
@ -421,6 +457,11 @@ HTMLTableAccessible::NativeAttributes()
{
nsCOMPtr<nsIPersistentProperties> attributes =
AccessibleWrap::NativeAttributes();
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) {
GetAccService()->MarkupAttributes(mContent, attributes);
}
if (IsProbablyLayoutTable()) {
nsAutoString unused;
attributes->SetStringProperty(NS_LITERAL_CSTRING("layout-guess"),

@ -33,6 +33,7 @@ public:
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
virtual mozilla::a11y::GroupPos GroupPosition() override;
// TableCellAccessible
virtual TableAccessible* Table() const override;
@ -89,6 +90,7 @@ public:
// Accessible
virtual a11y::role NativeRole() override;
virtual mozilla::a11y::GroupPos GroupPosition() override;
protected:
virtual ~HTMLTableRowAccessible() { }

@ -8,7 +8,7 @@
/**
* Defines cross platform (Gecko) roles.
*/
[scriptable, uuid(55581ec3-ba6e-4805-8108-260ed34cdcbb)]
[scriptable, uuid(da0c7824-147c-11e5-917c-60a44c717042)]
interface nsIAccessibleRole : nsISupports
{
/**
@ -920,53 +920,49 @@ interface nsIAccessibleRole : nsISupports
*/
const unsigned long ROLE_MATHML_ERROR = 157;
/**
* A MathML semantics annotation element (semantics in MathML).
*/
const unsigned long ROLE_MATHML_SEMANTICS = 158;
/**
* A MathML annotation (annotation in MathML).
*/
const unsigned long ROLE_MATHML_ANNOTATION = 159;
/**
* A MathML XML annotation (annotation-xml in MathML).
*/
const unsigned long ROLE_MATHML_XML_ANNOTATION = 160;
/**
* A MathML stacked (rows of numbers) element (mstack in MathML).
*/
const unsigned long ROLE_MATHML_STACK = 161;
const unsigned long ROLE_MATHML_STACK = 158;
/**
* A MathML long division element (mlongdiv in MathML).
*/
const unsigned long ROLE_MATHML_LONG_DIVISION = 162;
const unsigned long ROLE_MATHML_LONG_DIVISION = 159;
/**
* A MathML stack group (msgroup in MathML).
*/
const unsigned long ROLE_MATHML_STACK_GROUP = 163;
const unsigned long ROLE_MATHML_STACK_GROUP = 160;
/**
* A MathML stack row (msrow in MathML).
*/
const unsigned long ROLE_MATHML_STACK_ROW = 164;
const unsigned long ROLE_MATHML_STACK_ROW = 161;
/**
* MathML carries, borrows, or crossouts for a row (mscarries in MathML).
*/
const unsigned long ROLE_MATHML_STACK_CARRIES = 165;
const unsigned long ROLE_MATHML_STACK_CARRIES = 162;
/**
* A MathML carry, borrow, or crossout for a column (mscarry in MathML).
*/
const unsigned long ROLE_MATHML_STACK_CARRY = 166;
const unsigned long ROLE_MATHML_STACK_CARRY = 163;
/**
* A MathML line in a stack (msline in MathML).
*/
const unsigned long ROLE_MATHML_STACK_LINE = 167;
const unsigned long ROLE_MATHML_STACK_LINE = 164;
/**
* A group containing radio buttons
*/
const unsigned long ROLE_RADIO_GROUP = 165;
/**
* A text container exposing brief amount of information. See related
* TEXT_CONTAINER role.
*/
const unsigned long ROLE_TEXT = 166;
};

@ -165,6 +165,23 @@ DocAccessibleParent::RecvCaretMoveEvent(const uint64_t& aID, const int32_t& aOff
return true;
}
bool
DocAccessibleParent::RecvTextChangeEvent(const uint64_t& aID,
const nsString& aStr,
const int32_t& aStart,
const uint32_t& aLen,
const bool& aIsInsert,
const bool& aFromUser)
{
ProxyAccessible* target = GetAccessible(aID);
if (!target)
return false;
ProxyTextChangeEvent(target, aStr, aStart, aLen, aIsInsert, aFromUser);
return true;
}
bool
DocAccessibleParent::RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uint64_t& aID)
{

@ -55,6 +55,11 @@ public:
virtual bool RecvCaretMoveEvent(const uint64_t& aID, const int32_t& aOffset)
override final;
virtual bool RecvTextChangeEvent(const uint64_t& aID, const nsString& aStr,
const int32_t& aStart, const uint32_t& aLen,
const bool& aIsInsert,
const bool& aFromUser) override;
virtual bool RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uint64_t& aID) override;
void Unbind()
{

@ -59,6 +59,8 @@ parent:
HideEvent(uint64_t aRootID);
StateChangeEvent(uint64_t aID, uint64_t aState, bool aEnabled);
CaretMoveEvent(uint64_t aID, int32_t aOffset);
TextChangeEvent(uint64_t aID, nsString aStr, int32_t aStart, uint32_t aLen,
bool aIsInsert, bool aFromUser);
/*
* Tell the parent document to bind the existing document as a new child

@ -108,6 +108,14 @@ private:
bool mNativeInited;
};
#if defined(__OBJC__)
void FireNativeEvent(mozAccessible* aNativeAcc, uint32_t aEventType);
#else
void FireNativeEvent(id aNativeAcc, uint32_t aEventType);
#endif
Class GetTypeFromRole(roles::Role aRole);
} // namespace a11y
} // namespace mozilla

@ -15,6 +15,7 @@
#import "mozHTMLAccessible.h"
#import "mozTextAccessible.h"
using namespace mozilla;
using namespace mozilla::a11y;
AccessibleWrap::
@ -33,8 +34,10 @@ AccessibleWrap::GetNativeObject()
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
if (!mNativeInited && !mNativeObject && !IsDefunct() && !AncestorIsFlat())
mNativeObject = [[GetNativeType() alloc] initWithAccessible:this];
if (!mNativeInited && !mNativeObject && !IsDefunct() && !AncestorIsFlat()) {
uintptr_t accWrap = reinterpret_cast<uintptr_t>(this);
mNativeObject = [[GetNativeType() alloc] initWithAccessible:accWrap];
}
mNativeInited = true;
@ -59,51 +62,7 @@ AccessibleWrap::GetNativeType ()
if (IsXULTabpanels())
return [mozPaneAccessible class];
roles::Role role = Role();
switch (role) {
case roles::PUSHBUTTON:
case roles::SPLITBUTTON:
case roles::TOGGLE_BUTTON:
{
// if this button may show a popup, let's make it of the popupbutton type.
return HasPopup() ? [mozPopupButtonAccessible class] :
[mozButtonAccessible class];
}
case roles::PAGETAB:
return [mozButtonAccessible class];
case roles::CHECKBUTTON:
return [mozCheckboxAccessible class];
case roles::HEADING:
return [mozHeadingAccessible class];
case roles::PAGETABLIST:
return [mozTabsAccessible class];
case roles::ENTRY:
case roles::STATICTEXT:
case roles::CAPTION:
case roles::ACCEL_LABEL:
case roles::PASSWORD_TEXT:
// normal textfield (static or editable)
return [mozTextAccessible class];
case roles::TEXT_LEAF:
return [mozTextLeafAccessible class];
case roles::LINK:
return [mozLinkAccessible class];
case roles::COMBOBOX:
return [mozPopupButtonAccessible class];
default:
return [mozAccessible class];
}
return nil;
return GetTypeFromRole(Role());
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
}
@ -153,18 +112,7 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
if (!nativeAcc)
return NS_ERROR_FAILURE;
switch (eventType) {
case nsIAccessibleEvent::EVENT_FOCUS:
[nativeAcc didReceiveFocus];
break;
case nsIAccessibleEvent::EVENT_VALUE_CHANGE:
[nativeAcc valueDidChange];
break;
case nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED:
case nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED:
[nativeAcc selectedTextDidChange];
break;
}
FireNativeEvent(nativeAcc, eventType);
return NS_OK;
@ -274,3 +222,73 @@ AccessibleWrap::AncestorIsFlat()
// no parent was flat
return false;
}
void
a11y::FireNativeEvent(mozAccessible* aNativeAcc, uint32_t aEventType)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
switch (aEventType) {
case nsIAccessibleEvent::EVENT_FOCUS:
[aNativeAcc didReceiveFocus];
break;
case nsIAccessibleEvent::EVENT_VALUE_CHANGE:
[aNativeAcc valueDidChange];
break;
case nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED:
case nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED:
[aNativeAcc selectedTextDidChange];
break;
}
NS_OBJC_END_TRY_ABORT_BLOCK;
}
Class
a11y::GetTypeFromRole(roles::Role aRole)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
switch (aRole) {
case roles::COMBOBOX:
case roles::PUSHBUTTON:
case roles::SPLITBUTTON:
case roles::TOGGLE_BUTTON:
{
return [mozButtonAccessible class];
}
case roles::PAGETAB:
return [mozButtonAccessible class];
case roles::CHECKBUTTON:
return [mozCheckboxAccessible class];
case roles::HEADING:
return [mozHeadingAccessible class];
case roles::PAGETABLIST:
return [mozTabsAccessible class];
case roles::ENTRY:
case roles::STATICTEXT:
case roles::CAPTION:
case roles::ACCEL_LABEL:
case roles::PASSWORD_TEXT:
// normal textfield (static or editable)
return [mozTextAccessible class];
case roles::TEXT_LEAF:
return [mozTextLeafAccessible class];
case roles::LINK:
return [mozLinkAccessible class];
default:
return [mozAccessible class];
}
return nil;
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
}

@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "Platform.h"
#include "ProxyAccessible.h"
#include "nsAppShell.h"
@ -34,31 +35,64 @@ PlatformShutdown()
}
void
ProxyCreated(ProxyAccessible*, uint32_t)
ProxyCreated(ProxyAccessible* aProxy, uint32_t)
{
// Pass in dummy state for now as retrieving proxy state requires IPC.
Class type = GetTypeFromRole(aProxy->Role());
uintptr_t accWrap = reinterpret_cast<uintptr_t>(aProxy) | IS_PROXY;
mozAccessible* mozWrapper = [[type alloc] initWithAccessible:accWrap];
aProxy->SetWrapper(reinterpret_cast<uintptr_t>(mozWrapper));
}
void
ProxyDestroyed(ProxyAccessible*)
ProxyDestroyed(ProxyAccessible* aProxy)
{
mozAccessible* wrapper =
reinterpret_cast<mozAccessible*>(aProxy->GetWrapper());
[wrapper expire];
[wrapper release];
aProxy->SetWrapper(0);
}
void
ProxyEvent(ProxyAccessible*, uint32_t)
ProxyEvent(ProxyAccessible* aProxy, uint32_t aEventType)
{
// ignore everything but focus-changed, value-changed, caret and selection
// events for now.
if (aEventType != nsIAccessibleEvent::EVENT_FOCUS &&
aEventType != nsIAccessibleEvent::EVENT_VALUE_CHANGE &&
aEventType != nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED &&
aEventType != nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED)
return;
mozAccessible* wrapper =
reinterpret_cast<mozAccessible*>(aProxy->GetWrapper());
if (wrapper)
FireNativeEvent(wrapper, aEventType);
}
void
ProxyStateChangeEvent(ProxyAccessible*, uint64_t, bool)
ProxyStateChangeEvent(ProxyAccessible* aProxy, uint64_t, bool)
{
// mac doesn't care about state change events
}
void
ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset)
{
mozAccessible* wrapper =
reinterpret_cast<mozAccessible*>(aTarget->GetWrapper());
if (wrapper)
[wrapper selectedTextDidChange];
}
void
ProxyTextChangeEvent(ProxyAccessible*, const nsString&, int32_t, uint32_t,
bool, bool)
{
}
}
} // namespace a11y
} // namespace mozilla
@interface GeckoNSApplication(a11y)
-(void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute;

@ -30,6 +30,7 @@ LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',
'/accessible/html',
'/accessible/ipc',
'/accessible/xul',
'/layout/generic',
'/layout/xul',

@ -57,11 +57,14 @@ static const uintptr_t IS_PROXY = 1;
mozilla::a11y::role mRole;
}
// return the Accessible for this mozAccessible.
- (mozilla::a11y::AccessibleWrap*) getGeckoAccessible;
// return the Accessible for this mozAccessible if it exists.
- (mozilla::a11y::AccessibleWrap*)getGeckoAccessible;
// return the ProxyAccessible for this mozAccessible if it exists.
- (mozilla::a11y::ProxyAccessible*)getProxyAccessible;
// inits with the gecko owner.
- (id)initWithAccessible:(mozilla::a11y::AccessibleWrap*)geckoParent;
- (id)initWithAccessible:(uintptr_t)aGeckoObj;
// our accessible parent (AXParent)
- (id <mozAccessible>)parent;

@ -99,15 +99,18 @@ ConvertToNSArray(nsTArray<Accessible*>& aArray)
@implementation mozAccessible
- (id)initWithAccessible:(AccessibleWrap*)geckoAccessible
- (id)initWithAccessible:(uintptr_t)aGeckoAccessible
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;