| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } else if (!RuntimeEnabledFeatures:: | 110 } else if (!RuntimeEnabledFeatures:: |
| 111 renderUnicodeControlCharactersEnabled() && | 111 renderUnicodeControlCharactersEnabled() && |
| 112 Character::legacyTreatAsZeroWidthSpaceInComplexScript( | 112 Character::legacyTreatAsZeroWidthSpaceInComplexScript( |
| 113 character)) { | 113 character)) { |
| 114 character = zeroWidthSpaceCharacter; | 114 character = zeroWidthSpaceCharacter; |
| 115 } else if (Character::treatAsZeroWidthSpaceInComplexScript(character)) { | 115 } else if (Character::treatAsZeroWidthSpaceInComplexScript(character)) { |
| 116 character = zeroWidthSpaceCharacter; | 116 character = zeroWidthSpaceCharacter; |
| 117 } | 117 } |
| 118 | 118 |
| 119 U16_APPEND(destination, *destinationLength, length, character, error); | 119 U16_APPEND(destination, *destinationLength, length, character, error); |
| 120 ASSERT_UNUSED(error, !error); | 120 DCHECK(!error); |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 HarfBuzzShaper::HarfBuzzShaper(const Font* font, const TextRun& run) | 124 HarfBuzzShaper::HarfBuzzShaper(const Font* font, const TextRun& run) |
| 125 : Shaper(font, run), m_normalizedBufferLength(0) { | 125 : Shaper(font, run), m_normalizedBufferLength(0) { |
| 126 m_normalizedBuffer = wrapArrayUnique(new UChar[m_textRun.length() + 1]); | 126 m_normalizedBuffer = wrapArrayUnique(new UChar[m_textRun.length() + 1]); |
| 127 normalizeCharacters(m_textRun, m_textRun.length(), m_normalizedBuffer.get(), | 127 normalizeCharacters(m_textRun, m_textRun.length(), m_normalizedBuffer.get(), |
| 128 &m_normalizedBufferLength); | 128 &m_normalizedBufferLength); |
| 129 setFontFeatures(); | 129 setFontFeatures(); |
| 130 } | 130 } |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 segmentRange.script, !fallbackIterator->hasNext())) | 699 segmentRange.script, !fallbackIterator->hasNext())) |
| 700 DLOG(ERROR) << "Shape result extraction failed."; | 700 DLOG(ERROR) << "Shape result extraction failed."; |
| 701 | 701 |
| 702 hb_buffer_reset(harfBuzzBuffer.get()); | 702 hb_buffer_reset(harfBuzzBuffer.get()); |
| 703 } | 703 } |
| 704 } | 704 } |
| 705 return result.release(); | 705 return result.release(); |
| 706 } | 706 } |
| 707 | 707 |
| 708 } // namespace blink | 708 } // namespace blink |
| OLD | NEW |