| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 struct FontCustomPlatformData; | 41 struct FontCustomPlatformData; |
| 42 | 42 |
| 43 class CachedFont : public CachedResource { | 43 class CachedFont : public CachedResource { |
| 44 public: | 44 public: |
| 45 CachedFont(const ResourceRequest&); | 45 CachedFont(const ResourceRequest&); |
| 46 virtual ~CachedFont(); | 46 virtual ~CachedFont(); |
| 47 | 47 |
| 48 virtual void load(CachedResourceLoader*, const ResourceLoaderOptions&); | 48 virtual void load(CachedResourceLoader*, const ResourceLoaderOptions&); |
| 49 | 49 |
| 50 virtual void didAddClient(CachedResourceClient*); | 50 virtual void didAddClient(CachedResourceClient*); |
| 51 virtual void data(PassRefPtr<ResourceBuffer> data, bool allDataReceived); | |
| 52 | 51 |
| 53 virtual void allClientsRemoved(); | 52 virtual void allClientsRemoved(); |
| 54 void beginLoadIfNeeded(CachedResourceLoader* dl); | 53 void beginLoadIfNeeded(CachedResourceLoader* dl); |
| 55 bool stillNeedsLoad() const { return !m_loadInitiated; } | 54 bool stillNeedsLoad() const { return !m_loadInitiated; } |
| 56 | 55 |
| 57 bool ensureCustomFontData(); | 56 bool ensureCustomFontData(); |
| 58 FontPlatformData platformDataFromCustomData(float size, bool bold, bool ital
ic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRendering
Mode = NormalRenderingMode); | 57 FontPlatformData platformDataFromCustomData(float size, bool bold, bool ital
ic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRendering
Mode = NormalRenderingMode); |
| 59 | 58 |
| 60 #if ENABLE(SVG_FONTS) | 59 #if ENABLE(SVG_FONTS) |
| 61 bool ensureSVGFontData(); | 60 bool ensureSVGFontData(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 80 public: | 79 public: |
| 81 virtual ~CachedFontClient() { } | 80 virtual ~CachedFontClient() { } |
| 82 static CachedResourceClientType expectedType() { return FontType; } | 81 static CachedResourceClientType expectedType() { return FontType; } |
| 83 virtual CachedResourceClientType resourceClientType() const { return expecte
dType(); } | 82 virtual CachedResourceClientType resourceClientType() const { return expecte
dType(); } |
| 84 virtual void fontLoaded(CachedFont*) { } | 83 virtual void fontLoaded(CachedFont*) { } |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } | 86 } |
| 88 | 87 |
| 89 #endif | 88 #endif |
| OLD | NEW |