| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  529     const FontDescription& fontDescription = m_font->fontDescription(); |  529     const FontDescription& fontDescription = m_font->fontDescription(); | 
|  530     const String& localeString = fontDescription.locale(); |  530     const String& localeString = fontDescription.locale(); | 
|  531     CString locale = localeString.latin1(); |  531     CString locale = localeString.latin1(); | 
|  532     const hb_language_t language = hb_language_from_string(locale.data(), locale
     .length()); |  532     const hb_language_t language = hb_language_from_string(locale.data(), locale
     .length()); | 
|  533  |  533  | 
|  534     RunSegmenter::RunSegmenterRange segmentRange = { |  534     RunSegmenter::RunSegmenterRange segmentRange = { | 
|  535         0, |  535         0, | 
|  536         0, |  536         0, | 
|  537         USCRIPT_INVALID_CODE, |  537         USCRIPT_INVALID_CODE, | 
|  538         OrientationIterator::OrientationInvalid, |  538         OrientationIterator::OrientationInvalid, | 
|  539         SmallCapsIterator::SmallCapsSameCase, |  539         SmallCapsIterator::SmallCapsSameCase }; | 
|  540         FontFallbackPriority::Invalid }; |  | 
|  541     RunSegmenter runSegmenter( |  540     RunSegmenter runSegmenter( | 
|  542         m_normalizedBuffer.get(), |  541         m_normalizedBuffer.get(), | 
|  543         m_normalizedBufferLength, |  542         m_normalizedBufferLength, | 
|  544         m_font->fontDescription().orientation(), |  543         m_font->fontDescription().orientation(), | 
|  545         fontDescription.variant()); |  544         fontDescription.variant()); | 
|  546  |  545  | 
|  547     Vector<UChar32> fallbackCharsHint; |  546     Vector<UChar32> fallbackCharsHint; | 
|  548  |  547  | 
|  549     // TODO: Check whether this treatAsZerowidthspace from the previous script |  548     // TODO: Check whether this treatAsZerowidthspace from the previous script | 
|  550     // segmentation plays a role here, does the new scriptRuniterator handle tha
     t correctly? |  549     // segmentation plays a role here, does the new scriptRuniterator handle tha
     t correctly? | 
|  551     while (runSegmenter.consume(&segmentRange)) { |  550     while (runSegmenter.consume(&segmentRange)) { | 
|  552         RefPtr<FontFallbackIterator> fallbackIterator = |  551         RefPtr<FontFallbackIterator> fallbackIterator = m_font->createFontFallba
     ckIterator(); | 
|  553             m_font->createFontFallbackIterator( |  | 
|  554             segmentRange.fontFallbackPriority); |  | 
|  555  |  552  | 
|  556         appendToHolesQueue(HolesQueueNextFont, 0, 0); |  553         appendToHolesQueue(HolesQueueNextFont, 0, 0); | 
|  557         appendToHolesQueue(HolesQueueRange, segmentRange.start, segmentRange.end
      - segmentRange.start); |  554         appendToHolesQueue(HolesQueueRange, segmentRange.start, segmentRange.end
      - segmentRange.start); | 
|  558  |  555  | 
|  559         const SimpleFontData* currentFont = nullptr; |  556         const SimpleFontData* currentFont = nullptr; | 
|  560         unsigned currentFontRangeFrom = 0; |  557         unsigned currentFontRangeFrom = 0; | 
|  561         unsigned currentFontRangeTo = 0; |  558         unsigned currentFontRangeTo = 0; | 
|  562  |  559  | 
|  563         bool fontCycleQueued = false; |  560         bool fontCycleQueued = false; | 
|  564         while (m_holesQueue.size()) { |  561         while (m_holesQueue.size()) { | 
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  800     } |  797     } | 
|  801  |  798  | 
|  802     // Don't need to check m_textRun.allowsTrailingExpansion() since it's covere
     d by !m_expansionOpportunityCount above |  799     // Don't need to check m_textRun.allowsTrailingExpansion() since it's covere
     d by !m_expansionOpportunityCount above | 
|  803     spacing += nextExpansionPerOpportunity(); |  800     spacing += nextExpansionPerOpportunity(); | 
|  804     m_isAfterExpansion = true; |  801     m_isAfterExpansion = true; | 
|  805     return spacing; |  802     return spacing; | 
|  806 } |  803 } | 
|  807  |  804  | 
|  808  |  805  | 
|  809 } // namespace blink |  806 } // namespace blink | 
| OLD | NEW |