mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
auto merge of #2275 : gsingh93/servo/master, r=Ms2ger
Timestamp should return the time the event was created, not 0. This fixes three test cases in dom/events/Event-constructors.html. This is my first pull request, let me know if there are any issues.
This commit is contained in:
commit
14063b242e
2 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,8 @@ use servo_util::str::DOMString;
|
|||
|
||||
use geom::point::Point2D;
|
||||
|
||||
use time;
|
||||
|
||||
pub enum Event_ {
|
||||
ResizeEvent(uint, uint),
|
||||
ReflowEvent,
|
||||
|
@ -54,6 +56,7 @@ pub struct Event {
|
|||
pub trusted: bool,
|
||||
pub dispatching: bool,
|
||||
pub initialized: bool,
|
||||
pub timestamp: u64,
|
||||
}
|
||||
|
||||
impl Event {
|
||||
|
@ -73,6 +76,7 @@ impl Event {
|
|||
stop_propagation: false,
|
||||
stop_immediate: false,
|
||||
initialized: false,
|
||||
timestamp: time::get_time().sec as u64,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +130,7 @@ impl Event {
|
|||
}
|
||||
|
||||
pub fn TimeStamp(&self) -> u64 {
|
||||
0
|
||||
self.timestamp
|
||||
}
|
||||
|
||||
pub fn InitEvent(&mut self,
|
||||
|
|
|
@ -24,6 +24,7 @@ extern crate js;
|
|||
extern crate libc;
|
||||
extern crate native;
|
||||
extern crate serialize;
|
||||
extern crate time;
|
||||
#[phase(syntax)]
|
||||
extern crate servo_macros = "macros";
|
||||
extern crate servo_net = "net";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue