Skip to content

Commit

Permalink
Fix "text preparation algorithm" to account for NaN
Browse files Browse the repository at this point in the history
The behavior was previously undefined when calling, for example,
ctx.fillText(text, x, y, NaN) or ctx.fillText(text, x, y, undefined).

Fixes #1452.
  • Loading branch information
xidachen authored and domenic committed Jun 22, 2016
1 parent 3fc5b01 commit c8afae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source
Expand Up @@ -60856,8 +60856,8 @@ transform. ack Shaun Morris. -->

<ol>

<li><p>If <var>maxWidth</var> was provided but is less than or equal to zero, return an
empty array.</p></li>
<li><p>If <var>maxWidth</var> was provided but is less than or equal to zero or equal to NaN,
return an empty array.</p></li>

<li><p>Replace all the <span data-x="space character">space characters</span> in <var>text</var> with U+0020 SPACE characters.</p></li>

Expand Down

0 comments on commit c8afae0

Please sign in to comment.