Skip to content

Commit

Permalink
Update the offscreen transfer steps, and clarify lang rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
schenney-chromium committed Feb 3, 2025
1 parent c131fd6 commit 119a4c5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -66759,7 +66759,8 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);</code></pre>
</ol>
</li>
<li><p>Otherwise, the <span data-x="concept-CanvasTextDrawingStyles-font-language">font
language</span> is the value.</p></li>
language</span> is the value, with the semantics of the global <code
data-x="attr-lang">lang</code> attribute.</p></li>
</ol>

<p>When the object implementing the <code>CanvasTextDrawingStyles</code> interface is created,
Expand Down Expand Up @@ -71409,11 +71410,18 @@ interface <dfn interface>OffscreenCanvas</dfn> : <span>EventTarget</span> {
<li><p>Let <var>width</var> and <var>height</var> be the dimensions of <var>value</var>'s <span
data-x="offscreencanvas-bitmap">bitmap</span>.</p></li>

<li><p>Let <var>language</var> and <var>direction</var> be the values of <var>value</var>'s
<span data-x="offscreencanvas-inherited-lang">inherited language</span> and
<span data-x="offscreencanvas-inherited-direction">inherited direction</span>.</p></li>

<li><p>Unset <var>value</var>'s <span data-x="offscreencanvas-bitmap">bitmap</span>.</p></li>

<li><p>Set <var>dataHolder</var>.[[Width]] to <var>width</var> and
<var>dataHolder</var>.[[Height]] to <var>height</var>.</p></li>

<li><p>Set <var>dataHolder</var>.[[Language]] to <var>language</var> and
<var>dataHolder</var>.[[Direction]] to <var>direction</var>.</p></li>

<li><p>Set <var>dataHolder</var>.[[PlaceholderCanvas]] to be a weak reference to
<var>value</var>'s <span data-x="offscreencanvas-placeholder">placeholder <code>canvas</code>
element</span>, if <var>value</var> has one, or null if it does not.</p></li>
Expand All @@ -71427,6 +71435,11 @@ interface <dfn interface>OffscreenCanvas</dfn> : <span>EventTarget</span> {
rectangular array of <span>transparent black</span> pixels with width given by
<var>dataHolder</var>.[[Width]] and height given by <var>dataHolder</var>.[[Height]].</p></li>

<li><p>Set <var>value</var>'s <span data-x="offscreencanvas-inherited-lang">inherited
language</span> to <var>dataHolder</var>.[[Language]] and <span
data-x="offscreencanvas-inherited-direction">inherited direction</span> to
<var>dataHolder</var>.[[Direction]].</p></li>

<li><p>If <var>dataHolder</var>.[[PlaceholderCanvas]] is not null, set <var>value</var>'s <span
data-x="offscreencanvas-placeholder">placeholder <code>canvas</code> element</span> to
<var>dataHolder</var>.[[PlaceholderCanvas]] (while maintaining the weak reference
Expand Down

0 comments on commit 119a4c5

Please sign in to comment.