Changeset 118620 in webkit
- Timestamp:
- May 26, 2012, 6:51:03 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/files/blob-slice-test-expected.txt (modified) (1 diff)
-
LayoutTests/fast/files/read-blob-async-expected.txt (modified) (3 diffs)
-
LayoutTests/fast/files/read-file-async-expected.txt (modified) (4 diffs)
-
LayoutTests/fast/files/resources/read-common.js (modified) (1 diff)
-
LayoutTests/fast/files/workers/worker-read-blob-async-expected.txt (modified) (3 diffs)
-
LayoutTests/fast/files/workers/worker-read-file-async-expected.txt (modified) (4 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/fileapi/FileReader.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118618 r118620 1 2012-05-26 Li Yin <li.yin@intel.com> 2 3 [FileAPI] The result attribute of FileReader shuold use null to replace empty string 4 https://bugs.webkit.org/show_bug.cgi?id=87578 5 6 Reviewed by Kentaro Hara. 7 8 From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr 9 Before read method has been called or an error in reading has occurred, 10 the result attribute should be null, not empty string. 11 WebKit should change the returned value empty string into null to keep 12 conformance with the spec. 13 14 * fast/files/blob-slice-test-expected.txt: 15 * fast/files/read-blob-async-expected.txt: 16 * fast/files/read-file-async-expected.txt: 17 * fast/files/resources/read-common.js: 18 (logResult): 19 * fast/files/workers/worker-read-blob-async-expected.txt: 20 * fast/files/workers/worker-read-file-async-expected.txt: 21 1 22 2012-05-26 Nate Chapin <japhet@chromium.org> 2 23 -
trunk/LayoutTests/fast/files/blob-slice-test-expected.txt
r87181 r118620 1 1 Slicing from 2 to 3: 2 2 2 Slicing from 2 to 12: 23456789 3 Slicing from 2 to 2: 4 Slicing from 2 to 1: 5 Slicing from 2 to -12: 3 Slicing from 2 to 2: null 4 Slicing from 2 to 1: null 5 Slicing from 2 to -12: null 6 6 Slicing from 2 to 2147483647: 23456789 7 Slicing from 2 to -2147483648: 7 Slicing from 2 to -2147483648: null 8 8 Slicing from 2 to 9223372036854775000: 23456789 9 Slicing from 2 to -9223372036854775000: 9 Slicing from 2 to -9223372036854775000: null 10 10 Slicing from -2 to -1: 8 11 Slicing from -2 to -2: 12 Slicing from -2 to -3: 13 Slicing from -2 to -12: 11 Slicing from -2 to -2: null 12 Slicing from -2 to -3: null 13 Slicing from -2 to -12: null 14 14 Slicing from -2 to 2147483647: 89 15 Slicing from -2 to -2147483648: 15 Slicing from -2 to -2147483648: null 16 16 Slicing from -2 to 9223372036854775000: 89 17 Slicing from -2 to -9223372036854775000: 17 Slicing from -2 to -9223372036854775000: null 18 18 Slicing from 0: 0123456789 19 19 Slicing from 2: 23456789 20 20 Slicing from -2: 89 21 Slicing from 12: 21 Slicing from 12: null 22 22 Slicing from -12: 0123456789 23 Slicing from 2147483647: 23 Slicing from 2147483647: null 24 24 Slicing from -2147483648: 0123456789 25 Slicing from 9223372036854775000: 25 Slicing from 9223372036854775000: null 26 26 Slicing from -9223372036854775000: 0123456789 27 27 Slicing without parameters: 0123456789 -
trunk/LayoutTests/fast/files/read-blob-async-expected.txt
r70488 r118620 18 18 Received load event 19 19 readyState: 2 20 result size: 0 21 result: 20 result: null 22 21 Received loadend event 23 22 Test reading a blob containing empty text … … 27 26 Received load event 28 27 readyState: 2 29 result size: 0 30 result: 28 result: null 31 29 Received loadend event 32 30 Test reading a blob containing empty files and empty texts … … 36 34 Received load event 37 35 readyState: 2 38 result size: 0 39 result: 36 result: null 40 37 Received loadend event 41 38 Test reading a blob containing single file -
trunk/LayoutTests/fast/files/read-file-async-expected.txt
r87961 r118620 39 39 Received load event 40 40 readyState: 2 41 result size: 0 42 result: 41 result: null 43 42 Received loadend event 44 43 Test reading an empty file as text … … 48 47 Received load event 49 48 readyState: 2 50 result size: 0 51 result: 49 result: null 52 50 Received loadend event 53 51 Test reading an empty file as data URL … … 191 189 Received loadend event 192 190 readyState after recalling read method: 1 193 result after recalling read method: 191 result after recalling read method: null 194 192 error after recalling read method: null 195 193 Received loadstart event … … 207 205 Received loadend event 208 206 readyState after recalling read method: 1 209 result after recalling read method: 207 result after recalling read method: null 210 208 error after recalling read method: null 211 209 Received loadstart event -
trunk/LayoutTests/fast/files/resources/read-common.js
r115582 r118620 169 169 } 170 170 171 // 'result' can be either an ArrayBuffer object or a string.171 // 'result' can be an ArrayBuffer object, a string or null. 172 172 function logResult(result) 173 173 { 174 if (result === null) { 175 log("result: null"); 176 return; 177 } 174 178 if (typeof result == 'object') { 175 179 log("result size: " + result.byteLength); -
trunk/LayoutTests/fast/files/workers/worker-read-blob-async-expected.txt
r70488 r118620 19 19 Received load event 20 20 readyState: 2 21 result size: 0 22 result: 21 result: null 23 22 Received loadend event 24 23 Test reading a blob containing empty text … … 28 27 Received load event 29 28 readyState: 2 30 result size: 0 31 result: 29 result: null 32 30 Received loadend event 33 31 Test reading a blob containing empty files and empty texts … … 37 35 Received load event 38 36 readyState: 2 39 result size: 0 40 result: 37 result: null 41 38 Received loadend event 42 39 Test reading a blob containing single file -
trunk/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt
r87961 r118620 40 40 Received load event 41 41 readyState: 2 42 result size: 0 43 result: 42 result: null 44 43 Received loadend event 45 44 Test reading an empty file as text … … 49 48 Received load event 50 49 readyState: 2 51 result size: 0 52 result: 50 result: null 53 51 Received loadend event 54 52 Test reading an empty file as data URL … … 192 190 Received loadend event 193 191 readyState after recalling read method: 1 194 result after recalling read method: 192 result after recalling read method: null 195 193 error after recalling read method: null 196 194 Received loadstart event … … 208 206 Received loadend event 209 207 readyState after recalling read method: 1 210 result after recalling read method: 208 result after recalling read method: null 211 209 error after recalling read method: null 212 210 Received loadstart event -
trunk/Source/WebCore/ChangeLog
r118619 r118620 1 2012-05-26 Li Yin <li.yin@intel.com> 2 3 [FileAPI] The result attribute of FileReader shuold use null to replace empty string 4 https://bugs.webkit.org/show_bug.cgi?id=87578 5 6 Reviewed by Kentaro Hara. 7 8 From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr 9 Before read method has been called or an error in reading has occurred, 10 the result attribute should be null, not empty string. 11 12 Currently, Firefox, Opera and IE 10 follows the spec, but Webkit based 13 browser don't. 14 WebKit should change the returned value empty string into null to keep 15 conformance with the spec. 16 17 Tests: fast/files/read-file-async.html 18 fast/files/blob-slice-test.html 19 fast/files/read-blob-async.html 20 fast/files/workers/worker-read-blob-async.html 21 fast/files/workers/worker-read-file-async.html 22 23 * fileapi/FileReader.cpp: 24 (WebCore::FileReader::stringResult): 25 1 26 2012-05-26 Andy Estes <aestes@apple.com> 2 27 -
trunk/Source/WebCore/fileapi/FileReader.cpp
r118394 r118620 255 255 String FileReader::stringResult() 256 256 { 257 return m_loader ? m_loader->stringResult() : ""; 257 String ret = m_loader ? m_loader->stringResult() : ""; 258 if (ret.isEmpty()) 259 return String(); 260 return ret; 258 261 } 259 262
Note:
See TracChangeset
for help on using the changeset viewer.