[Webkit-unassigned] [Bug 33065] [chromium] Linux: add support for per-strike font render preferences

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 6 13:39:09 PST 2010


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


Darin Fisher (:fishd, Google) <fishd at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45949|review?                     |review-
               Flag|                            |




--- Comment #17 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-01-06 13:39:07 PST ---
(From update of attachment 45949)
> +++ b/WebCore/platform/graphics/chromium/FontRenderStyle.h
...
> +struct FontRenderStyle {
> +    enum {
> +      kNoPreference = 2,
> +    };

nit: indent by 4 spaces.

kNoPreference should be NoPreference without the "k" prefix.


> +++ b/WebKit/chromium/public/gtk/WebFontInfo.h
...
>      WEBKIT_API static WebCString familyForChars(const WebUChar* characters, size_t numCharacters);
> +    // Fill out the given WebFontRenderStyle with the user's preferences for

^^^ nit: please insert a new line after familyForChars.


> +    WEBKIT_API static void renderStyleForStrike(WebFontRenderStyle* result, const char* family, int sizeAndStyle);

nit: isn't it better style to list out parameters last?  or perhaps this should
just be a return value?

renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle*
result);


> +++ b/WebKit/chromium/public/linux/WebFontRenderStyle.h
> +++ b/WebKit/chromium/public/linux/WebSandboxSupport.h
...
> +    virtual void getRenderStyleForStrike(WebFontRenderStyle* style, const char* family, int sizeAndStyle) = 0;

ditto... seems like out params should be listed last.


> +void WebFontInfo::renderStyleForStrike(WebFontRenderStyle* out, const char* family, int sizeAndStyle)
> +{
> +    bool isBold = sizeAndStyle & 1;
> +    bool isItalic = sizeAndStyle & 2;
> +    int pixelSize = sizeAndStyle >> 2;

are there no constants that can be used in place of these magic numbers?

> +++ b/WebKit/chromium/src/linux/WebFontRenderStyle.cpp
...
> +using WebCore::FontRenderStyle;
> +
> +namespace WebKit {
> +
> +void WebFontRenderStyle::toFontRenderStyle(WebCore::FontRenderStyle* out)

nit: no need for the WebCore:: prefix above.

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