| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 bool isCORSFailed() const { return m_corsFailed; } | 60 bool isCORSFailed() const { return m_corsFailed; } |
| 61 String otsParsingMessage() const { return m_otsParsingMessage; } | 61 String otsParsingMessage() const { return m_otsParsingMessage; } |
| 62 | 62 |
| 63 bool ensureCustomFontData(); | 63 bool ensureCustomFontData(); |
| 64 FontPlatformData platformDataFromCustomData( | 64 FontPlatformData platformDataFromCustomData( |
| 65 float size, | 65 float size, |
| 66 bool bold, | 66 bool bold, |
| 67 bool italic, | 67 bool italic, |
| 68 FontOrientation = FontOrientation::Horizontal); | 68 FontOrientation = FontOrientation::Horizontal); |
| 69 | 69 |
| 70 void willReloadAfterDiskCacheMiss() override; |
| 71 |
| 70 private: | 72 private: |
| 71 class FontResourceFactory : public ResourceFactory { | 73 class FontResourceFactory : public ResourceFactory { |
| 72 public: | 74 public: |
| 73 FontResourceFactory() : ResourceFactory(Resource::Font) {} | 75 FontResourceFactory() : ResourceFactory(Resource::Font) {} |
| 74 | 76 |
| 75 Resource* create(const ResourceRequest& request, | 77 Resource* create(const ResourceRequest& request, |
| 76 const ResourceLoaderOptions& options, | 78 const ResourceLoaderOptions& options, |
| 77 const String& charset) const override { | 79 const String& charset) const override { |
| 78 return new FontResource(request, options); | 80 return new FontResource(request, options); |
| 79 } | 81 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 100 | 102 |
| 101 class FontResourceClient : public ResourceClient { | 103 class FontResourceClient : public ResourceClient { |
| 102 public: | 104 public: |
| 103 ~FontResourceClient() override {} | 105 ~FontResourceClient() override {} |
| 104 static bool isExpectedType(ResourceClient* client) { | 106 static bool isExpectedType(ResourceClient* client) { |
| 105 return client->getResourceClientType() == FontType; | 107 return client->getResourceClientType() == FontType; |
| 106 } | 108 } |
| 107 ResourceClientType getResourceClientType() const final { return FontType; } | 109 ResourceClientType getResourceClientType() const final { return FontType; } |
| 108 virtual void fontLoadShortLimitExceeded(FontResource*) {} | 110 virtual void fontLoadShortLimitExceeded(FontResource*) {} |
| 109 virtual void fontLoadLongLimitExceeded(FontResource*) {} | 111 virtual void fontLoadLongLimitExceeded(FontResource*) {} |
| 112 virtual void willReloadAfterDiskCacheMiss(const FontResource*) {} |
| 110 }; | 113 }; |
| 111 | 114 |
| 112 } // namespace blink | 115 } // namespace blink |
| 113 | 116 |
| 114 #endif | 117 #endif |
| OLD | NEW |