<?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>14251</bug_id>
          
          <creation_ts>2011-09-22 18:59:49 +0000</creation_ts>
          <short_desc>Stop allowing non-numeric values for fontSize</short_desc>
          <delta_ts>2011-09-22 20:58:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - HTML Editing APIs</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aryeh Gregor">ayg</reporter>
          <assigned_to name="Aryeh Gregor">ayg</assigned_to>
          <cc>ehsan</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact name="HTML Editing APIs spec bugbot">sideshowbarker+html-editing-api</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57172</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-09-22 18:59:49 +0000</bug_when>
    <thetext>fontSize is a mess.  Its values are only 1-7, and there&apos;s no way for us to fix that.  I currently try to allow other types of values, like pixel sizes and whatever, but it fails in various cases, and doesn&apos;t work with queryCommandValue().  I should allow only 1-7, like browsers do.  If we want saner font sizing, we should introduce a new command that takes pt instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57173</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2011-09-22 19:03:31 +0000</bug_when>
    <thetext>In the event you introduce a new command, please don&apos;t privilege pt.  It&apos;s used fairly commonly for font-size, but so are other units like px and em.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57181</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-09-22 19:42:07 +0000</bug_when>
    <thetext>em is not usable for a WYSIWYG editor, because its meaning varies depending on where you use it in the DOM.  So for instance,

  &lt;h1&gt;&lt;i&gt;foo&lt;/i&gt;&lt;/h1&gt;

there&apos;s a big difference between

  &lt;h1 style=font-size:1.2em&gt;&lt;i&gt;foo&lt;/i&gt;&lt;/h1&gt;

and

  &lt;h1&gt;&lt;i style=font-size:1.2em&gt;foo&lt;/i&gt;&lt;/h1&gt;

but there&apos;s no sensible way to decide which one is intended based on the selection.  Also, some commands can move tags around in the DOM, which again can change the meaning of em.

However, I don&apos;t see any reason to prohibit other absolute units like px or mm, since they&apos;re defined in a fixed ratio relative to pt anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57182</commentid>
    <comment_count>3</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-09-22 20:07:24 +0000</bug_when>
    <thetext>yes, I also think that we should disallow em and allow the rest in the new command.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57184</commentid>
    <comment_count>4</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2011-09-22 20:18:18 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; em is not usable for a WYSIWYG editor, because its meaning varies depending on
&gt; where you use it in the DOM.
...
&gt; However, I don&apos;t see any reason to prohibit other absolute units like px or mm,
&gt; since they&apos;re defined in a fixed ratio relative to pt anyway.

Makes sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57185</commentid>
    <comment_count>5</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-09-22 20:58:06 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/editing/rev/031902d853b9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>