| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef ArrayBufferView_h | 26 #ifndef ArrayBufferView_h |
| 27 #define ArrayBufferView_h | 27 #define ArrayBufferView_h |
| 28 | 28 |
| 29 #include "wtf/ArrayBuffer.h" | 29 #include "wtf/ArrayBuffer.h" |
| 30 | 30 |
| 31 #include <algorithm> | |
| 32 #include <limits.h> | |
| 33 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 34 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
| 35 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
| 36 #include "wtf/WTFExport.h" | 34 #include "wtf/WTFExport.h" |
| 35 #include <algorithm> |
| 36 #include <limits.h> |
| 37 | 37 |
| 38 namespace WTF { | 38 namespace WTF { |
| 39 | 39 |
| 40 class WTF_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> { | 40 class WTF_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> { |
| 41 public: | 41 public: |
| 42 enum ViewType { | 42 enum ViewType { |
| 43 TypeInt8, | 43 TypeInt8, |
| 44 TypeUint8, | 44 TypeUint8, |
| 45 TypeUint8Clamped, | 45 TypeUint8Clamped, |
| 46 TypeInt16, | 46 TypeInt16, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 end = start; | 201 end = start; |
| 202 *offset = static_cast<unsigned>(start); | 202 *offset = static_cast<unsigned>(start); |
| 203 *length = static_cast<unsigned>(end - start); | 203 *length = static_cast<unsigned>(end - start); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace WTF | 206 } // namespace WTF |
| 207 | 207 |
| 208 using WTF::ArrayBufferView; | 208 using WTF::ArrayBufferView; |
| 209 | 209 |
| 210 #endif // ArrayBufferView_h | 210 #endif // ArrayBufferView_h |
| OLD | NEW |