Skip to content

Commit 069202b

Browse files
committed
[css-font-loading] Be more careful about setting FontFace user-visible state in a task, rather than just 'asynchronously'.
1 parent abf9f11 commit 069202b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

css-font-loading/Overview.bs

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ The Constructor</h3>
176176
according to the grammars of the corresponding descriptors of the CSS ''@font-face'' rule.
177177
If any of them fail to parse correctly,
178178
reject <var>font face's</var> <a>[<!---->[FontStatusPromise]]</a> with a DOMException named "SyntaxError" and abort these steps.
179-
Otherwise, set <var>font face's</var> corresponding attributes to the serialization of the parsed values.
179+
Otherwise, queue a task to set <var>font face's</var> corresponding attributes to the serialization of the parsed values.
180180

181181
<li>
182182
If the <a>source</a> argument was a <a>DOMString</a>,
@@ -199,8 +199,8 @@ The Constructor</h3>
199199

200200
<li>
201201
If <var>font face's</var> <a>[<!---->[Data]]</a> slot is not <code>null</code>,
202-
set <var>font face's</var> <a for=FontFace>status</a> attribute to "loading",
203-
and attempt to parse the data in it as a font.
202+
queue a task to set <var>font face's</var> <a for=FontFace>status</a> attribute to "loading".
203+
Attempt to parse the data in it as a font.
204204
When this is completed,
205205
successfully or not,
206206
await a stable state,

css-font-loading/Overview.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h3 class="heading settled heading" data-level=2.1 id=font-face-constructor><spa
292292
according to the grammars of the corresponding descriptors of the CSS <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> rule.
293293
If any of them fail to parse correctly,
294294
reject <var>font face’s</var> <a data-link-type=idl href=#dom-fontface-fontstatuspromise title=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with a DOMException named "SyntaxError" and abort these steps.
295-
Otherwise, set <var>font face’s</var> corresponding attributes to the serialization of the parsed values.
295+
Otherwise, queue a task to set <var>font face’s</var> corresponding attributes to the serialization of the parsed values.
296296

297297
<li>
298298
If the <a data-link-type=idl href=#dom-fontfacefontface-source title=source>source</a> argument was a <a data-link-type=idl title=domstring>DOMString</a>,
@@ -315,8 +315,8 @@ <h3 class="heading settled heading" data-level=2.1 id=font-face-constructor><spa
315315

316316
<li>
317317
If <var>font face’s</var> <a data-link-type=idl href=#dom-fontface-data title=[[data]]>[[Data]]</a> slot is not <code>null</code>,
318-
set <var>font face’s</var> <a data-link-for=FontFace data-link-type=idl href=#dom-fontface-status title=status>status</a> attribute to "loading",
319-
and attempt to parse the data in it as a font.
318+
queue a task to set <var>font face’s</var> <a data-link-for=FontFace data-link-type=idl href=#dom-fontface-status title=status>status</a> attribute to "loading".
319+
Attempt to parse the data in it as a font.
320320
When this is completed,
321321
successfully or not,
322322
await a stable state,

0 commit comments

Comments
 (0)