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:
Sebastian C 2025-04-12 20:41:39 -05:00 committed by GitHub
parent 4c55104b36
commit 85bd0918f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 24 additions and 26 deletions

View file

@ -31,6 +31,7 @@ use net_traits::{
FetchMetadata, FetchResponseListener, FilteredMetadata, NetworkError, ReferrerPolicy,
ResourceFetchTiming, ResourceTimingType, trim_http_whitespace,
};
use script_bindings::num::Finite;
use script_traits::DocumentActivity;
use servo_url::ServoUrl;
use stylo_atoms::Atom;
@ -1235,8 +1236,8 @@ impl XMLHttpRequest {
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable,
length_computable,
loaded,
total_length,
Finite::wrap(loaded as f64),
Finite::wrap(total_length as f64),
can_gc,
);
let target = if upload {