[Webkit-unassigned] [Bug 25847] New: Clean up ClipboardMac

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 17 22:30:33 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25847

           Summary: Clean up ClipboardMac
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: sam at webkit.org


Clean up ClipboardMac

I was in ClipboardMac today and decided to do a little cleanup.

I'm mostly just moving code, however there are 3 changes I made while moving.

1.  I broke out logic into absoluteURLsFromPasteboard which returns an NSArray
(different!) so that we can use -[NSArray componentsJoinedByString] which is
cleaner, and allows easier access to the full list of file urls from the
pasteboard (which is more useful than the string concatenation of them).
2.      unsigned count = (type == "URL") ? 1 : [fileList count]; is now an
explicit check for "URL", before it was a check for != "text/uri-list" which
was much more confusing in my opinion (since text/uri-list and URL are the only
two types which map to NSURLPboardType as far as I can tell.
3.  I removed an extra if (!types) check, right before [types count], in Obj-C
messaging nil will return 0 (size of a pointer), so it's safe to message nil
here and expect it to return 0.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list