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

Side by Side Diff: Source/WebCore/css/CSSFontFace.cpp

Issue 7932007: Merge 94508 - <rdar://problem/10071256> Retain retired custom fonts until the next style recalc (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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/WebCore/css/CSSFontFace.h ('k') | Source/WebCore/css/CSSFontFaceSource.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 for (size_t i = 0; i < size; ++i) { 111 for (size_t i = 0; i < size; ++i) {
112 if (SimpleFontData* result = m_sources[i]->getFontData(fontDescription, syntheticBold, syntheticItalic, fontSelector)) { 112 if (SimpleFontData* result = m_sources[i]->getFontData(fontDescription, syntheticBold, syntheticItalic, fontSelector)) {
113 m_activeSource = m_sources[i]; 113 m_activeSource = m_sources[i];
114 return result; 114 return result;
115 } 115 }
116 } 116 }
117 117
118 return 0; 118 return 0;
119 } 119 }
120 120
121 void CSSFontFace::retireCustomFont(SimpleFontData* fontData)
122 {
123 if (m_segmentedFontFaces.isEmpty()) {
124 GlyphPageTreeNode::pruneTreeCustomFontData(fontData);
125 delete fontData;
126 return;
127 }
128
129 // Use one of the CSSSegmentedFontFaces' font selector. They all have
130 // the same font selector.
131 (*m_segmentedFontFaces.begin())->fontSelector()->retireCustomFont(fontData);
132 }
133
121 #if ENABLE(SVG_FONTS) 134 #if ENABLE(SVG_FONTS)
122 bool CSSFontFace::hasSVGFontFaceSource() const 135 bool CSSFontFace::hasSVGFontFaceSource() const
123 { 136 {
124 for (unsigned i = 0; i < m_sources.size(); i++) { 137 for (unsigned i = 0; i < m_sources.size(); i++) {
125 if (m_sources[i]->isSVGFontFaceSource()) 138 if (m_sources[i]->isSVGFontFaceSource())
126 return true; 139 return true;
127 } 140 }
128 return false; 141 return false;
129 } 142 }
130 #endif 143 #endif
131 144
132 } 145 }
133 146
OLDNEW
« no previous file with comments | « Source/WebCore/css/CSSFontFace.h ('k') | Source/WebCore/css/CSSFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698