<?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>145149</bug_id>
          
          <creation_ts>2015-05-18 16:00:50 -0700</creation_ts>
          <short_desc>[Mac] All font lookups are flakey</short_desc>
          <delta_ts>2015-05-21 10:34:44 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=145180</see_also>
          <bug_file_loc></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 name="Myles C. Maxfield">mmaxfield</reporter>
          <assigned_to name="Myles C. Maxfield">mmaxfield</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1095719</commentid>
    <comment_count>0</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 16:00:50 -0700</bug_when>
    <thetext>On all OSes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095720</commentid>
    <comment_count>1</comment_count>
      <attachid>253350</attachid>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 16:03:16 -0700</bug_when>
    <thetext>Created attachment 253350
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095767</commentid>
    <comment_count>2</comment_count>
      <attachid>253350</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-05-18 18:00:40 -0700</bug_when>
    <thetext>Comment on attachment 253350
Patch

Clearing flags on attachment: 253350

Committed r184532: &lt;http://trac.webkit.org/changeset/184532&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095768</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-05-18 18:00:46 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095769</commentid>
    <comment_count>4</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 18:02:04 -0700</bug_when>
    <thetext>Reopened for the root cause.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095771</commentid>
    <comment_count>5</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 18:04:44 -0700</bug_when>
    <thetext>Fails when run after jquery/offset.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095778</commentid>
    <comment_count>6</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 18:21:25 -0700</bug_when>
    <thetext>Reduction of the font-weights test: &lt;div style=&quot;font-family: HelveticaNeue-Light; font-weight: 100;&quot;&gt;Font: HelveticaNeue-Light Weight: 100&lt;/div&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095795</commentid>
    <comment_count>7</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 19:47:58 -0700</bug_when>
    <thetext>reduction of the offset test:
&lt;script&gt;
testRunner.waitUntilDone()
window.setTimeout(function() {
    testRunner.notifyDone();
}, 13);
&lt;/script&gt;
&lt;h2 style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;asdf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095796</commentid>
    <comment_count>8</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 20:03:02 -0700</bug_when>
    <thetext>Running the test alone uses HelveticaNeue-Light, while running the two together uses HelveticaNeue-UltraLight</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095798</commentid>
    <comment_count>9</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 20:33:08 -0700</bug_when>
    <thetext>This is because the desiredFamilyToAvailableFamilyDictionary() cache inside fontWithFamily() in FontCacheMac is incorrect.

In particular, there are two exit points of this function. If our search item exists in the cache, we skip the first exit point, which may be the correct one to take.

A previous font may have skipped over the first exit point because of external information (weight, traits, etc). Because of this, we will insert this name into the cache. However, when the second font comes around, its external information may mean that it should take the first exit point. However, we notice that the family name is in the cache and skip the first exit point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095799</commentid>
    <comment_count>10</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 20:37:37 -0700</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=137539</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095805</commentid>
    <comment_count>11</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 20:51:56 -0700</bug_when>
    <thetext>platform/mac/fast/text/font-weights.html is the test in question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095806</commentid>
    <comment_count>12</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-18 20:52:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/21012406&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1096605</commentid>
    <comment_count>13</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-05-21 10:34:44 -0700</bug_when>
    <thetext>Fixed in https://bugs.webkit.org/show_bug.cgi?id=145180</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>253350</attachid>
            <date>2015-05-18 16:03:16 -0700</date>
            <delta_ts>2015-05-18 18:00:40 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-145149-20150518160314.patch</filename>
            <type>text/plain</type>
            <size>1286</size>
            <attacher name="Myles C. Maxfield">mmaxfield</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTg0NTE3CmRpZmYgLS1naXQgYS9MYXlvdXRUZXN0cy9DaGFu
Z2VMb2cgYi9MYXlvdXRUZXN0cy9DaGFuZ2VMb2cKaW5kZXggZWNjYzg2YmNjZTc4ZjgxZTQ4M2Ri
YzZkMDhmNGFlZmFhZDcwOGI1Ni4uMDcxNWY0MGI2NTRhNDI5ZmU0MjhmY2Y5NDc2OWU1ZDc5N2Y5
YjhkNSAxMDA2NDQKLS0tIGEvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCisrKyBiL0xheW91dFRlc3Rz
L0NoYW5nZUxvZwpAQCAtMSwzICsxLDEyIEBACisyMDE1LTA1LTE4ICBNeWxlcyBDLiBNYXhmaWVs
ZCAgPG1tYXhmaWVsZEBhcHBsZS5jb20+CisKKyAgICAgICAgcGxhdGZvcm0vbWFjL2Zhc3QvdGV4
dC9mb250LXdlaWdodHMuaHRtbCBpcyBmbGFrZXkKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTE0NTE0OQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9E
WSAoT09QUyEpLgorCisgICAgICAgICogcGxhdGZvcm0vbWFjL1Rlc3RFeHBlY3RhdGlvbnM6CisK
IDIwMTUtMDUtMTggIEZpbGlwIFBpemxvICA8ZnBpemxvQGFwcGxlLmNvbT4KIAogICAgICAgICBB
ZGQgYSBJbnQtb3ItQm9vbGVhbiBzcGVjdWxhdGlvb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