Skip to content

Commit ae94ec5

Browse files
annevkdomenic
authored andcommitted
Remove unnecessary security check from measureText()
Fonts have no origins. This was missed in 440a8eb. Fixes #3992.
1 parent 32df557 commit ae94ec5

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

source

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63155,17 +63155,8 @@ v6DVT (also check for '- -' bits in the part above) -->
6315563155
argument, <var>text</var>. When the method is invoked, the user agent must run the
6315663156
<span>text preparation algorithm</span>, passing it <var>text</var> and the object implementing
6315763157
the <code>CanvasText</code> interface, and then using the returned <span>inline box</span> must
63158-
create a new <code>TextMetrics</code> object with members behaving as described in the following
63159-
list.
63160-
<!--ADD-TOPIC:Security-->
63161-
If doing these measurements requires using a font that has an <span>origin</span> that is not the
63162-
<span data-x="same origin">same</span> as that of the <code>Document</code> object that owns the
63163-
<code>canvas</code> element (even if "using a font" means just checking if that font has a
63164-
particular glyph in it before falling back to another font), then the method, when invoked, must
63165-
throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.
63166-
<!--REMOVE-TOPIC:Security-->
63167-
Otherwise, it must return the new <code>TextMetrics</code> object.
63168-
<ref spec=CSS>
63158+
return a new <code>TextMetrics</code> object with members behaving as described in the following
63159+
list: <ref spec=CSS>
6316963160
<!--INSERT FINGERPRINT-->
6317063161
</p>
6317163162

@@ -121549,6 +121540,7 @@ INSERT INTERFACES HERE
121549121540
Jules Cl&eacute;ment-Ripoche,
121550121541
Julian Reschke,
121551121542
Julio Lopez,
121543+
小勝 純 (Jun Kokatsu),
121552121544
Jun Yang (harttle),
121553121545
Jungkee Song,
121554121546
J&uuml;rgen Jeka,

0 commit comments

Comments
 (0)