| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 // characters have been shaped, too. | 395 // characters have been shaped, too. |
| 396 currentClusterResult = currentClusterResult == Shaped ? Shap
ed : NotDef; | 396 currentClusterResult = currentClusterResult == Shaped ? Shap
ed : NotDef; |
| 397 } | 397 } |
| 398 continue; | 398 continue; |
| 399 } | 399 } |
| 400 // We've moved to a new cluster. | 400 // We've moved to a new cluster. |
| 401 previousClusterResult = currentClusterResult; | 401 previousClusterResult = currentClusterResult; |
| 402 currentClusterResult = glyphInfo[glyphIndex].codepoint == 0 ? NotDef
: Shaped; | 402 currentClusterResult = glyphInfo[glyphIndex].codepoint == 0 ? NotDef
: Shaped; |
| 403 } else { | 403 } else { |
| 404 // The code below operates on the "flanks"/changes between NotDef | 404 // The code below operates on the "flanks"/changes between NotDef |
| 405 // and Shaped. In order to keep the code below from explictly | 405 // and Shaped. In order to keep the code below from explicitly |
| 406 // dealing with character indices and run end, we explicitly | 406 // dealing with character indices and run end, we explicitly |
| 407 // terminate the cluster/run here by setting the result value to the | 407 // terminate the cluster/run here by setting the result value to the |
| 408 // opposite of what it was, leading to atChange turning true. | 408 // opposite of what it was, leading to atChange turning true. |
| 409 previousClusterResult = currentClusterResult; | 409 previousClusterResult = currentClusterResult; |
| 410 currentClusterResult = currentClusterResult == NotDef ? Shaped : Not
Def; | 410 currentClusterResult = currentClusterResult == NotDef ? Shaped : Not
Def; |
| 411 } | 411 } |
| 412 | 412 |
| 413 bool atChange = (previousClusterResult != currentClusterResult) && previ
ousClusterResult != Unknown; | 413 bool atChange = (previousClusterResult != currentClusterResult) && previ
ousClusterResult != Unknown; |
| 414 if (!atChange) | 414 if (!atChange) |
| 415 continue; | 415 continue; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 799 } |
| 800 | 800 |
| 801 // Don't need to check m_textRun.allowsTrailingExpansion() since it's covere
d by !m_expansionOpportunityCount above | 801 // Don't need to check m_textRun.allowsTrailingExpansion() since it's covere
d by !m_expansionOpportunityCount above |
| 802 spacing += nextExpansionPerOpportunity(); | 802 spacing += nextExpansionPerOpportunity(); |
| 803 m_isAfterExpansion = true; | 803 m_isAfterExpansion = true; |
| 804 return spacing; | 804 return spacing; |
| 805 } | 805 } |
| 806 | 806 |
| 807 | 807 |
| 808 } // namespace blink | 808 } // namespace blink |
| OLD | NEW |