Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: third_party/WebKit/Source/core/fetch/FontResource.h

Issue 1931393002: Introduce typeface cache in blink::FontCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip: others Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void setRevalidatingRequest(const ResourceRequest&) override; 52 void setRevalidatingRequest(const ResourceRequest&) override;
53 53
54 void allClientsAndObserversRemoved() override; 54 void allClientsAndObserversRemoved() override;
55 void startLoadLimitTimersIfNeeded(); 55 void startLoadLimitTimersIfNeeded();
56 56
57 void setCORSFailed() override { m_corsFailed = true; } 57 void setCORSFailed() override { m_corsFailed = true; }
58 bool isCORSFailed() const { return m_corsFailed; } 58 bool isCORSFailed() const { return m_corsFailed; }
59 String otsParsingMessage() const { return m_otsParsingMessage; } 59 String otsParsingMessage() const { return m_otsParsingMessage; }
60 60
61 bool ensureCustomFontData(); 61 bool ensureCustomFontData();
62 FontPlatformData platformDataFromCustomData(float size, bool bold, bool ital ic, FontOrientation = FontOrientation::Horizontal); 62 FontPlatformData platformDataFromCustomData(bool bold, bool italic, FontOrie ntation = FontOrientation::Horizontal);
63 63
64 protected: 64 protected:
65 bool isSafeToUnlock() const override; 65 bool isSafeToUnlock() const override;
66 66
67 private: 67 private:
68 class FontResourceFactory : public ResourceFactory { 68 class FontResourceFactory : public ResourceFactory {
69 public: 69 public:
70 FontResourceFactory() 70 FontResourceFactory()
71 : ResourceFactory(Resource::Font) { } 71 : ResourceFactory(Resource::Font) { }
72 72
(...skipping 27 matching lines...) Expand all
100 ~FontResourceClient() override {} 100 ~FontResourceClient() override {}
101 static bool isExpectedType(ResourceClient* client) { return client->getResou rceClientType() == FontType; } 101 static bool isExpectedType(ResourceClient* client) { return client->getResou rceClientType() == FontType; }
102 ResourceClientType getResourceClientType() const final { return FontType; } 102 ResourceClientType getResourceClientType() const final { return FontType; }
103 virtual void fontLoadShortLimitExceeded(FontResource*) {} 103 virtual void fontLoadShortLimitExceeded(FontResource*) {}
104 virtual void fontLoadLongLimitExceeded(FontResource*) {} 104 virtual void fontLoadLongLimitExceeded(FontResource*) {}
105 }; 105 };
106 106
107 } // namespace blink 107 } // namespace blink
108 108
109 #endif 109 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp ('k') | third_party/WebKit/Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698