[Webkit-unassigned] [Bug 116783] Use Vector instead of custom linked list for font families

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 26 17:29:14 PDT 2013


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





--- Comment #18 from Darin Adler <darin at apple.com>  2013-05-26 17:27:44 PST ---
(From update of attachment 202920)
View in context: https://bugs.webkit.org/attachment.cgi?id=202920&action=review

> Source/WebCore/platform/graphics/FontDescription.h:144
> +    void setOneFamily(const AtomicString& family) { ASSERT(m_families.size() == 1); m_families[0] = family; }

I am a little confused by this. How do callers know the families list already happens to be one family long in all the cases where this is used?

The name “set one family” also seems a little confusing to me. It sounds like this sets one of the families and leaves the rest alone. I would have maybe called this setSingleFamily. But really I am mystified by the way the code can assume there is only one family.

> Source/WebCore/platform/graphics/FontDescription.h:173
> -    FontFamily m_familyList; // The list of font families to be used.
> +    Vector<AtomicString, 1> m_families;

The old thing was two pointers. Isn’t Vector<AtomicString, 1> much bigger than that?

-- 
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