Changeset 105941 in webkit
- Timestamp:
- Jan 25, 2012 4:27:03 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r105938 r105941 1 2012-01-25 Eric Seidel <eric@webkit.org> 2 3 "text" and "URL" legacy clipboard types should not be case sensitive 4 https://bugs.webkit.org/show_bug.cgi?id=76947 5 6 Reviewed by Adam Barth. 7 8 This test has been disabled on Mac since it was added 2 years ago. 9 But we actually need to fix at least one of the bugs covered by this 10 test, so I'm unskipping it and adding failing expectations for the 11 parts Mac doens't yet pass. 12 13 * platform/mac/Skipped: 14 * platform/mac/editing/pasteboard/dataTransfer-setData-getData-expected.txt: Added. 15 1 16 2012-01-25 Eric Seidel <eric@webkit.org> 2 17 -
trunk/LayoutTests/editing/pasteboard/dataTransfer-setData-getData-expected.txt
r105826 r105941 6 6 --- Test set/get 'URL': 7 7 PASS getDataResultType is "string" 8 PASS getDataResult is "http://test.com/" 8 FAIL getDataResult should be http://test.com/. Was http://test.com. 9 9 --- Test set/get 'URL' with multiple URLs: 10 PASS getDataResultType is "string" 11 PASS getDataResult is "http://test.com/" 10 FAIL getDataResultType should be string. Was undefined. 11 FAIL getDataResult should be http://test.com/ (of type string). Was undefined (of type undefined). 12 12 --- Test set/get 'text/uri-list': 13 PASS getDataResultType is "string" 14 PASS getDataResult is "http://test.com\r\nhttp://check.com" 13 FAIL getDataResultType should be string. Was undefined. 14 FAIL getDataResult should be http://test.com 15 http://check.com (of type string). Was undefined (of type undefined). 15 16 --- Test set/get 'text/uri-list' using '\n': 16 PASS getDataResultType is "string" 17 PASS getDataResult is "http://test.com\nhttp://check.com" 17 FAIL getDataResultType should be string. Was undefined. 18 FAIL getDataResult should be http://test.com 19 http://check.com (of type string). Was undefined (of type undefined). 18 20 --- Test set 'text/uri-list', get 'URL': 19 PASS getDataResultType is "string" 20 PASS getDataResult is "http://test.com/" 21 FAIL getDataResultType should be string. Was undefined. 22 FAIL getDataResult should be http://test.com/ (of type string). Was undefined (of type undefined). 21 23 --- Test set 'URL', get 'text/uri-list': 22 PASS getDataResultType is "string" 23 PASS getDataResult is "http://test.com\r\nhttp://check.com" 24 FAIL getDataResultType should be string. Was undefined. 25 FAIL getDataResult should be http://test.com 26 http://check.com (of type string). Was undefined (of type undefined). 24 27 --- Test set 'text/uri-list', get 'URL', using only '\n': 25 PASS getDataResultType is "string" 26 PASS getDataResult is "http://test.com/" 28 FAIL getDataResultType should be string. Was undefined. 29 FAIL getDataResult should be http://test.com/ (of type string). Was undefined (of type undefined). 27 30 --- Test set/get 'text/uri-list' with comments: 28 PASS getDataResultType is "string" 29 PASS getDataResult is "# comment\r\nhttp://test.com\r\nhttp://check.com" 31 FAIL getDataResultType should be string. Was undefined. 32 FAIL getDataResult should be # comment 33 http://test.com 34 http://check.com (of type string). Was undefined (of type undefined). 30 35 --- Test set 'text/uri-list', get 'URL' with comments: 31 PASS getDataResultType is "string" 32 PASS getDataResult is "http://test.com/" 36 FAIL getDataResultType should be string. Was undefined. 37 FAIL getDataResult should be http://test.com/ (of type string). Was undefined (of type undefined). 33 38 --- Test set 'text/uri-list', get 'URL' with only comments: 34 PASS getDataResultType is "string" 35 PASS getDataResult is "" 39 FAIL getDataResultType should be string. Was undefined. 40 FAIL getDataResult should be (of type string). Was undefined (of type undefined). 36 41 --- Test set/get 'text/plain': 37 42 PASS getDataResultType is "string" -
trunk/LayoutTests/platform/mac/Skipped
r105867 r105941 115 115 fast/dom/HTMLProgressElement/progress-element.html 116 116 117 # event.dataTransfer.setData('text/uri-list') not correctly implemented on Mac118 editing/pasteboard/dataTransfer-setData-getData.html119 120 117 # eventSender needs to propagate the event to the calling window, not the main frame always. 121 118 http/tests/plugins/plugin-document-has-focus.html -
trunk/Source/WebCore/ChangeLog
r105940 r105941 1 2012-01-25 Eric Seidel <eric@webkit.org> 2 3 "text" and "URL" legacy clipboard types should not be case sensitive 4 https://bugs.webkit.org/show_bug.cgi?id=76947 5 6 Reviewed by Adam Barth. 7 8 This matches the HTML5 spec which says the first thing to do is to lowercase 9 the type before comparing. 10 I also removed the stripping of whitespace since that is not part of the modern spec (and no tests failed as a result of removal). 11 Turns out we already had a test for case sensitivity, but it was disabled on Mac 12 so I just re-enabled it and have added failing expectations for the parts 13 of the test we still fail. 14 15 * platform/mac/ClipboardMac.mm: 16 (WebCore::cocoaTypeFromHTMLClipboardType): 17 (WebCore::ClipboardMac::getData): 18 1 19 2012-01-25 Eric Seidel <eric@webkit.org> 2 20 -
trunk/Source/WebCore/platform/mac/ClipboardMac.mm
r85036 r105941 69 69 static RetainPtr<NSString> cocoaTypeFromHTMLClipboardType(const String& type) 70 70 { 71 String qType = type.stripWhiteSpace();72 73 // two special cases for IE compatibility 74 if (qType == " Text")75 return NSStringPboardType;76 if (qType == " URL")77 return NSURLPboardType;71 // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dom-datatransfer-setdata 72 String qType = type.lower(); 73 74 if (qType == "text") 75 qType = "text/plain"; 76 if (qType == "url") 77 qType = "text/uri-list"; 78 78 79 79 // Ignore any trailing charset - JS strings are Unicode, which encapsulates the charset issue … … 83 83 // special case because UTI doesn't work with Cocoa's URL type 84 84 return NSURLPboardType; // note special case in getData to read NSFilenamesType 85 85 86 86 // Try UTI now 87 87 NSString *mimeType = qType; … … 219 219 // Grab the value off the pasteboard corresponding to the cocoaType 220 220 if ([cocoaType.get() isEqualToString:NSURLPboardType]) { 221 // " URL" and "text/url-list" both map to NSURLPboardType in cocoaTypeFromHTMLClipboardType(), "URL" only wants the first URL222 bool onlyFirstURL = ( type == "URL");221 // "url" and "text/url-list" both map to NSURLPboardType in cocoaTypeFromHTMLClipboardType(), "url" only wants the first URL 222 bool onlyFirstURL = (equalIgnoringCase(type, "url")); 223 223 NSArray *absoluteURLs = absoluteURLsFromPasteboard(m_pasteboard.get(), onlyFirstURL); 224 224 cocoaValue = [absoluteURLs componentsJoinedByString:@"\n"];
Note: See TracChangeset
for help on using the changeset viewer.