[webkit-reviews] review granted: [Bug 73474] [WinCairo] Correct SimpleFontData for Font Height : [Attachment 117257] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 30 13:04:50 PST 2011
Adam Roben (:aroben) <aroben at apple.com> has granted Brent Fulgham
<bfulgham at webkit.org>'s request for review:
Bug 73474: [WinCairo] Correct SimpleFontData for Font Height
https://bugs.webkit.org/show_bug.cgi?id=73474
Attachment 117257: Patch
https://bugs.webkit.org/attachment.cgi?id=117257&action=review
------- Additional Comments from Adam Roben (:aroben) <aroben at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=117257&action=review
> Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp:80
> + if (!wcscmp(faceName, L"Times") || !wcscmp(faceName, L"Helvetica") ||
!wcscmp(faceName, L"Courier"))
> + ascent += floorf(((ascent + descent) * 0.15f) + 0.5f);
> +
> + return ascent;
You could use an early return instead, something like:
if (wcscmp(...) || wcscmp(...) || wcscmp(...))
return ascent;
return ascent + floorf(...);
More information about the webkit-reviews
mailing list