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

Side by Side Diff: Source/WebCore/css/CSSFontFaceSource.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.cpp ('k') | Source/WebCore/css/CSSFontSelector.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) 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
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
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 }
OLDNEW
« no previous file with comments | « Source/WebCore/css/CSSFontFace.cpp ('k') | Source/WebCore/css/CSSFontSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698