[webkit-reviews] review denied: [Bug 82497] REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html fails on Mac platforms : [Attachment 134367] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 28 12:30:52 PDT 2012


Brady Eidson <beidson at apple.com> has denied Enrica Casucci <enrica at apple.com>'s
request for review:
Bug 82497: REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html
fails on Mac platforms
https://bugs.webkit.org/show_bug.cgi?id=82497

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

------- Additional Comments from Brady Eidson <beidson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=134367&action=review


> Source/WebCore/platform/mac/ClipboardMac.mm:207
>      // Fallback to NSURLPboardType (which is a single URL)
>      if (availableTypes.contains(String(NSURLPboardType))) {
> -	  
platformStrategies()->pasteboardStrategy()->getPathnamesForType(absoluteURLs,
String(NSURLPboardType), pasteboardName);
> +	  
absoluteURLs.append(platformStrategies()->pasteboardStrategy()->stringForType(S
tring(NSURLPboardType), pasteboardName));
>	   if (!absoluteURLs.isEmpty())
>	       return absoluteURLs;

It seems that the old code - using getPathnamesForType() - could return
anywhere from 0 to many URLs so the absoluteURLs.isEmpty() check was relevant.

But the comment suggests that NSURLPboardType should only ever be 1 URL.  And -
in fact - this new code can only ever return exactly 1 URL.

Nuke that unnecessary !absoluteURLs.isEmpty() check!  :)


More information about the webkit-reviews mailing list