| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov | 3 * Copyright (C) 2006 Alexey Proskuryakov |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "platform/fonts/Font.h" | 31 #include "platform/fonts/Font.h" |
| 32 #include "platform/fonts/GlyphPage.h" | 32 #include "platform/fonts/GlyphPage.h" |
| 33 #include <ApplicationServices/ApplicationServices.h> | 33 #include <ApplicationServices/ApplicationServices.h> |
| 34 | 34 |
| 35 // Forward declare Mac SPIs. | 35 // Forward declare Mac SPIs. |
| 36 // Request for public API: rdar://13787589 | 36 // Request for public API: rdar://13787589 |
| 37 extern "C" { | 37 extern "C" { |
| 38 void CGFontGetGlyphsForUnichars(CGFontRef, const UniChar chars[], CGGlyph glyphs
[], size_t length); | 38 void CGFontGetGlyphsForUnichars(CGFontRef, const UniChar chars[], CGGlyph glyphs
[], size_t length); |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace blink { |
| 42 | 42 |
| 43 CFDictionaryRef SimpleFontData::getCFStringAttributes(TypesettingFeatures typese
ttingFeatures, FontOrientation orientation) const | 43 CFDictionaryRef SimpleFontData::getCFStringAttributes(TypesettingFeatures typese
ttingFeatures, FontOrientation orientation) const |
| 44 { | 44 { |
| 45 unsigned key = typesettingFeatures + 1; | 45 unsigned key = typesettingFeatures + 1; |
| 46 HashMap<unsigned, RetainPtr<CFDictionaryRef> >::AddResult addResult = m_CFSt
ringAttributes.add(key, RetainPtr<CFDictionaryRef>()); | 46 HashMap<unsigned, RetainPtr<CFDictionaryRef> >::AddResult addResult = m_CFSt
ringAttributes.add(key, RetainPtr<CFDictionaryRef>()); |
| 47 RetainPtr<CFDictionaryRef>& attributesDictionary = addResult.storedValue->va
lue; | 47 RetainPtr<CFDictionaryRef>& attributesDictionary = addResult.storedValue->va
lue; |
| 48 if (!addResult.isNewEntry) | 48 if (!addResult.isNewEntry) |
| 49 return attributesDictionary.get(); | 49 return attributesDictionary.get(); |
| 50 | 50 |
| 51 attributesDictionary.adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault,
4, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); | 51 attributesDictionary.adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault,
4, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 return haveGlyphs; | 198 return haveGlyphs; |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace WebCore | 201 } // namespace blink |
| OLD | NEW |