| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 SelectObject(hdc, oldFont); | 84 SelectObject(hdc, oldFont); |
| 85 ReleaseDC(0, hdc); | 85 ReleaseDC(0, hdc); |
| 86 | 86 |
| 87 return; | 87 return; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void SimpleFontData::platformCommonDestroy() | 90 void SimpleFontData::platformCommonDestroy() |
| 91 { | 91 { |
| 92 // We don't hash this on Win32, so it's effectively owned by us. | 92 // We don't hash this on Win32, so it's effectively owned by us. |
| 93 delete m_smallCapsFontData; | 93 delete m_smallCapsFontData; |
| 94 m_smallCapsFontData = 0; |
| 94 | 95 |
| 95 ScriptFreeCache(&m_scriptCache); | 96 ScriptFreeCache(&m_scriptCache); |
| 96 delete m_scriptFontProperties; | 97 delete m_scriptFontProperties; |
| 97 } | 98 } |
| 98 | 99 |
| 99 SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDes
cription) const | 100 SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDes
cription) const |
| 100 { | 101 { |
| 101 if (!m_smallCapsFontData) { | 102 if (!m_smallCapsFontData) { |
| 102 float smallCapsHeight = cSmallCapsFontSizeMultiplier * m_font.size(); | 103 float smallCapsHeight = cSmallCapsFontSizeMultiplier * m_font.size(); |
| 103 if (isCustomFont()) { | 104 if (isCustomFont()) { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 SelectObject(dc, m_font.hfont()); | 198 SelectObject(dc, m_font.hfont()); |
| 198 ScriptGetFontProperties(dc, scriptCache(), m_scriptFontProperties); | 199 ScriptGetFontProperties(dc, scriptCache(), m_scriptFontProperties); |
| 199 RestoreDC(dc, -1); | 200 RestoreDC(dc, -1); |
| 200 ReleaseDC(0, dc); | 201 ReleaseDC(0, dc); |
| 201 } | 202 } |
| 202 } | 203 } |
| 203 return m_scriptFontProperties; | 204 return m_scriptFontProperties; |
| 204 } | 205 } |
| 205 | 206 |
| 206 } | 207 } |
| OLD | NEW |