[Webkit-unassigned] [Bug 28024] New: Need AtomicStrings for the various font family names

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 5 12:18:10 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28024

           Summary: Need AtomicStrings for the various font family names
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org


Need AtomicStrings for the various font family names

In:
static int identifierForFamily(const AtomicString& family)
{
    DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive")); 
    DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy")); 
    DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace")); 
    DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif")); 
    DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif")); 

we use static locals.

A bunch of other places we just use c-string constants:

void CSSFontSelector::addFontFaceRule(const CSSFontFaceRule* fontFaceRule)
static FontData* fontDataForGenericFamily(Document* document, const
FontDescription& fontDescription, const AtomicString& familyName)
void CSSStyleSelector::applyProperty(int id, CSSValue *value)

This is error-prone and slower than necessary.

Should be easy to fix with a little .in file wired up through make_names.pl in
DerivedSources.make.  Also need to make sure that Page() calls
FontFamilyNames::init().

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list