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

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

Issue 1429713004: Implement CSS font-display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: failure does not mean loaded Created 5 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
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 bool CSSSegmentedFontFace::isValid() const 65 bool CSSSegmentedFontFace::isValid() const
66 { 66 {
67 // Valid if at least one font face is valid. 67 // Valid if at least one font face is valid.
68 for (const auto& fontFace : m_fontFaces) { 68 for (const auto& fontFace : m_fontFaces) {
69 if (fontFace->cssFontFace()->isValid()) 69 if (fontFace->cssFontFace()->isValid())
70 return true; 70 return true;
71 } 71 }
72 return false; 72 return false;
73 } 73 }
74 74
75 void CSSSegmentedFontFace::fontLoaded(CSSFontFace*) 75 void CSSSegmentedFontFace::fontFaceInvalidated()
76 { 76 {
77 pruneTable(); 77 pruneTable();
78 } 78 }
79
80 void CSSSegmentedFontFace::fontLoadWaitLimitExceeded(CSSFontFace*)
81 {
82 pruneTable();
83 }
84 79
85 void CSSSegmentedFontFace::addFontFace(PassRefPtrWillBeRawPtr<FontFace> prpFontF ace, bool cssConnected) 80 void CSSSegmentedFontFace::addFontFace(PassRefPtrWillBeRawPtr<FontFace> prpFontF ace, bool cssConnected)
86 { 81 {
87 RefPtrWillBeRawPtr<FontFace> fontFace = prpFontFace; 82 RefPtrWillBeRawPtr<FontFace> fontFace = prpFontFace;
88 pruneTable(); 83 pruneTable();
89 fontFace->cssFontFace()->setSegmentedFontFace(this); 84 fontFace->cssFontFace()->setSegmentedFontFace(this);
90 if (cssConnected) { 85 if (cssConnected) {
91 m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace); 86 m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace);
92 } else { 87 } else {
93 // This is the only place in Blink that is using addReturnIterator. 88 // This is the only place in Blink that is using addReturnIterator.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 195
201 DEFINE_TRACE(CSSSegmentedFontFace) 196 DEFINE_TRACE(CSSSegmentedFontFace)
202 { 197 {
203 #if ENABLE(OILPAN) 198 #if ENABLE(OILPAN)
204 visitor->trace(m_fontSelector); 199 visitor->trace(m_fontSelector);
205 visitor->trace(m_fontFaces); 200 visitor->trace(m_fontFaces);
206 #endif 201 #endif
207 } 202 }
208 203
209 } 204 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h ('k') | third_party/WebKit/Source/core/css/CSSValueKeywords.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698