[webkit-reviews] review granted: [Bug 52775] WebKit2: add support for drag and drop on Windows : [Attachment 81546] Patch4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 7 16:49:30 PST 2011


Darin Adler <darin at apple.com> has granted Enrica Casucci <enrica at apple.com>'s
request for review:
Bug 52775: WebKit2: add support for drag and drop on Windows
https://bugs.webkit.org/show_bug.cgi?id=52775

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

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

> Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp:714
> +void setCFData(IDataObject* data, FORMATETC* format, const Vector<String>&
dataStrings)

What guarantees the dataStrings vector is not empty?

> Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp:717
> +    SIZE_T dropFilesSize = sizeof(DROPFILES) + (sizeof(WCHAR) *
(dataStrings.first().length() + 2));

+2? Why not +1?

> Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp:726
> +    String filename = dataStrings[0];
> +    wcscpy(reinterpret_cast<LPWSTR>(dropFiles + 1),
filename.charactersWithNullTermination());    

No need for the local variable here for dataStrings[0]. Also, other functions
call this dataStrings.first() but here you used dataStrings[0].


More information about the webkit-reviews mailing list