On all OSes.
Created attachment 253350 [details] Patch
Comment on attachment 253350 [details] Patch Clearing flags on attachment: 253350 Committed r184532: <http://trac.webkit.org/changeset/184532>
All reviewed patches have been landed. Closing bug.
Reopened for the root cause.
Fails when run after jquery/offset.html
Reduction of the font-weights test: <div style="font-family: HelveticaNeue-Light; font-weight: 100;">Font: HelveticaNeue-Light Weight: 100</div>
reduction of the offset test: <script> testRunner.waitUntilDone() window.setTimeout(function() { testRunner.notifyDone(); }, 13); </script> <h2 style="font-family: HelveticaNeue-Light;">asdf
Running the test alone uses HelveticaNeue-Light, while running the two together uses HelveticaNeue-UltraLight
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.
See https://bugs.webkit.org/show_bug.cgi?id=137539
platform/mac/fast/text/font-weights.html is the test in question.
<rdar://problem/21012406>
Fixed in https://bugs.webkit.org/show_bug.cgi?id=145180