[webkit-reviews] review denied: [Bug 33065] [chromium] Linux: add support for per-strike font render preferences : [Attachment 45949] changing NULL to 0 in a comment
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 6 13:39:06 PST 2010
Darin Fisher (:fishd, Google) <fishd at chromium.org> has denied Adam Langley
<agl at chromium.org>'s request for review:
Bug 33065: [chromium] Linux: add support for per-strike font render preferences
https://bugs.webkit.org/show_bug.cgi?id=33065
Attachment 45949: changing NULL to 0 in a comment
https://bugs.webkit.org/attachment.cgi?id=45949&action=review
------- Additional Comments from Darin Fisher (:fishd, Google)
<fishd at chromium.org>
> +++ 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.
More information about the webkit-reviews
mailing list