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

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

Issue 171823002: Make text visible when font loading takes longer than 3 seconds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/css/CSSSegmentedFontFace.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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 class CSSSegmentedFontFace : public RefCounted<CSSSegmentedFontFace> { 46 class CSSSegmentedFontFace : public RefCounted<CSSSegmentedFontFace> {
47 public: 47 public:
48 static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector, Fo ntTraitsMask traitsMask) { return adoptRef(new CSSSegmentedFontFace(selector, tr aitsMask)); } 48 static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector, Fo ntTraitsMask traitsMask) { return adoptRef(new CSSSegmentedFontFace(selector, tr aitsMask)); }
49 ~CSSSegmentedFontFace(); 49 ~CSSSegmentedFontFace();
50 50
51 CSSFontSelector* fontSelector() const { return m_fontSelector; } 51 CSSFontSelector* fontSelector() const { return m_fontSelector; }
52 FontTraitsMask traitsMask() const { return m_traitsMask; } 52 FontTraitsMask traitsMask() const { return m_traitsMask; }
53 53
54 void fontLoaded(CSSFontFace*); 54 void fontLoaded(CSSFontFace*);
55 void fontLoadWaitLimitExceeded(CSSFontFace*);
55 56
56 void addFontFace(PassRefPtr<FontFace>, bool cssConnected); 57 void addFontFace(PassRefPtr<FontFace>, bool cssConnected);
57 void removeFontFace(PassRefPtr<FontFace>); 58 void removeFontFace(PassRefPtr<FontFace>);
58 bool isEmpty() const { return m_fontFaces.isEmpty(); } 59 bool isEmpty() const { return m_fontFaces.isEmpty(); }
59 60
60 PassRefPtr<FontData> getFontData(const FontDescription&); 61 PassRefPtr<FontData> getFontData(const FontDescription&);
61 62
62 class LoadFontCallback : public RefCounted<LoadFontCallback> { 63 class LoadFontCallback : public RefCounted<LoadFontCallback> {
63 public: 64 public:
64 virtual ~LoadFontCallback() { } 65 virtual ~LoadFontCallback() { }
(...skipping 20 matching lines...) Expand all
85 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable; 86 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable;
86 // All non-CSS-connected FontFaces are stored after the CSS-connected ones. 87 // All non-CSS-connected FontFaces are stored after the CSS-connected ones.
87 FontFaceList m_fontFaces; 88 FontFaceList m_fontFaces;
88 FontFaceList::iterator m_firstNonCssConnectedFace; 89 FontFaceList::iterator m_firstNonCssConnectedFace;
89 Vector<RefPtr<LoadFontCallback> > m_callbacks; 90 Vector<RefPtr<LoadFontCallback> > m_callbacks;
90 }; 91 };
91 92
92 } // namespace WebCore 93 } // namespace WebCore
93 94
94 #endif // CSSSegmentedFontFace_h 95 #endif // CSSSegmentedFontFace_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698