Skip to content

[css-syntax-3][css-values-3][css-cascade-4][css-fonts-4] Formalize fetching and resource timing reporting #6715

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

Merged
merged 14 commits into from
Nov 3, 2021
Merged
Prev Previous commit
Next Next commit
Numbering
  • Loading branch information
noamr committed Oct 11, 2021
commit ffc8bf7550261efef26ebc395e0563ddcb484027
22 changes: 11 additions & 11 deletions css-values-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,29 +1009,29 @@ URL processing model</h4>

5. Let |referrer| be |documentBase|.

6. Let |handleResourceFetchDone| be to do nothing.
6. If |base| is null, set |base| to |documentBase|.

7. If |base| is null, set |base| to |documentBase|.

8. Let |parsedUrl| be the result of the [=URL parser=] steps with |url| and |base|.
7. Let |parsedUrl| be the result of the [=URL parser=] steps with |url| and |base|.
If the algorithm returns an error, return.

9. If |corsMode| is "cors", set |referrer| to |sheet|'s
8. If |corsMode| is "cors", set |referrer| to |sheet|'s
<a spec=cssom>location</a>. [[CSSOM]]

10. Let |req| be a new [=/request=] whose [=request/url=] is |parsedUrl|, whose
9. Let |req| be a new [=/request=] whose [=request/url=] is |parsedUrl|, whose
[=request/destination=] is |destination|, [=request/mode=] is |mode|, [=request/origin=]
is |environmentSettings|'s [=environment settings object/origin=],
[=request/credentials mode=] is "same-origin", [=request/use-url-credentials flag=] is
set, and whose [=request/header list=] is a [=/header list=] containing a [=header=]
with its [=header/name=] set to "referrer" and its [=header/value=] set to |referrer|.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somewhat wrong. You want to set the referrer field on the request. That will set the Referer (note, one r less) header. But good that it sets it explicitly though as CSS cannot take it from the global.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, fixed.


11. If |sheet|'s <a spec=cssom>origin-clean flag</a> is set, set |handleResourceFetchDone|
given [=/response=] |res| to [=finalize and report timing=] with |res|, |global|, and
<code>"css"</code>. [[CSSOM]]
10. [=/Fetch=] |req|, with |taskDestination| set to |global|, and |processResponse| set to
the following steps given [=/response=] |res|:

1. If |sheet|'s <a spec=cssom>origin-clean flag</a> is set, set |handleResourceFetchDone|
given [=/response=] |res| to [=finalize and report timing=] with |res|, |global|, and
<code>"css"</code>. [[CSSOM]]

12. [=/Fetch=] |req|, with |processResponseDone| set to |handleResourceFetchDone|,
|taskDestination| set to |global|, and |processResponse| set to |processResponse|.
2. Call |processResponseDone| with |res|.
</div>

<h2 id="numeric-types">
Expand Down