Summary: | Remove code duplications in createFontCustomPlatformData() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Patrick R. Gansterer <paroga> | ||||
Component: | New Bugs | Assignee: | Patrick R. Gansterer <paroga> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Patrick R. Gansterer
2013-11-03 10:10:12 PST
Created attachment 215968 [details]
Patch
Comment on attachment 215968 [details] Patch 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. Comment on attachment 215968 [details] Patch Clearing flags on attachment: 215968 Committed r158623: <http://trac.webkit.org/changeset/158623> All reviewed patches have been landed. Closing bug. |