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

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

Issue 928103002: Remove some unused functions in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git cl try Created 5 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
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.h ('k') | Source/core/css/parser/BisonCSSParser.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ASSERT(!faceFontData->isSegmented()); 152 ASSERT(!faceFontData->isSegmented());
153 appendFontData(fontData.get(), faceFontData.release(), (*it)->cssFon tFace()->ranges()); 153 appendFontData(fontData.get(), faceFontData.release(), (*it)->cssFon tFace()->ranges());
154 } 154 }
155 } 155 }
156 if (fontData->numRanges()) 156 if (fontData->numRanges())
157 return fontData; // No release, we have a reference to an object in the cache which should retain the ref count it has. 157 return fontData; // No release, we have a reference to an object in the cache which should retain the ref count it has.
158 158
159 return nullptr; 159 return nullptr;
160 } 160 }
161 161
162 bool CSSSegmentedFontFace::isLoading() const
163 {
164 for (const auto& fontFace : m_fontFaces) {
165 if (fontFace->loadStatus() == FontFace::Loading)
166 return true;
167 }
168 return false;
169 }
170
171 bool CSSSegmentedFontFace::isLoaded() const
172 {
173 for (const auto& fontFace : m_fontFaces) {
174 if (fontFace->loadStatus() != FontFace::Loaded)
175 return false;
176 }
177 return true;
178 }
179
180 void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescriptio n, UChar32 character) 162 void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescriptio n, UChar32 character)
181 { 163 {
182 for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); it != m_fontF aces.rend(); ++it) { 164 for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); it != m_fontF aces.rend(); ++it) {
183 if ((*it)->loadStatus() != FontFace::Unloaded) 165 if ((*it)->loadStatus() != FontFace::Unloaded)
184 break; 166 break;
185 if ((*it)->cssFontFace()->maybeScheduleFontLoad(fontDescription, charact er)) 167 if ((*it)->cssFontFace()->maybeScheduleFontLoad(fontDescription, charact er))
186 break; 168 break;
187 } 169 }
188 } 170 }
189 171
(...skipping 16 matching lines...) Expand all
206 188
207 void CSSSegmentedFontFace::trace(Visitor* visitor) 189 void CSSSegmentedFontFace::trace(Visitor* visitor)
208 { 190 {
209 #if ENABLE(OILPAN) 191 #if ENABLE(OILPAN)
210 visitor->trace(m_fontSelector); 192 visitor->trace(m_fontSelector);
211 visitor->trace(m_fontFaces); 193 visitor->trace(m_fontFaces);
212 #endif 194 #endif
213 } 195 }
214 196
215 } 197 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.h ('k') | Source/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698