Changeset 147702 in webkit


Ignore:
Timestamp:
Apr 4, 2013 9:39:58 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

alternateFamilyName should return a null, not an empty value
https://bugs.webkit.org/show_bug.cgi?id=113987

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-04
Reviewed by Anders Carlsson.

The string object corresponding semantically to "no-value" is
a null string, not an empty string.

Fix alternateFamilyName() accordingly.

  • platform/graphics/FontCache.cpp:

(WebCore::alternateFamilyName):
(WebCore::FontCache::getCachedFontPlatformData):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147694 r147702  
     12013-04-04  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        alternateFamilyName should return a null, not an empty value
     4        https://bugs.webkit.org/show_bug.cgi?id=113987
     5
     6        Reviewed by Anders Carlsson.
     7
     8        The string object corresponding semantically to "no-value" is
     9        a null string, not an empty string.
     10
     11        Fix alternateFamilyName() accordingly.
     12
     13        * platform/graphics/FontCache.cpp:
     14        (WebCore::alternateFamilyName):
     15        (WebCore::FontCache::getCachedFontPlatformData):
     16
    1172013-04-04  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/FontCache.cpp

    r147689 r147702  
    179179#endif
    180180
    181     return emptyAtom;
     181    return nullAtom;
    182182}
    183183
     
    214214            // e.g., Arial/Helvetica, Courier/Courier New, etc.  Try looking up the font under the aliased name.
    215215            const AtomicString& alternateName = alternateFamilyName(familyName);
    216             if (!alternateName.isEmpty()) {
     216            if (!alternateName.isNull()) {
    217217                FontPlatformData* fontPlatformDataForAlternateName = getCachedFontPlatformData(fontDescription, alternateName, true);
    218218                // Lookup the key in the hash table again as the previous iterator may have
Note: See TracChangeset for help on using the changeset viewer.