mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #23812 - tdelacour:ISSUE-21257, r=jdm
ISSUE-21257: set redirectEnd on PerformanceResourceTiming <!-- Please describe your changes on the following line: --> Added the appropriate attribute and setters. Included a Timer struct with a `Drop` function to set this value to zero in error cases. Set the value to `responseEnd` on success. Eliminated tests that now pass. --- <!-- 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 #21257 (GitHub issue number if applicable) <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23812) <!-- Reviewable:end -->
This commit is contained in:
commit
410c3f0260
7 changed files with 58 additions and 28 deletions
|
@ -59,8 +59,6 @@ pub struct PerformanceResourceTiming {
|
|||
// TODO(#21255): duration
|
||||
// TODO(#21269): next_hop
|
||||
// TODO(#21264): worker_start
|
||||
// TODO(#21256): redirect_start
|
||||
// TODO(#21257): redirect_end
|
||||
// TODO(#21258): fetch_start
|
||||
// TODO(#21259): domain_lookup_start
|
||||
// TODO(#21260): domain_lookup_end
|
||||
|
@ -116,7 +114,7 @@ impl PerformanceResourceTiming {
|
|||
next_hop: next_hop,
|
||||
worker_start: 0.,
|
||||
redirect_start: resource_timing.redirect_start as f64,
|
||||
redirect_end: 0.,
|
||||
redirect_end: resource_timing.redirect_end as f64,
|
||||
fetch_start: resource_timing.fetch_start as f64,
|
||||
domain_lookup_start: resource_timing.domain_lookup_start as f64,
|
||||
domain_lookup_end: 0.,
|
||||
|
@ -187,6 +185,11 @@ impl PerformanceResourceTimingMethods for PerformanceResourceTiming {
|
|||
Finite::wrap(self.redirect_start)
|
||||
}
|
||||
|
||||
// https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-redirectend
|
||||
fn RedirectEnd(&self) -> DOMHighResTimeStamp {
|
||||
Finite::wrap(self.redirect_end)
|
||||
}
|
||||
|
||||
// https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responsestart
|
||||
fn ResponseStart(&self) -> DOMHighResTimeStamp {
|
||||
Finite::wrap(self.response_start)
|
||||
|
|
|
@ -13,7 +13,7 @@ interface PerformanceResourceTiming : PerformanceEntry {
|
|||
readonly attribute DOMString nextHopProtocol;
|
||||
// readonly attribute DOMHighResTimeStamp workerStart;
|
||||
readonly attribute DOMHighResTimeStamp redirectStart;
|
||||
// readonly attribute DOMHighResTimeStamp redirectEnd;
|
||||
readonly attribute DOMHighResTimeStamp redirectEnd;
|
||||
readonly attribute DOMHighResTimeStamp fetchStart;
|
||||
readonly attribute DOMHighResTimeStamp domainLookupStart;
|
||||
// readonly attribute DOMHighResTimeStamp domainLookupEnd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue