Changeset 215737 in webkit


Ignore:
Timestamp:
Apr 25, 2017 9:35:39 AM (7 years ago)
Author:
mmaxfield@apple.com
Message:

Add performance test for FontCache::systemFallbackForCharacters()
https://bugs.webkit.org/show_bug.cgi?id=170842

Reviewed by Tim Horton.

PerformanceTests:

  • Layout/word-joiner.html: Added.

Source/WebCore:

No new tests because there is no behavior change.

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript): Deleted.

  • platform/graphics/WidthCache.h:

(WebCore::WidthCache::add):
(WebCore::WidthCache::addSlowCase):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r215704 r215737  
     12017-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Add performance test for FontCache::systemFallbackForCharacters()
     4        https://bugs.webkit.org/show_bug.cgi?id=170842
     5
     6        Reviewed by Tim Horton.
     7
     8        * Layout/word-joiner.html: Added.
     9
    1102017-04-24  Saam Barati  <sbarati@apple.com>
    211
  • trunk/Source/WTF/ChangeLog

    r215722 r215737  
     12017-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Add performance test for FontCache::systemFallbackForCharacters()
     4        https://bugs.webkit.org/show_bug.cgi?id=170842
     5
     6        Reviewed by Tim Horton.
     7
     8        * wtf/unicode/CharacterNames.h:
     9
    1102017-04-24  Andy VanWagoner  <thetalecrafter@gmail.com>
    211
  • trunk/Source/WTF/wtf/unicode/CharacterNames.h

    r215417 r215737  
    9393const UChar whiteSesameDot = 0xFE46;
    9494const UChar whiteUpPointingTriangle = 0x25B3;
     95const UChar wordJoiner = 0x2060;
    9596const UChar yenSign = 0x00A5;
    9697const UChar zeroWidthJoiner = 0x200D;
     
    155156using WTF::Unicode::whiteSesameDot;
    156157using WTF::Unicode::whiteUpPointingTriangle;
     158using WTF::Unicode::wordJoiner;
    157159using WTF::Unicode::yenSign;
    158160using WTF::Unicode::zeroWidthJoiner;
  • trunk/Source/WebCore/ChangeLog

    r215736 r215737  
     12017-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Add performance test for FontCache::systemFallbackForCharacters()
     4        https://bugs.webkit.org/show_bug.cgi?id=170842
     5
     6        Reviewed by Tim Horton.
     7
     8        No new tests because there is no behavior change.
     9
     10        * platform/graphics/FontCascade.h:
     11        (WebCore::FontCascade::treatAsZeroWidthSpace):
     12        (WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript): Deleted.
     13        * platform/graphics/WidthCache.h:
     14        (WebCore::WidthCache::add):
     15        (WebCore::WidthCache::addSlowCase):
     16
    1172017-04-25  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/FontCascade.h

    r213614 r215737  
    262262    FontSelector* fontSelector() const;
    263263    static bool treatAsSpace(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == noBreakSpace; }
    264     static bool treatAsZeroWidthSpace(UChar c) { return treatAsZeroWidthSpaceInComplexScript(c) || c == 0x200c || c == 0x200d; }
    265     static bool treatAsZeroWidthSpaceInComplexScript(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == softHyphen || c == zeroWidthSpace || (c >= 0x200e && c <= 0x200f) || (c >= 0x202a && c <= 0x202e) || c == zeroWidthNoBreakSpace || c == objectReplacementCharacter; }
     264    static bool treatAsZeroWidthSpace(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == softHyphen || c == zeroWidthSpace || (c >= 0x200e && c <= 0x200f) || (c >= 0x202a && c <= 0x202e) || c == zeroWidthNoBreakSpace || c == objectReplacementCharacter || c == zeroWidthNonJoiner || c == zeroWidthJoiner; }
    266265    static bool canReceiveTextEmphasis(UChar32);
    267266
  • trunk/Source/WebCore/platform/graphics/WidthCache.h

    r215417 r215737  
    141141        // The width cache is not really profitable unless we're doing expensive glyph transformations.
    142142        if (!hasKerningOrLigatures)
    143             return 0;
     143            return nullptr;
    144144        // Word spacing and letter spacing can change the width of a word.
    145145        if (hasWordSpacingOrLetterSpacing)
    146             return 0;
     146            return nullptr;
    147147        // Since this is just a width cache, we don't have enough information to satisfy glyph queries.
    148148        if (glyphOverflow)
    149             return 0;
     149            return nullptr;
    150150        // If we allow tabs and a tab occurs inside a word, the width of the word varies based on its position on the line.
    151151        if (run.allowTabs())
    152             return 0;
     152            return nullptr;
    153153        if (static_cast<unsigned>(run.length()) > SmallStringKey::capacity())
    154             return 0;
     154            return nullptr;
    155155
    156156        if (m_countdown > 0) {
    157157            --m_countdown;
    158             return 0;
     158            return nullptr;
    159159        }
    160160
     
    208208        m_singleCharMap.clear();
    209209        m_map.clear();
    210         return 0;
     210        return nullptr;
    211211    }
    212212
Note: See TracChangeset for help on using the changeset viewer.