mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +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 ||
|
if (eventType == nsIAccessibleEvent::EVENT_DOM_CREATE ||
|
||||||
eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
|
eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessible> containerAccessible;
|
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 (eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
|
||||||
if (accessible) {
|
// For asynch show, delayed invalidatation of parent's children
|
||||||
// For asynch show, delayed invalidatation of parent's children
|
nsCOMPtr<nsPIAccessible> privateContainerAccessible =
|
||||||
accessible->GetParent(getter_AddRefs(containerAccessible));
|
do_QueryInterface(containerAccessible);
|
||||||
nsCOMPtr<nsPIAccessible> privateContainerAccessible =
|
if (privateContainerAccessible)
|
||||||
do_QueryInterface(containerAccessible);
|
privateContainerAccessible->InvalidateChildren();
|
||||||
if (privateContainerAccessible)
|
|
||||||
privateContainerAccessible->InvalidateChildren();
|
|
||||||
}
|
|
||||||
// Some show events in the subtree may have been removed to
|
// Some show events in the subtree may have been removed to
|
||||||
// avoid firing redundant events. But, we still need to make sure any
|
// avoid firing redundant events. But, we still need to make sure any
|
||||||
// accessibles parenting those shown nodes lose their child references.
|
// 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
|
// 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.
|
// the offset, length and text for the text change.
|
||||||
if (domNode && domNode != mDOMNode) {
|
if (domNode && domNode != mDOMNode) {
|
||||||
if (!containerAccessible) {
|
|
||||||
GetAccessibleInParentChain(domNode, PR_TRUE,
|
|
||||||
getter_AddRefs(containerAccessible));
|
|
||||||
if (!containerAccessible)
|
|
||||||
containerAccessible = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent =
|
nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent =
|
||||||
CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE);
|
CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE);
|
||||||
if (textChangeEvent) {
|
if (textChangeEvent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user