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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 Resource* create(const ResourceRequest& request, const ResourceLoaderOpt
ions& options, const String& charset) const override | 71 Resource* create(const ResourceRequest& request, const ResourceLoaderOpt
ions& options, const String& charset) const override |
72 { | 72 { |
73 return new FontResource(request, options); | 73 return new FontResource(request, options); |
74 } | 74 } |
75 }; | 75 }; |
76 FontResource(const ResourceRequest&, const ResourceLoaderOptions&); | 76 FontResource(const ResourceRequest&, const ResourceLoaderOptions&); |
77 | 77 |
78 void checkNotify() override; | 78 void checkNotify() override; |
79 void fontLoadShortLimitCallback(Timer<FontResource>*); | 79 void fontLoadShortLimitCallback(Timer<FontResource>*); |
80 void fontLoadLongLimitCallback(Timer<FontResource>*); | 80 void fontLoadLongLimitCallback(Timer<FontResource>*); |
| 81 void destroyDecodedDataIfPossible() override; |
81 | 82 |
82 bool isSafeToUnlock() const override; | 83 bool isSafeToUnlock() const override; |
83 | 84 |
84 enum LoadLimitState { UnderLimit, ShortLimitExceeded, LongLimitExceeded }; | 85 enum LoadLimitState { UnderLimit, ShortLimitExceeded, LongLimitExceeded }; |
85 | 86 |
86 std::unique_ptr<FontCustomPlatformData> m_fontData; | 87 std::unique_ptr<FontCustomPlatformData> m_fontData; |
87 String m_otsParsingMessage; | 88 String m_otsParsingMessage; |
88 LoadLimitState m_loadLimitState; | 89 LoadLimitState m_loadLimitState; |
89 bool m_corsFailed; | 90 bool m_corsFailed; |
90 Timer<FontResource> m_fontLoadShortLimitTimer; | 91 Timer<FontResource> m_fontLoadShortLimitTimer; |
(...skipping 11 matching lines...) Expand all Loading... |
102 ResourceClientType getResourceClientType() const final { return FontType; } | 103 ResourceClientType getResourceClientType() const final { return FontType; } |
103 virtual void fontLoadShortLimitExceeded(FontResource*) {} | 104 virtual void fontLoadShortLimitExceeded(FontResource*) {} |
104 virtual void fontLoadLongLimitExceeded(FontResource*) {} | 105 virtual void fontLoadLongLimitExceeded(FontResource*) {} |
105 | 106 |
106 DEFINE_INLINE_VIRTUAL_TRACE() {} | 107 DEFINE_INLINE_VIRTUAL_TRACE() {} |
107 }; | 108 }; |
108 | 109 |
109 } // namespace blink | 110 } // namespace blink |
110 | 111 |
111 #endif | 112 #endif |
OLD | NEW |