From 8d96c2ac609a733435a7b0c89bf1219c8a80cc29 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Sat, 10 Nov 2012 02:37:27 +0900 Subject: [PATCH] Bug 757774 - Fire state change event when link is traversed, r=tbsaunde --- accessible/src/generic/DocAccessible.cpp | 8 ++- .../tests/mochitest/states/test_link.html | 62 +++++++++++++------ 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/accessible/src/generic/DocAccessible.cpp b/accessible/src/generic/DocAccessible.cpp index d78ca014c49..e89acfa16da 100644 --- a/accessible/src/generic/DocAccessible.cpp +++ b/accessible/src/generic/DocAccessible.cpp @@ -1264,7 +1264,13 @@ DocAccessible::ContentStateChanged(nsIDocument* aDocument, nsRefPtr event = new AccStateChangeEvent(aContent, states::INVALID, true); FireDelayedAccessibleEvent(event); - } + } + + if (aStateMask.HasState(NS_EVENT_STATE_VISITED)) { + nsRefPtr event = + new AccStateChangeEvent(aContent, states::TRAVERSED, true); + FireDelayedAccessibleEvent(event); + } } void diff --git a/accessible/tests/mochitest/states/test_link.html b/accessible/tests/mochitest/states/test_link.html index 4ceecf704e2..a438952ef75 100644 --- a/accessible/tests/mochitest/states/test_link.html +++ b/accessible/tests/mochitest/states/test_link.html @@ -23,6 +23,40 @@ @@ -87,6 +108,11 @@ title="Calculate link states separately"> Mozilla Bug 754830 + + Mozilla Bug 757774 +