| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 m_traits.style() == FontStyleNormal && | 121 m_traits.style() == FontStyleNormal && |
| 122 desiredTraits.style() == FontStyleItalic); | 122 desiredTraits.style() == FontStyleItalic); |
| 123 | 123 |
| 124 for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); | 124 for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); |
| 125 it != m_fontFaces.rend(); ++it) { | 125 it != m_fontFaces.rend(); ++it) { |
| 126 if (!(*it)->cssFontFace()->isValid()) | 126 if (!(*it)->cssFontFace()->isValid()) |
| 127 continue; | 127 continue; |
| 128 if (RefPtr<SimpleFontData> faceFontData = | 128 if (RefPtr<SimpleFontData> faceFontData = |
| 129 (*it)->cssFontFace()->getFontData(requestedFontDescription)) { | 129 (*it)->cssFontFace()->getFontData(requestedFontDescription)) { |
| 130 ASSERT(!faceFontData->isSegmented()); | 130 ASSERT(!faceFontData->isSegmented()); |
| 131 if (faceFontData->isCustomFont()) | 131 if (faceFontData->isCustomFont()) { |
| 132 fontData->appendFace(adoptRef(new FontDataForRangeSet( | 132 fontData->appendFace(adoptRef(new FontDataForRangeSet( |
| 133 faceFontData.release(), (*it)->cssFontFace()->ranges()))); | 133 std::move(faceFontData), (*it)->cssFontFace()->ranges()))); |
| 134 else | 134 } else { |
| 135 fontData->appendFace(adoptRef(new FontDataForRangeSetFromCache( | 135 fontData->appendFace(adoptRef(new FontDataForRangeSetFromCache( |
| 136 faceFontData.release(), (*it)->cssFontFace()->ranges()))); | 136 std::move(faceFontData), (*it)->cssFontFace()->ranges()))); |
| 137 } |
| 137 } | 138 } |
| 138 } | 139 } |
| 139 if (fontData->numFaces()) { | 140 if (fontData->numFaces()) { |
| 140 // No release, we have a reference to an object in the cache which should | 141 // No release, we have a reference to an object in the cache which should |
| 141 // retain the ref count it has. | 142 // retain the ref count it has. |
| 142 return fontData; | 143 return fontData; |
| 143 } | 144 } |
| 144 | 145 |
| 145 return nullptr; | 146 return nullptr; |
| 146 } | 147 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 190 } |
| 190 } | 191 } |
| 191 | 192 |
| 192 DEFINE_TRACE(CSSSegmentedFontFace) { | 193 DEFINE_TRACE(CSSSegmentedFontFace) { |
| 193 visitor->trace(m_fontSelector); | 194 visitor->trace(m_fontSelector); |
| 194 visitor->trace(m_firstNonCssConnectedFace); | 195 visitor->trace(m_firstNonCssConnectedFace); |
| 195 visitor->trace(m_fontFaces); | 196 visitor->trace(m_fontFaces); |
| 196 } | 197 } |
| 197 | 198 |
| 198 } // namespace blink | 199 } // namespace blink |
| OLD | NEW |