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

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

Issue 715363005: Remove FontPlatformData::m_widthVariant. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/RemoteFontFaceSource.cpp ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef FontResource_h 26 #ifndef FontResource_h
27 #define FontResource_h 27 #define FontResource_h
28 28
29 #include "core/fetch/ResourceClient.h" 29 #include "core/fetch/ResourceClient.h"
30 #include "core/fetch/ResourcePtr.h" 30 #include "core/fetch/ResourcePtr.h"
31 #include "platform/Timer.h" 31 #include "platform/Timer.h"
32 #include "platform/fonts/FontOrientation.h" 32 #include "platform/fonts/FontOrientation.h"
33 #include "platform/fonts/FontWidthVariant.h"
34 #include "wtf/OwnPtr.h" 33 #include "wtf/OwnPtr.h"
35 34
36 namespace blink { 35 namespace blink {
37 36
38 class Document; 37 class Document;
39 class ResourceFetcher; 38 class ResourceFetcher;
40 class FontPlatformData; 39 class FontPlatformData;
41 class FontCustomPlatformData; 40 class FontCustomPlatformData;
42 41
43 class FontResource final : public Resource { 42 class FontResource final : public Resource {
(...skipping 13 matching lines...) Expand all
57 bool exceedsFontLoadWaitLimit() const { return m_exceedsFontLoadWaitLimit; } 56 bool exceedsFontLoadWaitLimit() const { return m_exceedsFontLoadWaitLimit; }
58 57
59 bool loadScheduled() const { return m_state != Unloaded; } 58 bool loadScheduled() const { return m_state != Unloaded; }
60 void didScheduleLoad(); 59 void didScheduleLoad();
61 void didUnscheduleLoad(); 60 void didUnscheduleLoad();
62 61
63 void setCORSFailed() { m_corsFailed = true; } 62 void setCORSFailed() { m_corsFailed = true; }
64 bool isCORSFailed() const { return m_corsFailed; } 63 bool isCORSFailed() const { return m_corsFailed; }
65 64
66 bool ensureCustomFontData(); 65 bool ensureCustomFontData();
67 FontPlatformData platformDataFromCustomData(float size, bool bold, bool ital ic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth); 66 FontPlatformData platformDataFromCustomData(float size, bool bold, bool ital ic, FontOrientation = Horizontal);
68 67
69 protected: 68 protected:
70 virtual bool isSafeToUnlock() const override; 69 virtual bool isSafeToUnlock() const override;
71 70
72 private: 71 private:
73 virtual void checkNotify() override; 72 virtual void checkNotify() override;
74 void fontLoadWaitLimitCallback(Timer<FontResource>*); 73 void fontLoadWaitLimitCallback(Timer<FontResource>*);
75 74
76 enum State { Unloaded, LoadScheduled, LoadInitiated }; 75 enum State { Unloaded, LoadScheduled, LoadInitiated };
77 76
(...skipping 14 matching lines...) Expand all
92 static ResourceClientType expectedType() { return FontType; } 91 static ResourceClientType expectedType() { return FontType; }
93 virtual ResourceClientType resourceClientType() const override final { retur n expectedType(); } 92 virtual ResourceClientType resourceClientType() const override final { retur n expectedType(); }
94 virtual void fontLoaded(FontResource*) { } 93 virtual void fontLoaded(FontResource*) { }
95 virtual void didStartFontLoad(FontResource*) { } 94 virtual void didStartFontLoad(FontResource*) { }
96 virtual void fontLoadWaitLimitExceeded(FontResource*) { } 95 virtual void fontLoadWaitLimitExceeded(FontResource*) { }
97 }; 96 };
98 97
99 } 98 }
100 99
101 #endif 100 #endif
OLDNEW
« no previous file with comments | « Source/core/css/RemoteFontFaceSource.cpp ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698