OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #import "config.h" | 30 #import "config.h" |
31 #import "platform/fonts/FontCache.h" | 31 #import "platform/fonts/FontCache.h" |
32 | 32 |
33 #import <AppKit/AppKit.h> | 33 #import <AppKit/AppKit.h> |
34 #import "RuntimeEnabledFeatures.h" | |
35 #import "platform/LayoutTestSupport.h" | 34 #import "platform/LayoutTestSupport.h" |
| 35 #import "platform/RuntimeEnabledFeatures.h" |
36 #import "platform/fonts/FontDescription.h" | 36 #import "platform/fonts/FontDescription.h" |
37 #import "platform/fonts/FontPlatformData.h" | 37 #import "platform/fonts/FontPlatformData.h" |
38 #import "platform/fonts/SimpleFontData.h" | 38 #import "platform/fonts/SimpleFontData.h" |
39 #import "platform/mac/WebFontCache.h" | 39 #import "platform/mac/WebFontCache.h" |
40 #import <wtf/MainThread.h> | 40 #import <wtf/MainThread.h> |
41 #import <wtf/StdLibExtras.h> | 41 #import <wtf/StdLibExtras.h> |
42 | 42 |
43 // Forward declare Mac SPIs. | 43 // Forward declare Mac SPIs. |
44 // Request for public API: rdar://13803570 | 44 // Request for public API: rdar://13803570 |
45 @interface NSFont (WebKitSPI) | 45 @interface NSFont (WebKitSPI) |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 // FontPlatformData::font() can be null for the case of Chromium out-of-proc
ess font loading. | 224 // FontPlatformData::font() can be null for the case of Chromium out-of-proc
ess font loading. |
225 // In that case, we don't want to use the platformData. | 225 // In that case, we don't want to use the platformData. |
226 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo
rmFont, size, syntheticBold, syntheticOblique, fontDescription.orientation(), fo
ntDescription.widthVariant())); | 226 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo
rmFont, size, syntheticBold, syntheticOblique, fontDescription.orientation(), fo
ntDescription.widthVariant())); |
227 if (!platformData->font()) | 227 if (!platformData->font()) |
228 return 0; | 228 return 0; |
229 return platformData.leakPtr(); | 229 return platformData.leakPtr(); |
230 } | 230 } |
231 | 231 |
232 } // namespace WebCore | 232 } // namespace WebCore |
OLD | NEW |