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

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

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, 9 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/CSSSegmentedFontFace.h ('k') | Source/core/fetch/FontResource.h » ('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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 m_callbacks.swap(callbacks); 78 m_callbacks.swap(callbacks);
79 for (size_t index = 0; index < callbacks.size(); ++index) { 79 for (size_t index = 0; index < callbacks.size(); ++index) {
80 if (isLoaded()) 80 if (isLoaded())
81 callbacks[index]->notifyLoaded(this); 81 callbacks[index]->notifyLoaded(this);
82 else 82 else
83 callbacks[index]->notifyError(this); 83 callbacks[index]->notifyError(this);
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 void CSSSegmentedFontFace::fontLoadWaitLimitExceeded(CSSFontFace*)
89 {
90 m_fontSelector->fontLoaded();
91 pruneTable();
92 }
93
88 void CSSSegmentedFontFace::addFontFace(PassRefPtr<FontFace> prpFontFace, bool cs sConnected) 94 void CSSSegmentedFontFace::addFontFace(PassRefPtr<FontFace> prpFontFace, bool cs sConnected)
89 { 95 {
90 RefPtr<FontFace> fontFace = prpFontFace; 96 RefPtr<FontFace> fontFace = prpFontFace;
91 pruneTable(); 97 pruneTable();
92 fontFace->cssFontFace()->setSegmentedFontFace(this); 98 fontFace->cssFontFace()->setSegmentedFontFace(this);
93 if (cssConnected) { 99 if (cssConnected) {
94 m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace); 100 m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace);
95 } else { 101 } else {
96 // This is the only place in Blink that is using addReturnIterator. 102 // This is the only place in Blink that is using addReturnIterator.
97 FontFaceList::iterator iterator = m_fontFaces.addReturnIterator(fontFace ); 103 FontFaceList::iterator iterator = m_fontFaces.addReturnIterator(fontFace );
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (isLoading()) 219 if (isLoading())
214 m_callbacks.append(callback); 220 m_callbacks.append(callback);
215 else if (isLoaded()) 221 else if (isLoaded())
216 callback->notifyLoaded(this); 222 callback->notifyLoaded(this);
217 else 223 else
218 callback->notifyError(this); 224 callback->notifyError(this);
219 } 225 }
220 } 226 }
221 227
222 } 228 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.h ('k') | Source/core/fetch/FontResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698