Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lots of style thingies
  • Loading branch information
noamr committed Dec 15, 2022
commit 4673423149a93087c71dd3888dc3df1fb6d0ffed
48 changes: 21 additions & 27 deletions css-values-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,35 +1059,28 @@ URL Processing Model</h4>

1. Let |environmentSettings| be |sheet|'s [=relevant settings object=].

3. Let |documentBase| be |environmentSettings|'s [=API base URL=].
2. Let |base| be |sheet|'s <a spec=cssom>stylesheet base URL</a> if it is not null, otherwise
|environmentSettings|'s [=API base URL=]. [[CSSOM]]

4. Let |base| be |sheet|'s <a spec=cssom>stylesheet base URL</a>. [[CSSOM]]

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

6. Let |url| be |urlValue|.

7. If |urlValue| is a <<url>>, set |url| to |urlValue|'s [=/url=].

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

9. Let |req| be a new [=/request=] whose [=request/url=] is |parsedUrl|, whose
4. Let |req| be a new [=/request=] whose [=request/url=] is |parsedUrl|, whose
[=request/destination=] is |destination|, [=request/mode=] is |corsMode|,
[=request/origin=] is |environmentSettings|'s
[=environment settings object/origin=], [=request/credentials mode=] is
"same-origin", [=request/use-url-credentials flag=] is set, [=request/client=] is
|environmentSettings|, and whose [=request/referrer=] is |documentBase|.
[=request/origin=] is |environmentSettings|'s [=environment settings object/origin=],
[=request/credentials mode=] is "same-origin", [=request/use-url-credentials flag=] is
set, [=request/client=] is |environmentSettings|, and whose [=request/referrer=] is
|environmentSettings|'s [=API base URL=].

10. [=Apply request modifiers from URL value=] given |req| and |urlValue|.
5. [=Apply request modifiers from URL value=] given |req| and |urlValue|.

11. If |req|'s [=request/mode] is "cors",
6. If |req|'s [=request/mode=] is "cors",
set |req|'s [=request/referrer=] to |sheet|'s <a spec=cssom>location</a>. [[CSSOM]]

12. If |sheet|'s <a spec=cssom>origin-clean flag</a> is set,
7. If |sheet|'s <a spec=cssom>origin-clean flag</a> is set,
set |req|'s [=request/initiator type=] to "css". [[CSSOM]]

13. [=/Fetch|fetching=] |req|,
8. [=/Fetch=] |req|,
with [=fetch/processresponseconsumebody=] set to |processResponse|.
</div>

Expand All @@ -1099,31 +1092,32 @@ Request URL Modifiers</h4>
a [=/request=].

<pre class=prod>
<<url-request-modifier>> = <<crossorigin-modifier>> | <<integrity-modifier>> | <<referrerpolicy-modifier>>
<<request-url-modifier>> = <<crossorigin-modifier>> | <<integrity-modifier>> | <<referrerpolicy-modifier>>
<<crossorigin-modifier>> = crossorigin(anonymous | use-credentials)
<<integrity-modifier>> = integrity(<<string>>)
<<referrerpolicy-modifier>> = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)
</pre>

<dl dfn-for="<<request-url-modifier>>">
<dt><dfn><<crossorigin-modifier>></dfn> = <dfn function>crossorigin</dfn>(<dfn value>anonymous</dfn> | <dfn value>use-credentials</dfn>)
<dt><dfn><<crossorigin-modifier>></dfn> = <dfn function lt="crossorigin()">crossorigin</dfn>(<dfn value>anonymous</dfn> | <dfn value>use-credentials</dfn>)
<dd>The [=request modifier steps=] for this modifier given [=/request=] |req| are:
1. Set [=/request=]'s [=request/mode=] to "cors".

2. If the given value is ''use-credentials'', set [=/request=]'s
[=request/credentials mode=] to "include".
[=request/credentials mode=] to "include".

<dt><dfn><<integrity-modifier>></dfn> = <dfn function>integrity</dfn>(<<string>>)
<dt><dfn><<integrity-modifier>></dfn> = <dfn function lt="integrity()">integrity</dfn>(<<string>>)
<dd>The [=request modifier steps=] for this modifier given [=/request=] |req| are to set
[=/request=]'s [=request/integrity metadata=] to the given <<string>>.
[=/request=]'s [=request/integrity metadata=] to the given <<string>>.

<dt><dfn><<referrerpolicy-modifier>></dfn> = <dfn function>referrerpolicy</dfn>(<dfn value>no-referrer</dfn> | <dfn value>no-referrer-when-downgrade</dfn> | <dfn value>same-origin</dfn> | <dfn value>origin</dfn> | <dfn value>strict-origin</dfn> | <dfn value>origin-when-cross-origin</dfn> | <dfn value>strict-origin-when-cross-origin</dfn> | <dfn value>unsafe-url</dfn>)
<dt><dfn><<referrerpolicy-modifier>></dfn> = <dfn function lt="referrerpolicy()">referrerpolicy</dfn>(<dfn value>no-referrer</dfn> | <dfn value>no-referrer-when-downgrade</dfn> | <dfn value>same-origin</dfn> | <dfn value>origin</dfn> | <dfn value>strict-origin</dfn> | <dfn value>origin-when-cross-origin</dfn> | <dfn value>strict-origin-when-cross-origin</dfn> | <dfn value>unsafe-url</dfn>)
<dd>The [=request modifier steps=] for this modifier given [=/request=] |req| are to set
[=/request=]'s [=request/referrer policy=] to the [=referrer policy=] that matches the given value.
[=/request=]'s [=request/referrer policy=] to the {{ReferrerPolicy}} that matches the given value.
</dl>

<div algorithm>
To <dfn>apply request modifiers from URL value</dfn> given a [=/request=] |req| and a <<url>>
|urlValue|, call the [=request modifier steps=] for <<url>>'s <<url-request-modifier>>s in sequence
|url|, call the [=request modifier steps=] for |url|'s <<request-url-modifier>>s in sequence
given |req|.
</div>

Expand Down