aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/event.rs')
-rw-r--r--components/script/dom/event.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs
index e8e7ad7251c..3c6bf956e9e 100644
--- a/components/script/dom/event.rs
+++ b/components/script/dom/event.rs
@@ -10,7 +10,6 @@ use crate::dom::bindings::codegen::Bindings::PerformanceBinding::DOMHighResTimeS
use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceBinding::PerformanceMethods;
use crate::dom::bindings::error::Fallible;
use crate::dom::bindings::inheritance::Castable;
-use crate::dom::bindings::num::Finite;
use crate::dom::bindings::refcounted::Trusted;
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
use crate::dom::bindings::root::{DomRoot, DomSlice, MutNullableDom};
@@ -19,6 +18,7 @@ use crate::dom::document::Document;
use crate::dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
use crate::dom::globalscope::GlobalScope;
use crate::dom::node::Node;
+use crate::dom::performance::reduce_timing_resolution;
use crate::dom::virtualmethods::vtable_for;
use crate::dom::window::Window;
use crate::task::TaskOnce;
@@ -333,7 +333,7 @@ impl EventMethods for Event {
// https://dom.spec.whatwg.org/#dom-event-timestamp
fn TimeStamp(&self) -> DOMHighResTimeStamp {
- Finite::wrap(
+ reduce_timing_resolution(
(self.precise_time_ns - (*self.global().performance().TimeOrigin()).round() as u64)
.to_ms(),
)
@@ -419,7 +419,7 @@ pub enum EventPhase {
/// helps us to prevent such events from being [sent to the constellation][msg] where it will be
/// handled once again for page scrolling (which is definitely not what we'd want).
///
-/// [msg]: https://doc.servo.org/script_traits/enum.ConstellationMsg.html#variant.KeyEvent
+/// [msg]: https://doc.servo.org/compositing/enum.ConstellationMsg.html#variant.KeyEvent
///
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
pub enum EventDefault {