[webkit-reviews] review granted: [Bug 71846] [chromium] Separate image encoding from dataURL construction : [Attachment 114135] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 8 12:53:10 PST 2011


Adam Barth <abarth at webkit.org> has granted noel gordon
<noel.gordon at gmail.com>'s request for review:
Bug 71846: [chromium] Separate image encoding from dataURL construction
https://bugs.webkit.org/show_bug.cgi?id=71846

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

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=114135&action=review


> Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:366
> +    Vector<unsigned char>* encodedImage = static_cast<Vector<unsigned
char>*>(output);

Crazy!	We can't be consistent about the type?

> Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:-390
> -    base64Encode(*reinterpret_cast<Vector<char>*>(&encodedImage),
base64Data);

I see.	Frowns.

> Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:401
> +    return "data:" + mimeType + ";base64," + base64Data;

Should we CRASH or ASSERT or something that mimeType doesn't have a ; or a ,
character?

> Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:408
> +    Vector<char> encodedImage, base64Data;

WebKit doesn't usually use compound declarations.


More information about the webkit-reviews mailing list