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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 UnderLimit, | 100 UnderLimit, |
101 ShortLimitExceeded, | 101 ShortLimitExceeded, |
102 LongLimitExceeded, | 102 LongLimitExceeded, |
103 LoadLimitStateEnumMax | 103 LoadLimitStateEnumMax |
104 }; | 104 }; |
105 | 105 |
106 std::unique_ptr<FontCustomPlatformData> m_fontData; | 106 std::unique_ptr<FontCustomPlatformData> m_fontData; |
107 String m_otsParsingMessage; | 107 String m_otsParsingMessage; |
108 LoadLimitState m_loadLimitState; | 108 LoadLimitState m_loadLimitState; |
109 bool m_corsFailed; | 109 bool m_corsFailed; |
| 110 bool m_isCallbackDisabledForTesting; |
110 Timer<FontResource> m_fontLoadShortLimitTimer; | 111 Timer<FontResource> m_fontLoadShortLimitTimer; |
111 Timer<FontResource> m_fontLoadLongLimitTimer; | 112 Timer<FontResource> m_fontLoadLongLimitTimer; |
112 | 113 |
113 friend class MemoryCache; | 114 friend class MemoryCache; |
114 FRIEND_TEST_ALL_PREFIXES(ResourceFetcherTest, CacheAwareFontLoading); | 115 FRIEND_TEST_ALL_PREFIXES(ResourceFetcherTest, CacheAwareFontLoading); |
| 116 friend class CacheAwareFontDisplayTest; |
115 }; | 117 }; |
116 | 118 |
117 DEFINE_RESOURCE_TYPE_CASTS(Font); | 119 DEFINE_RESOURCE_TYPE_CASTS(Font); |
118 | 120 |
119 class FontResourceClient : public ResourceClient { | 121 class FontResourceClient : public ResourceClient { |
120 public: | 122 public: |
121 ~FontResourceClient() override {} | 123 ~FontResourceClient() override {} |
122 static bool isExpectedType(ResourceClient* client) { | 124 static bool isExpectedType(ResourceClient* client) { |
123 return client->getResourceClientType() == FontType; | 125 return client->getResourceClientType() == FontType; |
124 } | 126 } |
(...skipping 10 matching lines...) Expand all Loading... |
135 // Only the RemoteFontFaceSources clients can prevent lowering of loading | 137 // Only the RemoteFontFaceSources clients can prevent lowering of loading |
136 // priority of the remote fonts. Set the default to true to prevent | 138 // priority of the remote fonts. Set the default to true to prevent |
137 // other clients from incorrectly returning false. | 139 // other clients from incorrectly returning false. |
138 return true; | 140 return true; |
139 } | 141 } |
140 }; | 142 }; |
141 | 143 |
142 } // namespace blink | 144 } // namespace blink |
143 | 145 |
144 #endif | 146 #endif |
OLD | NEW |