Skip to content

Commit 182933b

Browse files
committed
[css-font-loading] Fix Bikeshed errors, including adding a privacy & security considerations section.
1 parent 496bc72 commit 182933b

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

css-font-loading-3/Overview.bs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,7 @@ The Constructor</h3>
203203
from a URL pointing to a font face file,
204204
or from an {{ArrayBuffer}} (or {{ArrayBufferView}}) containing the binary representation of a font face.
205205

206-
When the <dfn constructor lt='FontFace()' for=FontFace>FontFace</dfn>(
207-
<span dfn-for="FontFace/FontFace(family, source, descriptors)">
208-
CSSOMString <dfn argument>family</dfn>,
209-
(CSSOMString or {{/BinaryData}}) <dfn argument>source</dfn>,
210-
{{/FontFaceDescriptors}} <dfn argument>descriptors</dfn>
211-
</span>
212-
)
213-
method is called,
206+
When the <dfn constructor for=FontFace>FontFace(family, source, descriptors)</dfn> method is called,
214207
execute these steps:
215208

216209
1. Let <var>font face</var> be a fresh {{FontFace}} object.
@@ -490,10 +483,10 @@ The <code>FontFaceSet</code> Interface</h2>
490483

491484
See [[#font-face-set-ready]] for more details on this {{Promise}} and its use.
492485

493-
: <dfn constructor lt="FontFaceSet()">FontFaceSet</dfn>(sequence&lt;{{FontFace}}> <dfn argument for="FontFaceSet/FontFaceSet()">initialFaces</dfn>)
486+
: <dfn constructor>FontFaceSet(initialFaces)</dfn>
494487
:: The {{FontFaceSet}} constructor, when called,
495488
must iterate its {{initialFaces}} argument
496-
and add each value to its <a>set entries</a>.
489+
and add each value to its [=FontFaceSet/set entries=].
497490

498491
: <dfn dfn>iteration order</dfn>
499492
:: When iterated over,
@@ -513,12 +506,12 @@ The <code>FontFaceSet</code> Interface</h2>
513506
When the {{add()}} method is called,
514507
execute the following steps:
515508

516-
1. If <var>font</var> is already in the {{FontFaceSet}}’s <a>set entries</a>,
509+
1. If <var>font</var> is already in the {{FontFaceSet}}’s [=FontFaceSet/set entries=],
517510
skip to the last step of this algorithm immediately.
518511
2. If <var>font</var> is <a>CSS-connected</a>,
519512
throw an {{InvalidModificationError}} exception
520513
and exit this algorithm immediately.
521-
3. Add the <var>font</var> argument to the {{FontFaceSet}}’s <a>set entries</a>.
514+
3. Add the <var>font</var> argument to the {{FontFaceSet}}’s [=FontFaceSet/set entries=].
522515
2. If <var>font</var>’s {{FontFace/status}} attribute is "loading":
523516
1. If the {{FontFaceSet}}’s {{[[LoadingFonts]]}} list is empty,
524517
<a>switch the FontFaceSet to loading</a>.
@@ -533,7 +526,7 @@ The <code>FontFaceSet</code> Interface</h2>
533526
1. If <var>font</var> is <a>CSS-connected</a>,
534527
return <code class='lang-javascript'>false</code>
535528
and exit this algorithm immediately.
536-
2. Let <var>deleted</var> be the result of removing <var>font</var> from the {{FontFaceSet}}’s <a>set entries</a>.
529+
2. Let <var>deleted</var> be the result of removing <var>font</var> from the {{FontFaceSet}}’s [=FontFaceSet/set entries=].
537530
3. If <var>font</var> is present in the {{FontFaceSet}}’s {{[[LoadedFonts]]}}, or {{[[FailedFonts]]}} lists,
538531
remove it.
539532
4. If <var>font</var> is present in the {{FontFaceSet}}’s {{[[LoadingFonts]]}} list,
@@ -548,7 +541,7 @@ The <code>FontFaceSet</code> Interface</h2>
548541
When the {{clear()}} method is called,
549542
execute the following steps:
550543

551-
1. Remove all items from the {{FontFaceSet}}’s <a>set entries</a>,
544+
1. Remove all items from the {{FontFaceSet}}’s [=FontFaceSet/set entries=],
552545
its {{[[LoadedFonts]]}} list,
553546
and its {{[[FailedFonts]]}} list.
554547
2. If the {{FontFaceSet}}’s {{[[LoadingFonts]]}} list is non-empty,
@@ -617,7 +610,7 @@ Events</h3>
617610
<tbody>
618611
<tr>
619612
<th>{{onloading}}
620-
<td>{{loading}}
613+
<td>{{loading!!event}}
621614
<tr>
622615
<th>{{onloadingdone}}
623616
<td>{{loadingdone}}
@@ -654,7 +647,7 @@ Events</h3>
654647
replace it with a fresh pending promise.
655648

656649
<li>
657-
Queue a task to <a>fire a font load event</a> named {{loading}} at <var>font face set</var>.
650+
Queue a task to <a>fire a font load event</a> named {{loading!!event}} at <var>font face set</var>.
658651
</ol>
659652

660653
When asked to <dfn>switch the FontFaceSet to loaded</dfn> for a given {{FontFaceSet}},
@@ -1031,7 +1024,7 @@ Worker FontFaceSources</h3>
10311024
<h3 id="document-font-face-set">
10321025
Interaction with CSS’s ''@font-face'' Rule</h3>
10331026

1034-
The set entries for a document's <a>font source</a>
1027+
The [=FontFaceSet/set entries=] for a document's <a>font source</a>
10351028
must be initially populated with all the <a>CSS-connected</a> {{FontFace}} objects
10361029
from all of the CSS ''@font-face'' rules in the document's stylesheets,
10371030
in document order.
@@ -1176,3 +1169,13 @@ Acknowledgments</h2>
11761169

11771170
Several members of the Google Fonts team provided helpful feedback on font load events,
11781171
as did Boris Zbarsky, Jonas Sicking and ms2ger.
1172+
1173+
<h2 class=no-num id=priv-sec>
1174+
Privacy & Security Considerations</h2>
1175+
1176+
The {{FontFaceSet}} object leaks information about the user's installed fonts,
1177+
but in the exact same way as the existing ''@font-face'' rule;
1178+
no new information is leaked,
1179+
or in any appreciable easier manner.
1180+
1181+
This specification introduces no new security considerations.

0 commit comments

Comments
 (0)