[webkit-reviews] review granted: [Bug 123706] Remove code duplications in createFontCustomPlatformData() : [Attachment 215968] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 4 17:26:03 PST 2013


Darin Adler <darin at apple.com> has granted Patrick R. Gansterer
<paroga at paroga.com>'s request for review:
Bug 123706: Remove code duplications in createFontCustomPlatformData()
https://bugs.webkit.org/show_bug.cgi?id=123706

Attachment 215968: Patch
https://bugs.webkit.org/attachment.cgi?id=215968&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=215968&action=review


> Source/WebCore/loader/cache/CachedFont.cpp:103
> +	   OpenTypeSanitizer sanitizer(buffer);
> +	   RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize();

I would like this better as a single line:

    RefPtr<SharedBuffer> sanitizedBuffer =
OpenTypeSanitizer(buffer).sanitize();

> Source/WebCore/loader/cache/CachedFont.cpp:117
> +	   m_fontData = buffer ? createFontCustomPlatformData(*buffer) :
nullptr;

We could use an if statement instead of a ? : since we already know that
m_fontData is null here.


More information about the webkit-reviews mailing list