OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 { | 62 { |
63 if (m_font) | 63 if (m_font) |
64 m_font->removeClient(this); | 64 m_font->removeClient(this); |
65 pruneTable(); | 65 pruneTable(); |
66 } | 66 } |
67 | 67 |
68 void CSSFontFaceSource::pruneTable() | 68 void CSSFontFaceSource::pruneTable() |
69 { | 69 { |
70 if (m_fontDataTable.isEmpty()) | 70 if (m_fontDataTable.isEmpty()) |
71 return; | 71 return; |
| 72 |
72 HashMap<unsigned, SimpleFontData*>::iterator end = m_fontDataTable.end(); | 73 HashMap<unsigned, SimpleFontData*>::iterator end = m_fontDataTable.end(); |
73 for (HashMap<unsigned, SimpleFontData*>::iterator it = m_fontDataTable.begin
(); it != end; ++it) | 74 for (HashMap<unsigned, SimpleFontData*>::iterator it = m_fontDataTable.begin
(); it != end; ++it) |
74 GlyphPageTreeNode::pruneTreeCustomFontData(it->second); | 75 m_face->retireCustomFont(it->second); |
75 deleteAllValues(m_fontDataTable); | 76 |
76 m_fontDataTable.clear(); | 77 m_fontDataTable.clear(); |
77 } | 78 } |
78 | 79 |
79 bool CSSFontFaceSource::isLoaded() const | 80 bool CSSFontFaceSource::isLoaded() const |
80 { | 81 { |
81 if (m_font) | 82 if (m_font) |
82 return m_font->isLoaded(); | 83 return m_font->isLoaded(); |
83 return true; | 84 return true; |
84 } | 85 } |
85 | 86 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 m_svgFontFaceElement = element; | 201 m_svgFontFaceElement = element; |
201 } | 202 } |
202 | 203 |
203 bool CSSFontFaceSource::isSVGFontFaceSource() const | 204 bool CSSFontFaceSource::isSVGFontFaceSource() const |
204 { | 205 { |
205 return m_svgFontFaceElement || m_hasExternalSVGFont; | 206 return m_svgFontFaceElement || m_hasExternalSVGFont; |
206 } | 207 } |
207 #endif | 208 #endif |
208 | 209 |
209 } | 210 } |
OLD | NEW |