Bug 384667 - AT-SPI events not generated for all Firefox progress bars.

r=mconnor
This commit is contained in:
Evan.Yan@Sun.COM 2007-06-24 19:45:10 -07:00
parent db6a0cec80
commit 9c9c57791b
2 changed files with 8 additions and 2 deletions

View File

@ -169,7 +169,7 @@
<xul:hbox flex="1">
<xul:vbox flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:progressmeter mode="normal" value="0" flex="1"
<xul:progressmeter anonid="progressmeter" mode="normal" value="0" flex="1"
xbl:inherits="value=progress,mode=progressmode"/>
</xul:vbox>
<xul:vbox pack="start">
@ -310,7 +310,7 @@
<xul:hbox flex="1">
<xul:vbox flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:progressmeter mode="normal" value="0" flex="1"
<xul:progressmeter anonid="progressmeter" mode="normal" value="0" flex="1"
xbl:inherits="value=progress,mode=progressmode"/>
</xul:vbox>
<xul:vbox pack="start">

View File

@ -433,6 +433,12 @@ function onUpdateProgress()
// Update progress
getDownload(dl.id).setAttribute("progress", dl.percentComplete);
// Fire DOM event so that accessible value change events occur
var progressmeter = document.getAnonymousElementByAttribute(getDownload(dl.id), "anonid", "progressmeter");
var event = document.createEvent('Events');
event.initEvent('ValueChange', true, true);
progressmeter.dispatchEvent(event);
// gActiveDownloads is screwed so it's possible
// to have more files than we're really downloading.
// The good news is that those files have size==0.