mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 450089 – parent children aren't invalidated if not accessible element is shown, r=ginn.chen
This commit is contained in:
parent
ac68a446f8
commit
056f2b8686
@ -1597,16 +1597,25 @@ NS_IMETHODIMP nsDocAccessible::FlushPendingEvents()
|
||||
|
||||
if (eventType == nsIAccessibleEvent::EVENT_DOM_CREATE ||
|
||||
eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
|
||||
|
||||
nsCOMPtr<nsIAccessible> containerAccessible;
|
||||
if (accessible)
|
||||
accessible->GetParent(getter_AddRefs(containerAccessible));
|
||||
|
||||
if (!containerAccessible) {
|
||||
GetAccessibleInParentChain(domNode, PR_TRUE,
|
||||
getter_AddRefs(containerAccessible));
|
||||
if (!containerAccessible)
|
||||
containerAccessible = this;
|
||||
}
|
||||
|
||||
if (eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
|
||||
if (accessible) {
|
||||
// For asynch show, delayed invalidatation of parent's children
|
||||
accessible->GetParent(getter_AddRefs(containerAccessible));
|
||||
nsCOMPtr<nsPIAccessible> privateContainerAccessible =
|
||||
do_QueryInterface(containerAccessible);
|
||||
if (privateContainerAccessible)
|
||||
privateContainerAccessible->InvalidateChildren();
|
||||
}
|
||||
// For asynch show, delayed invalidatation of parent's children
|
||||
nsCOMPtr<nsPIAccessible> privateContainerAccessible =
|
||||
do_QueryInterface(containerAccessible);
|
||||
if (privateContainerAccessible)
|
||||
privateContainerAccessible->InvalidateChildren();
|
||||
|
||||
// Some show events in the subtree may have been removed to
|
||||
// avoid firing redundant events. But, we still need to make sure any
|
||||
// accessibles parenting those shown nodes lose their child references.
|
||||
@ -1619,13 +1628,6 @@ NS_IMETHODIMP nsDocAccessible::FlushPendingEvents()
|
||||
// wait to fire this here, instead of in InvalidateCacheSubtree(), where we wouldn't be able to calculate
|
||||
// the offset, length and text for the text change.
|
||||
if (domNode && domNode != mDOMNode) {
|
||||
if (!containerAccessible) {
|
||||
GetAccessibleInParentChain(domNode, PR_TRUE,
|
||||
getter_AddRefs(containerAccessible));
|
||||
if (!containerAccessible)
|
||||
containerAccessible = this;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent =
|
||||
CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE);
|
||||
if (textChangeEvent) {
|
||||
|
Loading…
Reference in New Issue
Block a user