summaryrefslogtreecommitdiffstats
path: root/dom/events
diff options
context:
space:
mode:
Diffstat (limited to 'dom/events')
-rwxr-xr-x[-rw-r--r--]dom/events/Event.cpp7
-rwxr-xr-x[-rw-r--r--]dom/events/Event.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp
index a85a0d66b..2af34136e 100644..100755
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -32,6 +32,7 @@
#include "nsJSEnvironment.h"
#include "nsLayoutUtils.h"
#include "nsPIWindowRoot.h"
+#include "mozilla/TimerClamping.h"
#include "WorkerPrivate.h"
namespace mozilla {
@@ -1085,6 +1086,12 @@ Event::DefaultPrevented(JSContext* aCx) const
double
Event::TimeStamp() const
{
+ return TimerClamping::ReduceMsTimeValue(TimeStampImpl());
+}
+
+double
+Event::TimeStampImpl() const
+{
if (!sReturnHighResTimeStamp) {
return static_cast<double>(mEvent->mTime);
}
diff --git a/dom/events/Event.h b/dom/events/Event.h
index 4ac6a68d5..c28226e8a 100644..100755
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -62,6 +62,7 @@ private:
void ConstructorInit(EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent);
+ double TimeStampImpl() const;
public:
static Event* FromSupports(nsISupports* aSupports)