diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-10-22 09:34:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-22 09:34:07 -0400 |
commit | bf587f22d7d9c96913a4df5added16f0454197f8 (patch) | |
tree | bdf396c252c0b7b0d6273481380df3931652b30c /components/script/dom | |
parent | 75830b717a2dbd95e9475ea082b5f88f4d279ea0 (diff) | |
parent | 328c45a1d8dad933adf3e1a407a6573668c03dee (diff) | |
download | servo-bf587f22d7d9c96913a4df5added16f0454197f8.tar.gz servo-bf587f22d7d9c96913a4df5added16f0454197f8.zip |
Auto merge of #24508 - pajamapants3000:21254, r=jdm
Add start_time to resource timing.
<!-- Please describe your changes on the following line: -->
`start_time` property added to `ResourceFetchTiming`, which enables the setting of `start_time` in the `PerformanceEntry` member of `PerformanceResourceTiming`.
Following the specification at https://w3c.github.io/resource-timing/#dfn-starttime, `start_time` is set to the value of `redirect_start` if redirection occurs and the timing allow check passes. Otherwise it has the same value as `fetch_start`.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21254
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/performanceresourcetiming.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/performanceresourcetiming.rs b/components/script/dom/performanceresourcetiming.rs index d3fc054d27b..735d13a31f4 100644 --- a/components/script/dom/performanceresourcetiming.rs +++ b/components/script/dom/performanceresourcetiming.rs @@ -55,7 +55,6 @@ pub struct PerformanceResourceTiming { decoded_body_size: u64, //size in octets } -// TODO(#21254): startTime // TODO(#21255): duration // TODO(#21269): next_hop // TODO(#21264): worker_start @@ -115,7 +114,7 @@ impl PerformanceResourceTiming { entry: PerformanceEntry::new_inherited( DOMString::from(url.into_string()), DOMString::from("resource"), - 0., + resource_timing.start_time as f64, 0., ), initiator_type: initiator_type, |