mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1189162 - Clamp gamepad.timestamp and VideoPlaybackQuality.creationTime. r=bz
This commit is contained in:
parent
74f496af23
commit
4fb46efd11
@ -31,7 +31,7 @@ Gamepad::UpdateTimestamp()
|
||||
if(newWindow) {
|
||||
nsPerformance* perf = newWindow->GetPerformance();
|
||||
if (perf) {
|
||||
mTimestamp = perf->GetDOMTiming()->TimeStampToDOMHighRes(TimeStamp::Now());
|
||||
mTimestamp = perf->Now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ HTMLVideoElement::GetVideoPlaybackQuality()
|
||||
if (window) {
|
||||
nsPerformance* perf = window->GetPerformance();
|
||||
if (perf) {
|
||||
creationTime = perf->GetDOMTiming()->TimeStampToDOMHighRes(TimeStamp::Now());
|
||||
creationTime = perf->Now();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,8 @@ var index = GamepadService.addGamepad("test gamepad", // id
|
||||
2);// axes
|
||||
GamepadService.newButtonEvent(index, 0, true);
|
||||
function connecthandler(e) {
|
||||
ok(e.gamepad.timestamp <= performance.now());
|
||||
ok(e.gamepad.timestamp <= performance.now(),
|
||||
"gamepad.timestamp should less than or equal to performance.now()");
|
||||
is(e.gamepad.index, 0, "correct gamepad index");
|
||||
is(e.gamepad.id, "test gamepad", "correct gamepad name");
|
||||
is(e.gamepad.mapping, "standard", "standard mapping");
|
||||
|
Loading…
Reference in New Issue
Block a user