| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 do { | 572 do { |
| 573 const UChar* currentCharacterPosition = iterator.characters(); | 573 const UChar* currentCharacterPosition = iterator.characters(); |
| 574 const SimpleFontData* currentFontData = nextFontData; | 574 const SimpleFontData* currentFontData = nextFontData; |
| 575 UScriptCode currentScript = nextScript; | 575 UScriptCode currentScript = nextScript; |
| 576 | 576 |
| 577 UChar32 lastCharacter = character; | 577 UChar32 lastCharacter = character; |
| 578 for (iterator.advance(); iterator.consume(character); iterator.advance()
) { | 578 for (iterator.advance(); iterator.consume(character); iterator.advance()
) { |
| 579 if (Character::treatAsZeroWidthSpace(character)) | 579 if (Character::treatAsZeroWidthSpace(character)) |
| 580 continue; | 580 continue; |
| 581 if ((U_GET_GC_MASK(character) & U_GC_M_MASK) | 581 if ((U_GET_GC_MASK(character) & U_GC_M_MASK) |
| 582 && (Character::isUnicodeVariationSelector(character) | 582 && currentFontData->canRenderCombiningCharacterSequence( |
| 583 || currentFontData->canRenderCombiningCharacterSequence( | 583 currentCharacterPosition, |
| 584 currentCharacterPosition, | 584 iterator.glyphEnd() - currentCharacterPosition)) |
| 585 iterator.glyphEnd() - currentCharacterPosition))) | |
| 586 continue; | 585 continue; |
| 587 | 586 |
| 588 nextFontData = font->glyphDataForCharacter(character, false, isSpace
Normalize).fontData; | 587 nextFontData = font->glyphDataForCharacter(character, false, isSpace
Normalize).fontData; |
| 589 nextScript = uscript_getScript(character, &errorCode); | 588 nextScript = uscript_getScript(character, &errorCode); |
| 590 if (U_FAILURE(errorCode)) | 589 if (U_FAILURE(errorCode)) |
| 591 return false; | 590 return false; |
| 592 if (lastCharacter == zeroWidthJoinerCharacter) | 591 if (lastCharacter == zeroWidthJoinerCharacter) |
| 593 currentFontData = nextFontData; | 592 currentFontData = nextFontData; |
| 594 if ((nextFontData != currentFontData) || ((currentScript != nextScri
pt) && (nextScript != USCRIPT_INHERITED) && (!uscript_hasScript(character, curre
ntScript)))) | 593 if ((nextFontData != currentFontData) || ((currentScript != nextScri
pt) && (nextScript != USCRIPT_INHERITED) && (!uscript_hasScript(character, curre
ntScript)))) |
| 595 break; | 594 break; |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 // possibly invalid from, to arguments. | 1191 // possibly invalid from, to arguments. |
| 1193 if (!foundToX && !foundFromX) | 1192 if (!foundToX && !foundFromX) |
| 1194 fromX = toX = 0; | 1193 fromX = toX = 0; |
| 1195 | 1194 |
| 1196 if (fromX < toX) | 1195 if (fromX < toX) |
| 1197 return FloatRect(point.x() + fromX, point.y(), toX - fromX, height); | 1196 return FloatRect(point.x() + fromX, point.y(), toX - fromX, height); |
| 1198 return FloatRect(point.x() + toX, point.y(), fromX - toX, height); | 1197 return FloatRect(point.x() + toX, point.y(), fromX - toX, height); |
| 1199 } | 1198 } |
| 1200 | 1199 |
| 1201 } // namespace blink | 1200 } // namespace blink |
| OLD | NEW |