mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update ProgressEvent to use doubles (#36487)
See: https://github.com/whatwg/xhr/pull/394 Testing: WPT tests exist for this Signed-off-by: Sebastian C <sebsebmc@gmail.com>
This commit is contained in:
parent
4c55104b36
commit
85bd0918f2
5 changed files with 24 additions and 26 deletions
|
@ -14,6 +14,7 @@ use js::jsval::{self, JSVal};
|
|||
use js::rust::HandleObject;
|
||||
use js::typedarray::{ArrayBuffer, CreateWith};
|
||||
use mime::{self, Mime};
|
||||
use script_bindings::num::Finite;
|
||||
use stylo_atoms::Atom;
|
||||
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
|
@ -463,8 +464,8 @@ impl FileReader {
|
|||
EventBubbles::DoesNotBubble,
|
||||
EventCancelable::NotCancelable,
|
||||
total.is_some(),
|
||||
loaded,
|
||||
total.unwrap_or(0),
|
||||
Finite::wrap(loaded as f64),
|
||||
Finite::wrap(total.unwrap_or(0) as f64),
|
||||
can_gc,
|
||||
);
|
||||
progressevent.upcast::<Event>().fire(self.upcast(), can_gc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue