[webkit-reviews] review denied: [Bug 51811] Merge m_height and m_width members of ImageData into a common m_size member : [Attachment 77873] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 4 03:37:24 PST 2011


Andreas Kling <kling at webkit.org> has denied Renata Hodovan <reni at webkit.org>'s
request for review:
Bug 51811: Merge m_height and m_width members of ImageData into a common m_size
member
https://bugs.webkit.org/show_bug.cgi?id=51811

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

------- Additional Comments from Andreas Kling <kling at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=77873&action=review

> WebCore/ChangeLog:6
> +	   Merge m_height and m_width memebers of ImageData into the new m_size
member.

Typo, memebers -> members.

> WebCore/bindings/js/SerializedScriptValue.cpp:407
> -		   write(data->width());
> -		   write(data->height());
> +		   write(static_cast<uint32_t>(data->width()));
> +		   write(static_cast<uint32_t>(data->height()));

This is ugly.
We should change the format of serialized ImageData to "ImageDataTag
<width:int32_t><height:int32_t><length:uint32_t><data:uint8_t{length}>"
instead.

> WebCore/html/ImageData.h:51
> -    ImageData(unsigned width, unsigned height);
> -    ImageData(unsigned width, unsigned height, PassRefPtr<ByteArray>);
> +    ImageData(int width, int height);
> +    ImageData(int width, int height, PassRefPtr<ByteArray>);

The constructors could take an IntSize instead now (just like ImageBuffer.)


More information about the webkit-reviews mailing list