OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2009 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 if (!pageNumber) { | 113 if (!pageNumber) { |
114 ASSERT(!m_filledPrimaryPage); | 114 ASSERT(!m_filledPrimaryPage); |
115 page = &m_primaryPage; | 115 page = &m_primaryPage; |
116 m_filledPrimaryPage = true; | 116 m_filledPrimaryPage = true; |
117 } else { | 117 } else { |
118 if (m_pages) { | 118 if (m_pages) { |
119 page = m_pages->get(pageNumber); | 119 page = m_pages->get(pageNumber); |
120 if (page) | 120 if (page) |
121 return page; | 121 return page; |
122 } else { | 122 } else { |
123 m_pages = wrapUnique(new HashMap<int, std::unique_ptr<GlyphMetricsPage>>); | 123 m_pages = |
| 124 WTF::wrapUnique(new HashMap<int, std::unique_ptr<GlyphMetricsPage>>); |
124 } | 125 } |
125 page = new GlyphMetricsPage; | 126 page = new GlyphMetricsPage; |
126 m_pages->set(pageNumber, wrapUnique(page)); | 127 m_pages->set(pageNumber, WTF::wrapUnique(page)); |
127 } | 128 } |
128 | 129 |
129 // Fill in the whole page with the unknown glyph information. | 130 // Fill in the whole page with the unknown glyph information. |
130 for (unsigned i = 0; i < GlyphMetricsPage::size; i++) | 131 for (unsigned i = 0; i < GlyphMetricsPage::size; i++) |
131 page->setMetricsForIndex(i, unknownMetrics()); | 132 page->setMetricsForIndex(i, unknownMetrics()); |
132 | 133 |
133 return page; | 134 return page; |
134 } | 135 } |
135 | 136 |
136 } // namespace blink | 137 } // namespace blink |
137 | 138 |
138 #endif | 139 #endif |
OLD | NEW |