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

Side by Side Diff: Source/core/css/CSSFontSelector.h

Issue 63713002: Initiate webfont download right after style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix zoom-zoom-coords.xhtml Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class FontResource; 42 class FontResource;
43 class Document; 43 class Document;
44 class FontDescription; 44 class FontDescription;
45 class StyleRuleFontFace; 45 class StyleRuleFontFace;
46 46
47 class FontLoader { 47 class FontLoader {
48 public: 48 public:
49 explicit FontLoader(ResourceFetcher*); 49 explicit FontLoader(ResourceFetcher*);
50 50
51 void addFontToBeginLoading(FontResource*); 51 void addFontToBeginLoading(FontResource*);
52 void loadPendingFonts();
52 53
53 void clearResourceFetcher(); 54 void clearResourceFetcher();
54 55
55 private: 56 private:
56 void beginLoadTimerFired(Timer<FontLoader>*); 57 void beginLoadTimerFired(Timer<FontLoader>*);
57 58
58 Timer<FontLoader> m_beginLoadingTimer; 59 Timer<FontLoader> m_beginLoadingTimer;
59 Vector<ResourcePtr<FontResource> > m_fontsToBeginLoading; 60 Vector<ResourcePtr<FontResource> > m_fontsToBeginLoading;
60 ResourceFetcher* m_resourceFetcher; 61 ResourceFetcher* m_resourceFetcher;
61 }; 62 };
(...skipping 18 matching lines...) Expand all
80 81
81 void fontLoaded(); 82 void fontLoaded();
82 virtual void fontCacheInvalidated(); 83 virtual void fontCacheInvalidated();
83 84
84 virtual void registerForInvalidationCallbacks(FontSelectorClient*); 85 virtual void registerForInvalidationCallbacks(FontSelectorClient*);
85 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*); 86 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*);
86 87
87 Document* document() const { return m_document; } 88 Document* document() const { return m_document; }
88 89
89 void beginLoadingFontSoon(FontResource*); 90 void beginLoadingFontSoon(FontResource*);
91 void loadPendingFonts();
90 92
91 private: 93 private:
92 explicit CSSFontSelector(Document*); 94 explicit CSSFontSelector(Document*);
93 95
94 void dispatchInvalidationCallbacks(); 96 void dispatchInvalidationCallbacks();
95 97
96 Document* m_document; 98 Document* m_document;
97 // FIXME: Move to Document or StyleEngine. 99 // FIXME: Move to Document or StyleEngine.
98 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache; 100 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache;
99 HashSet<FontSelectorClient*> m_clients; 101 HashSet<FontSelectorClient*> m_clients;
100 102
101 FontLoader m_fontLoader; 103 FontLoader m_fontLoader;
102 }; 104 };
103 105
104 } // namespace WebCore 106 } // namespace WebCore
105 107
106 #endif // CSSFontSelector_h 108 #endif // CSSFontSelector_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698