summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-04 13:11:28 +0000
committerMoonchild <moonchild@palemoon.org>2020-05-04 13:11:28 +0000
commitca826767f07eb3b463f660b94f9416ecb5065611 (patch)
tree6aaad1b3ceb62cd2977add979d69c9e48e103f72 /dom
parentea491d0383e89839b831fabc11e7e0d6732659dd (diff)
downloadUXP-ca826767f07eb3b463f660b94f9416ecb5065611.tar
UXP-ca826767f07eb3b463f660b94f9416ecb5065611.tar.gz
UXP-ca826767f07eb3b463f660b94f9416ecb5065611.tar.lz
UXP-ca826767f07eb3b463f660b94f9416ecb5065611.tar.xz
UXP-ca826767f07eb3b463f660b94f9416ecb5065611.zip
Issue #1517 - Remove dom.event.highrestimestamp.enabled pref
This resolves #1517
Diffstat (limited to 'dom')
-rwxr-xr-xdom/events/Event.cpp14
-rw-r--r--dom/events/test/test_eventTimeStamp.html6
-rw-r--r--dom/smil/test/test_smilTimeEvents.xhtml12
3 files changed, 4 insertions, 28 deletions
diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp
index aff65b40f..2f8800fb4 100755
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -45,9 +45,6 @@ extern bool IsCurrentThreadRunningChromeWorker();
static char *sPopupAllowedEvents;
-static bool sReturnHighResTimeStamp = false;
-static bool sReturnHighResTimeStampIsSet = false;
-
Event::Event(EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent)
@@ -68,13 +65,6 @@ Event::ConstructorInit(EventTarget* aOwner,
SetOwner(aOwner);
mIsMainThreadEvent = NS_IsMainThread();
- if (mIsMainThreadEvent && !sReturnHighResTimeStampIsSet) {
- Preferences::AddBoolVarCache(&sReturnHighResTimeStamp,
- "dom.event.highrestimestamp.enabled",
- sReturnHighResTimeStamp);
- sReturnHighResTimeStampIsSet = true;
- }
-
mPrivateDataDuplicated = false;
mWantsPopupControlCheck = false;
@@ -1093,10 +1083,6 @@ Event::TimeStamp() const
double
Event::TimeStampImpl() const
{
- if (!sReturnHighResTimeStamp) {
- return static_cast<double>(mEvent->mTime);
- }
-
if (mEvent->mTimeStamp.IsNull()) {
return 0.0;
}
diff --git a/dom/events/test/test_eventTimeStamp.html b/dom/events/test/test_eventTimeStamp.html
index 056203e92..5ca5cd47d 100644
--- a/dom/events/test/test_eventTimeStamp.html
+++ b/dom/events/test/test_eventTimeStamp.html
@@ -35,12 +35,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=77992
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
-// We don't use SpecialPowers.pushPrefEnv since it can delay the test
-// function until after the load event has fired which means we can't
-// test the timestamp of the load event.
-const kPrefName = "dom.event.highrestimestamp.enabled";
-var prevPrefValue = SpecialPowers.getBoolPref(kPrefName);
-SpecialPowers.setBoolPref(kPrefName, true);
testRegularEvents();
// Event.timeStamp should be relative to the time origin which is:
diff --git a/dom/smil/test/test_smilTimeEvents.xhtml b/dom/smil/test/test_smilTimeEvents.xhtml
index bf6924ddb..002be5539 100644
--- a/dom/smil/test/test_smilTimeEvents.xhtml
+++ b/dom/smil/test/test_smilTimeEvents.xhtml
@@ -236,14 +236,10 @@ function sanityCheckEvent(evt)
is(evt.eventPhase, evt.AT_TARGET);
is(evt.bubbles, false, "Event should not bubble");
is(evt.cancelable, false, "Event should not be cancelable");
- if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) {
- var now = window.performance.now();
- ok(evt.timeStamp > 0 && evt.timeStamp < now,
- "Event timeStamp (" + evt.timeStamp + ") should be > 0 but " +
- "before the current time (" + now + ")");
- } else {
- is(evt.timeStamp, 0, "Event timeStamp should be 0");
- }
+ var now = window.performance.now();
+ ok(evt.timeStamp > 0 && evt.timeStamp < now,
+ "Event timeStamp (" + evt.timeStamp + ") should be > 0 but " +
+ "before the current time (" + now + ")");
ok(evt.view !== null, "Event view not set");
}