Closed
Bug 381832
Opened 18 years ago
Closed 18 years ago
duplicated of state-changed:busy (false) event when document is load finished
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)
References
Details
(Keywords: access)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
aaronlev
:
review+
|
Details | Diff | Splinter Review |
1) load a web page, say "http://www.google.com",
you will get 1 state-changed:busy (true) event and 2 state-changed:busy (false) events
2) load a web page, and click an anchor inside the page
you will not get state-changed:busy (false) event
nsDocAccessible::FireAnchorJumpEvent is called by nsAccessibilityService::OnLocationChange
I think we don't need extra code in nsDocAccessible::DocLoadCallback.
These code are copied from MSAA part in bug 343136.
I'm not sure if we need state-change:busy(0) for anchorjumps, we don't emit state-changed:busy(1) when clicks inside anchors.
I also comment out attributes_changed event for atk, because atk document doesn't have such an event.
Assignee: aaronleventhal → ginn.chen
Status: NEW → ASSIGNED
Attachment #265911 -
Flags: review?(aaronleventhal)
Comment 2•18 years ago
|
||
> I'm not sure if we need state-change:busy(0) for anchorjumps, we don't emit
> state-changed:busy(1) when clicks inside anchors.
That doesn't make sense, the document was not busy for an anchor jump. That's why we were looking for document attributes change, to show the location changed.
You commented it out, instead of removing the whole case. Why?
Also the commment says no document attribute change events "yet". Are they planned and just not implemented? What's the bug # in bugs.gnome.org for that?
Updated•18 years ago
|
Attachment #265911 -
Flags: review?(aaronleventhal) → review-
Comment 3•18 years ago
|
||
How do the state-change:busy(0) events get fired for doc loads at all now, after this patch?
Comment 4•18 years ago
|
||
I see, we do it in DocLoadEvents as well.
How do we know which is correct?
Comment 5•18 years ago
|
||
s/DocLoadEvents/FireDocLoadEvents.
Comment 6•18 years ago
|
||
Actually the state change in DocLoadCallback is the correct one. The one in FireDocLoadEvents (the one for clearing) needs to be removed. It's here: http://lxr.mozilla.org/seamonkey/source/accessible/src/base/nsDocAccessible.cpp#800
Here's why it matters.
We always need to fire the event after scripts have had a chance to run. That's why we have DocLoadCallback -- it happens after a very short delay. However, FireDocLoadEvents() is not always called after a delay, especially when it's called from nsAccessibilityService::OnStateChange()
Remove busy(0) event from FireDocLoadEvents
Remove FireAnchorJumpEvent from FireDocLoadCallback
anchor jump won't call this callback
For atk document:attributes-changed event, I discussed with Li Yuan, and filed #441116 in gnome bugzilla.
We can leave it in Firefox.
Attachment #265911 -
Attachment is obsolete: true
Attachment #266036 -
Flags: review?(aaronleventhal)
Comment 8•18 years ago
|
||
Comment on attachment 266036 [details] [diff] [review]
patch v2
- docAcc->FireAnchorJumpEvent();
Please don't remove this. It breaks MSAA firing of event for anchor jump after the load when you load a URL like http://www.foo.com#bar
What is removing that fixing?
Attachment #266036 -
Flags: review?(aaronleventhal) → review-
Aaron,
For following scenarios, which should have document:attributes-changed event?
1) In same window, load http://www.foo.com, then http://www.bar.com
2) In same window, load http://www.foo.com, then http://www.foo.com#bar
3) In same window, load http://www.foo.com, then http://www.bar.com#bar
4) In same window, load http://www.foo.com#bar, then http://www.foo.com
5) In same window, load http://www.foo.com#bar, then http://www.bar.com
6) In same window, load http://www.foo.com#bar, then http://www.bar.com#bar
7) In same window, load http://www.foo.com#foo, then http://www.foo.com#bar
I thought we only need to emit document:attributes-changed event for 2), 4), 7) because other scenarios will emit document:load-complete.
That's why I removed that line. But I'm not sure now.
If we don't remove that line, we will emit document:attributes-changed for scenario 2) - 7).
http://developer.mozilla.org/en/docs/Accessibility/ATSPI_Support#Supported_AT-SPI_Document_Attributes
said
The document:attributes-changed event is fired if the DocURL changes due to a named anchor jump.
If a named anchor jump comes together with site change, what should we do?
Summary: duplicated or lack of state-changed:busy (false) event when document is load finished → duplicated or redundant of state-changed:busy (false) event when document is load finished
Assignee | ||
Comment 10•18 years ago
|
||
patch without removing docAcc->FireAnchorJumpEvent();
Not sure we should take this version or last version.
nsAccessibilityService::OnLocationChange will call nsDocAccessible::FireAnchorJumpEvent for scenario 2), 4), 7)
FireDocLoadCallback will call FireAnchorJumpEvent for scenario 3), 5), 6)
Comment 11•18 years ago
|
||
We want anchor jump event for 2-7. Perhaps document-attributes changed event is the wrong event, but we need something to indicate that position is not at the top of the document. Perhaps caret move event works on ATK, but we need FireAnchrorJumpEvent() for MSAA.
Updated•18 years ago
|
Attachment #266348 -
Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Summary: duplicated or redundant of state-changed:busy (false) event when document is load finished → duplicated of state-changed:busy (false) event when document is load finished
Attachment #266036 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•