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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>36105</bug_id>
          
          <creation_ts>2010-03-14 21:56:36 -0700</creation_ts>
          <short_desc>Unevenly distributed space in justified text</short_desc>
          <delta_ts>2010-06-14 12:22:52 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>data:text/html,&lt;div style=&quot;font-family: ahem; text-align: justify; width: 290px; border: solid blue; font-size: 10px;&quot;&gt;l l l l l l l l l l l l &lt;span style=&quot;visibility: hidden;&quot;&gt;llllll</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>199538</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-03-14 21:56:36 -0700</bug_when>
    <thetext>When extra spacing needs to be added between words for text justification, WidthIterator (and the complex text implementations) distribute the extra space very unevenly: all word spaces but the last get the same number of pixels added to them, and the last space takes the remainder. See the URL for an example where all spaces are 16 pixels wide except the last one, which is only 10 pixels wide.

This may even be a regression (but a very old one).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199539</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-03-14 21:57:54 -0700</bug_when>
    <thetext>&lt;rdar://problem/7752961&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199546</commentid>
    <comment_count>2</comment_count>
      <attachid>50684</attachid>
    <who name="">mitz</who>
    <bug_when>2010-03-14 23:23:41 -0700</bug_when>
    <thetext>Created attachment 50684
Sketch of fix

Need to do this in the complex text code paths. Can save one roundf() per space by caching the result.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237716</commentid>
    <comment_count>3</comment_count>
      <attachid>58622</attachid>
    <who name="">mitz</who>
    <bug_when>2010-06-13 22:27:56 -0700</bug_when>
    <thetext>Created attachment 58622
Distribute justification padding more evenly</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237829</commentid>
    <comment_count>4</comment_count>
      <attachid>58622</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-06-14 08:14:15 -0700</bug_when>
    <thetext>Comment on attachment 58622
Distribute justification padding more evenly

r=me. I would, however, prefer at sentence independent from the file listing in the changelog that gives the gist of the change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237883</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-06-14 10:07:52 -0700</bug_when>
    <thetext>Fixed in &lt;http://trac.webkit.org/projects/webkit/changeset/61128&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237896</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-06-14 10:30:13 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/61128 might have broken Qt Linux Release</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237980</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-06-14 12:22:52 -0700</bug_when>
    <thetext>Yup.  Looks like the test fails on Qt.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>50684</attachid>
            <date>2010-03-14 23:23:41 -0700</date>
            <delta_ts>2010-06-13 22:27:56 -0700</delta_ts>
            <desc>Sketch of fix</desc>
            <filename>36105_r0.diff</filename>
            <type>text/plain</type>
            <size>1244</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvcGxhdGZvcm0vZ3JhcGhpY3MvV2lkdGhJdGVyYXRvci5jcHAKPT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PQotLS0gV2ViQ29yZS9wbGF0Zm9ybS9ncmFwaGljcy9XaWR0aEl0ZXJhdG9yLmNwcAkocmV2
aXNpb24gNTU5NzQpCisrKyBXZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL1dpZHRoSXRlcmF0b3Iu
Y3BwCSh3b3JraW5nIGNvcHkpCkBAIC01NCwxNSArNTQsMTUgQEAgV2lkdGhJdGVyYXRvcjo6V2lk
dGhJdGVyYXRvcihjb25zdCBGb250KgogICAgIGlmICghbV9wYWRkaW5nKQogICAgICAgICBtX3Bh
ZFBlclNwYWNlID0gMDsKICAgICBlbHNlIHsKLSAgICAgICAgZmxvYXQgbnVtU3BhY2VzID0gMDsK
KyAgICAgICAgaW50IG51bVNwYWNlcyA9IDA7CiAgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwg
cnVuLmxlbmd0aCgpOyBpKyspCiAgICAgICAgICAgICBpZiAoRm9udDo6dHJlYXRBc1NwYWNlKG1f
cnVuW2ldKSkKICAgICAgICAgICAgICAgICBudW1TcGFjZXMrKzsKIAotICAgICAgICBpZiAobnVt
U3BhY2VzID09IDApCisgICAgICAgIGlmICghbnVtU3BhY2VzKQogICAgICAgICAgICAgbV9wYWRQ
ZXJTcGFjZSA9IDA7CiAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIG1fcGFkUGVyU3BhY2UgPSBj
ZWlsZihtX3J1bi5wYWRkaW5nKCkgLyBudW1TcGFjZXMpOworICAgICAgICAgICAgbV9wYWRQZXJT
cGFjZSA9IG1fcGFkZGluZyAvIG51bVNwYWNlczsKICAgICB9CiB9CiAKQEAgLTE2Myw4ICsxNjMs
OSBAQCB2b2lkIFdpZHRoSXRlcmF0b3I6OmFkdmFuY2UoaW50IG9mZnNldCwgCiAgICAgICAgICAg
ICAgICAgICAgICAgICB3aWR0aCArPSBtX3BhZGRpbmc7CiAgICAgICAgICAgICAgICAgICAgICAg
ICBtX3BhZGRpbmcgPSAwOwogICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAg
ICAgICAgICAgICAgICAgd2lkdGggKz0gbV9wYWRQZXJTcGFjZTsKKyAgICAgICAgICAgICAgICAg
ICAgICAgIGZsb2F0IHByZXZpb3VzUGFkZGluZyA9IG1fcGFkZGluZzsKICAgICAgICAgICAgICAg
ICAgICAgICAgIG1fcGFkZGluZyAtPSBtX3BhZFBlclNwYWNlOworICAgICAgICAgICAgICAgICAg
ICAgICAgd2lkdGggKz0gcm91bmRmKHByZXZpb3VzUGFkZGluZykgLSByb3VuZGYobV9wYWRkaW5n
KTsKICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIH0KIAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>58622</attachid>
            <date>2010-06-13 22:27:56 -0700</date>
            <delta_ts>2010-06-14 08:14:15 -0700</delta_ts>
            <desc>Distribute justification padding more evenly</desc>
            <filename>36105_r1.diff</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64"></data>
<flag name="review"
          id="45000"
          type_id="1"
          status="+"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>