mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 920738 - don't unbind accessibles in XULTextFieldAccessible::CacheChildren() r=surkov
This commit is contained in:
parent
2a773817b4
commit
522186108b
@ -768,6 +768,15 @@ XULTextFieldAccessible::CanHaveAnonChildren()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
XULTextFieldAccessible::IsAcceptableChild(Accessible* aPossibleChild) const
|
||||
{
|
||||
// XXX: entry shouldn't contain anything but text leafs. Currently it may
|
||||
// contain a trailing fake HTML br element added for layout needs. We don't
|
||||
// need to expose it since it'd be confusing for AT.
|
||||
return aPossibleChild->IsTextLeaf();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIEditor>
|
||||
XULTextFieldAccessible::GetEditor() const
|
||||
{
|
||||
@ -794,17 +803,9 @@ XULTextFieldAccessible::CacheChildren()
|
||||
if (!inputContent)
|
||||
return;
|
||||
|
||||
// XXX: entry shouldn't contain anything but text leafs. Currently it may
|
||||
// contain a trailing fake HTML br element added for layout needs. We don't
|
||||
// need to expose it since it'd be confusing for AT.
|
||||
TreeWalker walker(this, inputContent);
|
||||
Accessible* child = nullptr;
|
||||
while ((child = walker.NextChild())) {
|
||||
if (child->IsTextLeaf())
|
||||
AppendChild(child);
|
||||
else
|
||||
Document()->UnbindFromDocument(child);
|
||||
}
|
||||
while (Accessible* child = walker.NextChild())
|
||||
AppendChild(child);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -240,6 +240,7 @@ public:
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
virtual uint64_t NativeState();
|
||||
virtual bool CanHaveAnonChildren();
|
||||
virtual bool IsAcceptableChild(Accessible* aPossibleChild) const MOZ_OVERRIDE;
|
||||
|
||||
// ActionAccessible
|
||||
virtual uint8_t ActionCount();
|
||||
|
Loading…
Reference in New Issue
Block a user