| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. | 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 208 } |
| 209 | 209 |
| 210 return charactersSoFar; | 210 return charactersSoFar; |
| 211 } | 211 } |
| 212 | 212 |
| 213 void ShapeResult::fallbackFonts(HashSet<const SimpleFontData*>* fallback) const | 213 void ShapeResult::fallbackFonts(HashSet<const SimpleFontData*>* fallback) const |
| 214 { | 214 { |
| 215 ASSERT(fallback); | 215 ASSERT(fallback); |
| 216 ASSERT(m_primaryFont); | 216 ASSERT(m_primaryFont); |
| 217 for (unsigned i = 0; i < m_runs.size(); ++i) { | 217 for (unsigned i = 0; i < m_runs.size(); ++i) { |
| 218 if (m_runs[i] && m_runs[i]->m_fontData != m_primaryFont | 218 if (m_runs[i] && m_runs[i]->m_fontData |
| 219 && m_runs[i]->m_fontData != m_primaryFont |
| 219 && !m_runs[i]->m_fontData->isTextOrientationFallbackOf(m_primaryFont
.get())) { | 220 && !m_runs[i]->m_fontData->isTextOrientationFallbackOf(m_primaryFont
.get())) { |
| 220 fallback->add(m_runs[i]->m_fontData.get()); | 221 fallback->add(m_runs[i]->m_fontData.get()); |
| 221 } | 222 } |
| 222 } | 223 } |
| 223 } | 224 } |
| 224 | 225 |
| 225 void ShapeResult::applySpacing(ShapeResultSpacing& spacing, const TextRun& textR
un) | 226 void ShapeResult::applySpacing(ShapeResultSpacing& spacing, const TextRun& textR
un) |
| 226 { | 227 { |
| 227 float offsetX, offsetY; | 228 float offsetX, offsetY; |
| 228 float& offset = spacing.isVerticalOffset() ? offsetY : offsetX; | 229 float& offset = spacing.isVerticalOffset() ? offsetY : offsetX; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 break; | 351 break; |
| 351 } | 352 } |
| 352 } | 353 } |
| 353 } | 354 } |
| 354 // If we didn't find an existing slot to place it, append. | 355 // If we didn't find an existing slot to place it, append. |
| 355 if (run) | 356 if (run) |
| 356 m_runs.append(std::move(run)); | 357 m_runs.append(std::move(run)); |
| 357 } | 358 } |
| 358 | 359 |
| 359 } // namespace blink | 360 } // namespace blink |
| OLD | NEW |