Changeset 77173 in webkit


Ignore:
Timestamp:
Jan 31, 2011 4:30:40 PM (13 years ago)
Author:
mitz@apple.com
Message:

Inter-ideograph justification should apply to hiragana and katakana as well
https://bugs.webkit.org/show_bug.cgi?id=53464

Reviewed by Adele Peterson.

Source/WebCore:

Changed the test for expansion opportunities from isCJKIdeograph() to isCJKIdeographOrSymbol().

  • platform/graphics/Font.cpp:

(WebCore::Font::expansionOpportunityCount):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advance):

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

LayoutTests:

  • platform/mac/fast/text/justify-ideograph-complex-expected.checksum:
  • platform/mac/fast/text/justify-ideograph-complex-expected.png:
  • platform/mac/fast/text/justify-ideograph-simple-expected.checksum:
  • platform/mac/fast/text/justify-ideograph-simple-expected.png:
  • platform/mac/fast/text/justify-ideograph-vertical-expected.checksum:
  • platform/mac/fast/text/justify-ideograph-vertical-expected.png:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r77166 r77173  
     12011-01-31  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Inter-ideograph justification should apply to hiragana and katakana as well
     6        https://bugs.webkit.org/show_bug.cgi?id=53464
     7
     8        * platform/mac/fast/text/justify-ideograph-complex-expected.checksum:
     9        * platform/mac/fast/text/justify-ideograph-complex-expected.png:
     10        * platform/mac/fast/text/justify-ideograph-simple-expected.checksum:
     11        * platform/mac/fast/text/justify-ideograph-simple-expected.png:
     12        * platform/mac/fast/text/justify-ideograph-vertical-expected.checksum:
     13        * platform/mac/fast/text/justify-ideograph-vertical-expected.png:
     14
    1152011-01-31  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/LayoutTests/platform/mac/fast/text/justify-ideograph-complex-expected.checksum

    r76743 r77173  
    1 0091eb5817d8785a9a9f3686f84932e6
     1c93199bc034d2dde1298c069944eaaf8
  • trunk/LayoutTests/platform/mac/fast/text/justify-ideograph-simple-expected.checksum

    r76743 r77173  
    1 8494b6ff162ad9c96022a5f8fe2dc0d3
     158b2f0acbbfbf297b467c6beae080d12
  • trunk/LayoutTests/platform/mac/fast/text/justify-ideograph-vertical-expected.checksum

    r76760 r77173  
    1 ee4ee736b11358ca0278cf9b558d021a
     10d64f4dc9cb92a79dceaa387a0ae9c63
  • trunk/Source/WebCore/ChangeLog

    r77171 r77173  
     12011-01-31  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Inter-ideograph justification should apply to hiragana and katakana as well
     6        https://bugs.webkit.org/show_bug.cgi?id=53464
     7
     8        Changed the test for expansion opportunities from isCJKIdeograph() to isCJKIdeographOrSymbol().
     9
     10        * platform/graphics/Font.cpp:
     11        (WebCore::Font::expansionOpportunityCount):
     12        * platform/graphics/WidthIterator.cpp:
     13        (WebCore::WidthIterator::advance):
     14        * platform/graphics/mac/ComplexTextController.cpp:
     15        (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
     16
    1172011-01-31  Dimitri Glazkov  <dglazkov@chromium.org>
    218
  • trunk/Source/WebCore/platform/graphics/Font.cpp

    r76768 r77173  
    475475                i++;
    476476            }
    477             if (expandAroundIdeographs && isCJKIdeograph(character)) {
     477            if (expandAroundIdeographs && isCJKIdeographOrSymbol(character)) {
    478478                if (!isAfterExpansion)
    479479                    count++;
     
    496496                i--;
    497497            }
    498             if (expandAroundIdeographs && isCJKIdeograph(character)) {
     498            if (expandAroundIdeographs && isCJKIdeographOrSymbol(character)) {
    499499                if (!isAfterExpansion)
    500500                    count++;
  • trunk/Source/WebCore/platform/graphics/WidthIterator.cpp

    r76768 r77173  
    176176            static bool expandAroundIdeographs = Font::canExpandAroundIdeographsInComplexText();
    177177            bool treatAsSpace = Font::treatAsSpace(c);
    178             if (treatAsSpace || (expandAroundIdeographs && Font::isCJKIdeograph(c))) {
     178            if (treatAsSpace || (expandAroundIdeographs && Font::isCJKIdeographOrSymbol(c))) {
    179179                // Distribute the run's total expansion evenly over all expansion opportunities in the run.
    180180                if (m_expansion && (m_run.allowsTrailingExpansion() || (m_run.ltr() && currentCharacter + clusterLength < static_cast<size_t>(m_run.length()))
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

    r77062 r77173  
    490490
    491491                // Handle justification and word-spacing.
    492                 if (treatAsSpace || Font::isCJKIdeograph(ch)) {
     492                if (treatAsSpace || Font::isCJKIdeographOrSymbol(ch)) {
    493493                    // Distribute the run's total expansion evenly over all expansion opportunities in the run.
    494494                    if (m_expansion && (!lastGlyph || m_run.allowsTrailingExpansion())) {
Note: See TracChangeset for help on using the changeset viewer.