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