mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1175164 - Do not expose MathML semantics element in the accessibility tree. r=surkov
This commit is contained in:
parent
7815fe3f89
commit
3b2ca0dbb5
@ -237,18 +237,6 @@ MARKUPMAP(merror_,
|
|||||||
New_HyperText,
|
New_HyperText,
|
||||||
roles::MATHML_ERROR)
|
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_,
|
MARKUPMAP(mstack_,
|
||||||
New_HyperText,
|
New_HyperText,
|
||||||
roles::MATHML_STACK,
|
roles::MATHML_STACK,
|
||||||
|
@ -926,66 +926,51 @@ enum Role {
|
|||||||
*/
|
*/
|
||||||
MATHML_ERROR = 157,
|
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).
|
* A MathML stacked (rows of numbers) element (mstack in MathML).
|
||||||
*/
|
*/
|
||||||
MATHML_STACK = 161,
|
MATHML_STACK = 158,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A MathML long division element (mlongdiv in MathML).
|
* A MathML long division element (mlongdiv in MathML).
|
||||||
*/
|
*/
|
||||||
MATHML_LONG_DIVISION = 162,
|
MATHML_LONG_DIVISION = 159,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A MathML stack group (msgroup in MathML).
|
* A MathML stack group (msgroup in MathML).
|
||||||
*/
|
*/
|
||||||
MATHML_STACK_GROUP = 163,
|
MATHML_STACK_GROUP = 160,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A MathML stack row (msrow in MathML).
|
* 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 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).
|
* 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).
|
* A MathML line in a stack (msline in MathML).
|
||||||
*/
|
*/
|
||||||
MATHML_STACK_LINE = 167,
|
MATHML_STACK_LINE = 164,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A group containing radio buttons
|
* A group containing radio buttons
|
||||||
*/
|
*/
|
||||||
RADIO_GROUP = 168,
|
RADIO_GROUP = 165,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A text container exposing brief amount of information. See related
|
* A text container exposing brief amount of information. See related
|
||||||
* TEXT_CONTAINER role.
|
* TEXT_CONTAINER role.
|
||||||
*/
|
*/
|
||||||
TEXT = 169,
|
TEXT = 166,
|
||||||
|
|
||||||
LAST_ROLE = TEXT
|
LAST_ROLE = TEXT
|
||||||
};
|
};
|
||||||
|
@ -1280,30 +1280,6 @@ ROLE(MATHML_ERROR,
|
|||||||
IA2_ROLE_UNKNOWN,
|
IA2_ROLE_UNKNOWN,
|
||||||
eNoNameRule)
|
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,
|
ROLE(MATHML_STACK,
|
||||||
"mathml stack",
|
"mathml stack",
|
||||||
ATK_ROLE_UNKNOWN,
|
ATK_ROLE_UNKNOWN,
|
||||||
|
@ -1191,12 +1191,15 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||||||
newAcc = markupMap->new_func(content, aContext);
|
newAcc = markupMap->new_func(content, aContext);
|
||||||
|
|
||||||
// Fall back to text when encountering Content MathML.
|
// 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::mphantom_,
|
||||||
nsGkAtoms::maligngroup_,
|
nsGkAtoms::maligngroup_,
|
||||||
nsGkAtoms::malignmark_,
|
nsGkAtoms::malignmark_,
|
||||||
nsGkAtoms::mspace_)) {
|
nsGkAtoms::mspace_,
|
||||||
newAcc = new HyperTextAccessible(content, document);
|
nsGkAtoms::semantics_)) {
|
||||||
|
newAcc = new HyperTextAccessible(content, document);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/**
|
/**
|
||||||
* Defines cross platform (Gecko) roles.
|
* Defines cross platform (Gecko) roles.
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(94add87a-190c-443e-9549-d11131affb2a)]
|
[scriptable, uuid(da0c7824-147c-11e5-917c-60a44c717042)]
|
||||||
interface nsIAccessibleRole : nsISupports
|
interface nsIAccessibleRole : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -920,64 +920,49 @@ interface nsIAccessibleRole : nsISupports
|
|||||||
*/
|
*/
|
||||||
const unsigned long ROLE_MATHML_ERROR = 157;
|
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).
|
* 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).
|
* 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).
|
* 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).
|
* 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).
|
* 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).
|
* 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).
|
* 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
|
* A group containing radio buttons
|
||||||
*/
|
*/
|
||||||
const unsigned long ROLE_RADIO_GROUP = 168;
|
const unsigned long ROLE_RADIO_GROUP = 165;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A text container exposing brief amount of information. See related
|
* A text container exposing brief amount of information. See related
|
||||||
* TEXT_CONTAINER role.
|
* TEXT_CONTAINER role.
|
||||||
*/
|
*/
|
||||||
const unsigned long ROLE_TEXT = 169;
|
const unsigned long ROLE_TEXT = 166;
|
||||||
};
|
};
|
||||||
|
@ -267,28 +267,10 @@
|
|||||||
testElm("merror", obj);
|
testElm("merror", obj);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// semantics
|
// semantics, annotation, annotation-xml
|
||||||
|
ok(!isAccessible("semantics"), "semantics should not have accessible");
|
||||||
obj = {
|
ok(!isAccessible("annotation"), "annotation should not have accessible");
|
||||||
role: ROLE_MATHML_SEMANTICS,
|
ok(!isAccessible("annotation-xml"), "annotation-xml should not have accessible");
|
||||||
};
|
|
||||||
testElm("semantics", obj);
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
// annotation
|
|
||||||
|
|
||||||
obj = {
|
|
||||||
role: ROLE_MATHML_ANNOTATION,
|
|
||||||
};
|
|
||||||
testElm("annotation", obj);
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
// annotation-xml
|
|
||||||
|
|
||||||
obj = {
|
|
||||||
role: ROLE_MATHML_XML_ANNOTATION,
|
|
||||||
};
|
|
||||||
testElm("annotation-xml", obj);
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// mstack
|
// mstack
|
||||||
|
@ -68,9 +68,6 @@ const ROLE_MATHML_TABLE_ROW = nsIAccessibleRole.ROLE_MATHML_TABLE_ROW;
|
|||||||
const ROLE_MATHML_CELL = nsIAccessibleRole.ROLE_MATHML_CELL;
|
const ROLE_MATHML_CELL = nsIAccessibleRole.ROLE_MATHML_CELL;
|
||||||
const ROLE_MATHML_ACTION = nsIAccessibleRole.ROLE_MATHML_ACTION;
|
const ROLE_MATHML_ACTION = nsIAccessibleRole.ROLE_MATHML_ACTION;
|
||||||
const ROLE_MATHML_ERROR = nsIAccessibleRole.ROLE_MATHML_ERROR;
|
const ROLE_MATHML_ERROR = nsIAccessibleRole.ROLE_MATHML_ERROR;
|
||||||
const ROLE_MATHML_SEMANTICS = nsIAccessibleRole.ROLE_MATHML_SEMANTICS;
|
|
||||||
const ROLE_MATHML_ANNOTATION = nsIAccessibleRole.ROLE_MATHML_ANNOTATION;
|
|
||||||
const ROLE_MATHML_XML_ANNOTATION = nsIAccessibleRole.ROLE_MATHML_XML_ANNOTATION;
|
|
||||||
const ROLE_MATHML_STACK = nsIAccessibleRole.ROLE_MATHML_STACK;
|
const ROLE_MATHML_STACK = nsIAccessibleRole.ROLE_MATHML_STACK;
|
||||||
const ROLE_MATHML_LONG_DIVISION = nsIAccessibleRole.ROLE_MATHML_LONG_DIVISION;
|
const ROLE_MATHML_LONG_DIVISION = nsIAccessibleRole.ROLE_MATHML_LONG_DIVISION;
|
||||||
const ROLE_MATHML_STACK_GROUP = nsIAccessibleRole.ROLE_MATHML_STACK_GROUP;
|
const ROLE_MATHML_STACK_GROUP = nsIAccessibleRole.ROLE_MATHML_STACK_GROUP;
|
||||||
|
Loading…
Reference in New Issue
Block a user