Bug 76947 - "text" and "URL" legacy clipboard types should not be case sensitive
Summary: "text" and "URL" legacy clipboard types should not be case sensitive
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 76198
  Show dependency treegraph
 
Reported: 2012-01-24 14:29 PST by Eric Seidel (no email)
Modified: 2012-01-25 16:27 PST (History)
9 users (show)

See Also:


Attachments
Patch (8.39 KB, patch)
2012-01-24 14:45 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch for landing (11.10 KB, patch)
2012-01-25 16:02 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Eric Seidel (no email) 2012-01-24 14:40:21 PST
I believe Oliver worked on ClipboardMac most recently, so he might want to see this go by.
Comment 2 Eric Seidel (no email) 2012-01-24 14:41:21 PST
Looks like Enrica was actually the last person in the file, so I'll CC her too:
http://trac.webkit.org/log/trunk/Source/WebCore/platform/mac/ClipboardMac.mm
Comment 3 Eric Seidel (no email) 2012-01-24 14:45:09 PST
Created attachment 123814 [details]
Patch
Comment 4 Adam Barth 2012-01-24 16:09:15 PST
Comment on attachment 123814 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=123814&action=review

> Source/WebCore/platform/mac/ClipboardMac.mm:72
> +    String qType = type.lower();

Why not equalsIgnoringCase ?
Comment 5 Eric Seidel (no email) 2012-01-24 16:12:59 PST
(In reply to comment #4)
> (From update of attachment 123814 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=123814&action=review
> 
> > Source/WebCore/platform/mac/ClipboardMac.mm:72
> > +    String qType = type.lower();
> 
> Why not equalsIgnoringCase ?

That woudl be find too was attempting to be litteral with the spec. :)
Comment 6 Daniel Cheng 2012-01-24 16:16:44 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 123814 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=123814&action=review
> > 
> > > Source/WebCore/platform/mac/ClipboardMac.mm:72
> > > +    String qType = type.lower();
> > 
> > Why not equalsIgnoringCase ?
> 
> That woudl be find too was attempting to be litteral with the spec. :)

There are places that do things like Clipboard::types().contains(x). Is there an equivalent of equalsIgnoringCase for HashSet<String>? Otherwise I wonder if we're better off just lower-casing anyway.
Comment 7 Adam Barth 2012-01-24 16:18:01 PST
I think there's a CaseFoldingHash, but lowercasing is probably just fine here.
Comment 8 WebKit Review Bot 2012-01-24 16:23:09 PST
Comment on attachment 123814 [details]
Patch

Attachment 123814 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11294108

New failing tests:
editing/pasteboard/dataTransfer-setData-getData.html
Comment 9 Eric Seidel (no email) 2012-01-25 15:51:37 PST
OMG.  This is because the Chromium port falls back to "mac" for results.

Someone shoot me now.
Comment 10 Eric Seidel (no email) 2012-01-25 15:53:45 PST
I've filed https://bugs.webkit.org/show_bug.cgi?id=77054 about fixing the chromium fallback insanity.
Comment 11 Eric Seidel (no email) 2012-01-25 16:02:38 PST
Created attachment 124029 [details]
Patch for landing
Comment 12 WebKit Review Bot 2012-01-25 16:27:21 PST
Comment on attachment 124029 [details]
Patch for landing

Clearing flags on attachment: 124029

Committed r105941: <http://trac.webkit.org/changeset/105941>
Comment 13 WebKit Review Bot 2012-01-25 16:27:27 PST
All reviewed patches have been landed.  Closing bug.