mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1179483 - Fix crash in mozilla::a11y::HyperTextAccessible::RelationByType. r=MarcoZ
This commit is contained in:
parent
abd9bd59d8
commit
f08a1dde40
@ -1762,11 +1762,12 @@ HyperTextAccessible::RelationByType(RelationType aType)
|
||||
|
||||
switch (aType) {
|
||||
case RelationType::NODE_CHILD_OF:
|
||||
if (mContent->IsMathMLElement()) {
|
||||
if (HasOwnContent() && mContent->IsMathMLElement()) {
|
||||
Accessible* parent = Parent();
|
||||
if (parent) {
|
||||
nsIContent* parentContent = parent->GetContent();
|
||||
if (parentContent->IsMathMLElement(nsGkAtoms::mroot_)) {
|
||||
if (parentContent &&
|
||||
parentContent->IsMathMLElement(nsGkAtoms::mroot_)) {
|
||||
// Add a relation pointing to the parent <mroot>.
|
||||
rel.AppendTarget(parent);
|
||||
}
|
||||
@ -1774,7 +1775,7 @@ HyperTextAccessible::RelationByType(RelationType aType)
|
||||
}
|
||||
break;
|
||||
case RelationType::NODE_PARENT_OF:
|
||||
if (mContent->IsMathMLElement(nsGkAtoms::mroot_)) {
|
||||
if (HasOwnContent() && mContent->IsMathMLElement(nsGkAtoms::mroot_)) {
|
||||
Accessible* base = GetChildAt(0);
|
||||
Accessible* index = GetChildAt(1);
|
||||
if (base && index) {
|
||||
|
Loading…
Reference in New Issue
Block a user