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:
bors-servo 2014-04-30 15:16:50 -04:00
commit 14063b242e
2 changed files with 6 additions and 1 deletions

View file

@ -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,

View file

@ -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";