diff options
author | ddh <dianehosfelt@gmail.com> | 2017-10-02 14:52:39 +0100 |
---|---|---|
committer | ddh <dianehosfelt@gmail.com> | 2017-10-24 21:02:56 +0100 |
commit | 2ffbe5398970e54ad55d3e53b495ee6651b64f4c (patch) | |
tree | 4bd439757539df5afa8e58a9030a3a46c4098e0d /components/script/dom/performancepainttiming.rs | |
parent | 347176df257978bdb1c413f632c9fc870de4ff76 (diff) | |
download | servo-2ffbe5398970e54ad55d3e53b495ee6651b64f4c.tar.gz servo-2ffbe5398970e54ad55d3e53b495ee6651b64f4c.zip |
added time to interactive metrics, refactored metrics to use traits
changed task macro to take pipeline info
Diffstat (limited to 'components/script/dom/performancepainttiming.rs')
-rw-r--r-- | components/script/dom/performancepainttiming.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/performancepainttiming.rs b/components/script/dom/performancepainttiming.rs index 4c25e785208..fb7b8b30209 100644 --- a/components/script/dom/performancepainttiming.rs +++ b/components/script/dom/performancepainttiming.rs @@ -9,7 +9,7 @@ use dom::bindings::str::DOMString; use dom::globalscope::GlobalScope; use dom::performanceentry::PerformanceEntry; use dom_struct::dom_struct; -use script_traits::PaintMetricType; +use script_traits::PWMType; #[dom_struct] pub struct PerformancePaintTiming { @@ -17,11 +17,11 @@ pub struct PerformancePaintTiming { } impl PerformancePaintTiming { - fn new_inherited(metric_type: PaintMetricType, start_time: f64) - -> PerformancePaintTiming { + fn new_inherited(metric_type: PWMType, start_time: f64) -> PerformancePaintTiming { let name = match metric_type { - PaintMetricType::FirstPaint => DOMString::from("first-paint"), - PaintMetricType::FirstContentfulPaint => DOMString::from("first-contentful-paint"), + PWMType::FirstPaint => DOMString::from("first-paint"), + PWMType::FirstContentfulPaint => DOMString::from("first-contentful-paint"), + _ => DOMString::from(""), }; PerformancePaintTiming { entry: PerformanceEntry::new_inherited(name, @@ -33,7 +33,7 @@ impl PerformancePaintTiming { #[allow(unrooted_must_root)] pub fn new(global: &GlobalScope, - metric_type: PaintMetricType, + metric_type: PWMType, start_time: f64) -> DomRoot<PerformancePaintTiming> { let entry = PerformancePaintTiming::new_inherited(metric_type, start_time); reflect_dom_object(Box::new(entry), global, PerformancePaintTimingBinding::Wrap) |