mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass the timing information to PerformanceTiming rather than exposing methods.
This commit is contained in:
parent
d67bcfa7ce
commit
e4dc6ca2ec
3 changed files with 22 additions and 16 deletions
|
@ -98,14 +98,6 @@ impl Window {
|
|||
&*self.page
|
||||
}
|
||||
|
||||
pub fn navigation_start(&self) -> u64 {
|
||||
self.navigation_start
|
||||
}
|
||||
|
||||
pub fn navigation_start_precise(&self) -> f64 {
|
||||
self.navigation_start_precise
|
||||
}
|
||||
|
||||
pub fn get_url(&self) -> Url {
|
||||
self.page().get_url()
|
||||
}
|
||||
|
@ -267,7 +259,10 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
|||
}
|
||||
|
||||
fn Performance(self) -> Temporary<Performance> {
|
||||
self.performance.or_init(|| Performance::new(self))
|
||||
self.performance.or_init(|| {
|
||||
Performance::new(self, self.navigation_start,
|
||||
self.navigation_start_precise)
|
||||
})
|
||||
}
|
||||
|
||||
global_event_handlers!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue