<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21944</bug_id>
          
          <creation_ts>2013-05-06 21:30:01 +0000</creation_ts>
          <short_desc>Security on measureText is unneccessary</short_desc>
          <delta_ts>2015-07-10 14:38:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>CR HTML Canvas 2D Context</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/2dcontext/#dom-context-2d-measuretext</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>21943</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="rcabanie">cabanier</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>wseltzer+bugzilla</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87287</commentid>
    <comment_count>0</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2013-05-06 21:30:01 +0000</bug_when>
    <thetext>+++ This bug was initially created as a clone of Bug #21943 +++

The canvas 2d spec currently states that a font has to be local in order for measureText to work: 
If doing these measurements requires using a font that has an origin that is not the same as that of the Document object that owns the canvas element (even if &quot;using a font&quot; means just checking if that font has a particular glyph in it before falling back to another font), then the method must throw a SecurityError exception.
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-measuretext
http://www.w3.org/TR/2dcontext/#dom-context-2d-measuretext

After a small discussion on the mailing list, we agreed that the spec should not have this text. Instead it should be silent and rely on the general font loading algorithm that CSS specifies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88307</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-05-28 22:05:37 +0000</bug_when>
    <thetext>It definitely shouldn&apos;t be silent, but if the font loading infrastructure elsewhere in the platform defines this better, then yeah, we should just have a non-normative note here instead.

In any case, it should be the same text as we use elsewhere in the HTML spec for using fonts.

Where is font loading defined? (i.e. what can we rely on to make this just work?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88312</commentid>
    <comment_count>2</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2013-05-28 22:15:56 +0000</bug_when>
    <thetext> 
&gt; Where is font loading defined? (i.e. what can we rely on to make this just
&gt; work?)

I&apos;m unsure. From the discussion, it sounds like Anne is going to define this.

http://dev.w3.org/csswg/css-fonts/#same-origin-restriction was also mentioned but I&apos;m unclear if that will be the official definition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121945</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2015-07-10 14:38:22 +0000</bug_when>
    <thetext>https://lists.w3.org/Archives/Public/public-canvas-api/2013AprJun/0000.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>