Changeset 220746 in webkit


Ignore:
Timestamp:
Aug 15, 2017 10:15:47 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r219504.
https://bugs.webkit.org/show_bug.cgi?id=175580

Broke Arabic text shaping (Requested by mcatanzaro on
#webkit).

Reverted changeset:

"[HarfBuzz] Decomposed Vietnamese characters are rendered
incorrectly"
https://bugs.webkit.org/show_bug.cgi?id=174418
http://trac.webkit.org/changeset/219504

Location:
trunk
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220734 r220746  
     12017-08-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r219504.
     4        https://bugs.webkit.org/show_bug.cgi?id=175580
     5
     6        Broke Arabic text shaping (Requested by mcatanzaro on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[HarfBuzz] Decomposed Vietnamese characters are rendered
     12        incorrectly"
     13        https://bugs.webkit.org/show_bug.cgi?id=174418
     14        http://trac.webkit.org/changeset/219504
     15
    1162017-08-14  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r220740 r220746  
     12017-08-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r219504.
     4        https://bugs.webkit.org/show_bug.cgi?id=175580
     5
     6        Broke Arabic text shaping (Requested by mcatanzaro on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[HarfBuzz] Decomposed Vietnamese characters are rendered
     12        incorrectly"
     13        https://bugs.webkit.org/show_bug.cgi?id=174418
     14        http://trac.webkit.org/changeset/219504
     15
    1162017-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp

    r219504 r220746  
    161161}
    162162
     163static void normalizeCharacters(const TextRun& run, UChar* destination, unsigned length)
     164{
     165    unsigned position = 0;
     166    bool error = false;
     167    const UChar* source;
     168    String stringFor8BitRun;
     169    if (run.is8Bit()) {
     170        stringFor8BitRun = String::make16BitFrom8BitSource(run.characters8(), run.length());
     171        source = stringFor8BitRun.characters16();
     172    } else
     173        source = run.characters16();
     174
     175    while (position < length) {
     176        UChar32 character;
     177        unsigned nextPosition = position;
     178        U16_NEXT(source, nextPosition, length, character);
     179        // Don't normalize tabs as they are not treated as spaces for word-end.
     180        if (FontCascade::treatAsSpace(character) && character != '\t')
     181            character = ' ';
     182        else if (FontCascade::treatAsZeroWidthSpaceInComplexScript(character))
     183            character = zeroWidthSpace;
     184        U16_APPEND(destination, position, length, character, error);
     185        ASSERT_UNUSED(error, !error);
     186        position = nextPosition;
     187    }
     188}
     189
    163190HarfBuzzShaper::HarfBuzzShaper(const FontCascade* font, const TextRun& run)
    164191    : m_font(font)
     
    171198    , m_letterSpacing(font->letterSpacing())
    172199{
    173     setNormalizedBuffer();
     200    m_normalizedBuffer = std::make_unique<UChar[]>(m_run.length() + 1);
     201    m_normalizedBufferLength = m_run.length();
     202    normalizeCharacters(m_run, m_normalizedBuffer.get(), m_normalizedBufferLength);
    174203    setPadding(m_run.expansion());
    175204    setFontFeatures();
Note: See TracChangeset for help on using the changeset viewer.