Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PerformanceResourceTiming: redirectStart #21256

Closed
avadacatavra opened this issue Jul 27, 2018 · 1 comment
Closed

PerformanceResourceTiming: redirectStart #21256

avadacatavra opened this issue Jul 27, 2018 · 1 comment

Comments

@avadacatavra
Copy link
Contributor

@avadacatavra avadacatavra commented Jul 27, 2018

In components/net/http_loader.rs::http_fetch we need to set redirect_start.

On getting, the redirectStart attribute MUST return as follows:

  1. The time immediately before the user agent starts to fetch the resource that initiates the redirect, if there are HTTP redirects or equivalent when fetching the resource and all the redirects or equivalent pass the timing allow check algorithm.
  2. zero, otherwise.

https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-redirectstart

@kkpoon
Copy link
Contributor

@kkpoon kkpoon commented Nov 30, 2018

Hi @avadacatavra. I would try to work on this. This is my idea.

  1. Add RedirectStart to ResourceAttribute in net_trait
  2. Match the enum in set_attribute to record the start time.
  3. In http_loader.rs http_fetch. Add the call the context timing on the RedirectStart

🤔anything missing?

@kkpoon kkpoon mentioned this issue Nov 30, 2018
3 of 5 tasks complete
bors-servo added a commit that referenced this issue Nov 30, 2018
Add PerformanceResourceTiming: redirectStart

1. Added `RedirectStart` to `ResourceAttribute` in `net_traits` crate
2. Match the enum in `set_attribute` to record the start time in `ResourceFetchTiming.redirect_start`.
3. In `http_loader.rs::http_fetch`, added the call the context timing on the `RedirectStart`

fix 21256

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21256 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/22319)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jan 29, 2019
WIP: Add PerformanceResourceTiming: redirectStart

1. Added `RedirectStart` to `ResourceAttribute` in `net_traits` crate
2. Match the enum in `set_attribute` to record the start time in `ResourceFetchTiming.redirect_start`.
3. In `http_loader.rs::http_fetch`, added the call the context timing on the `RedirectStart`

fix 21256

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21256 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/22319)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Feb 1, 2019
Add PerformanceResourceTiming: redirectStart

1. Added `RedirectStart` to `ResourceAttribute` in `net_traits` crate
2. Match the enum in `set_attribute` to record the start time in `ResourceFetchTiming.redirect_start`.
3. In `http_loader.rs::http_fetch`, added the call the context timing on the `RedirectStart`

fix 21256

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21256 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/22319)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.