| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // static | 125 // static |
| 126 void Blob::PopulateBlobData( | 126 void Blob::PopulateBlobData( |
| 127 BlobData* blob_data, | 127 BlobData* blob_data, |
| 128 const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& parts, | 128 const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& parts, |
| 129 bool normalize_line_endings_to_native) { | 129 bool normalize_line_endings_to_native) { |
| 130 for (const auto& item : parts) { | 130 for (const auto& item : parts) { |
| 131 if (item.isArrayBuffer()) { | 131 if (item.isArrayBuffer()) { |
| 132 DOMArrayBuffer* array_buffer = item.getAsArrayBuffer(); | 132 DOMArrayBuffer* array_buffer = item.getAsArrayBuffer(); |
| 133 blob_data->AppendBytes(array_buffer->Data(), array_buffer->ByteLength()); | 133 blob_data->AppendBytes(array_buffer->Data(), array_buffer->ByteLength()); |
| 134 } else if (item.isArrayBufferView()) { | 134 } else if (item.isArrayBufferView()) { |
| 135 DOMArrayBufferView* array_buffer_view = | 135 DOMArrayBufferView* array_buffer_view = item.getAsArrayBufferView(); |
| 136 item.getAsArrayBufferView().View(); | |
| 137 blob_data->AppendBytes(array_buffer_view->BaseAddress(), | 136 blob_data->AppendBytes(array_buffer_view->BaseAddress(), |
| 138 array_buffer_view->byteLength()); | 137 array_buffer_view->byteLength()); |
| 139 } else if (item.isBlob()) { | 138 } else if (item.isBlob()) { |
| 140 item.getAsBlob()->AppendTo(*blob_data); | 139 item.getAsBlob()->AppendTo(*blob_data); |
| 141 } else if (item.isUSVString()) { | 140 } else if (item.isUSVString()) { |
| 142 blob_data->AppendText(item.getAsUSVString(), | 141 blob_data->AppendText(item.getAsUSVString(), |
| 143 normalize_line_endings_to_native); | 142 normalize_line_endings_to_native); |
| 144 } else { | 143 } else { |
| 145 NOTREACHED(); | 144 NOTREACHED(); |
| 146 } | 145 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 const UChar* chars = type.Characters16(); | 236 const UChar* chars = type.Characters16(); |
| 238 for (size_t i = 0; i < length; ++i) { | 237 for (size_t i = 0; i < length; ++i) { |
| 239 if (chars[i] < 0x0020 || chars[i] > 0x007e) | 238 if (chars[i] < 0x0020 || chars[i] > 0x007e) |
| 240 return g_empty_string; | 239 return g_empty_string; |
| 241 } | 240 } |
| 242 } | 241 } |
| 243 return type.DeprecatedLower(); | 242 return type.DeprecatedLower(); |
| 244 } | 243 } |
| 245 | 244 |
| 246 } // namespace blink | 245 } // namespace blink |
| OLD | NEW |