| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 unsigned byteOffset() const | 67 unsigned byteOffset() const |
| 68 { | 68 { |
| 69 return m_byteOffset; | 69 return m_byteOffset; |
| 70 } | 70 } |
| 71 | 71 |
| 72 virtual unsigned byteLength() const = 0; | 72 virtual unsigned byteLength() const = 0; |
| 73 | 73 |
| 74 void setNeuterable(bool flag) { m_isNeuterable = flag; } | 74 void setNeuterable(bool flag) { m_isNeuterable = flag; } |
| 75 bool isNeuterable() const { return m_isNeuterable; } | 75 bool isNeuterable() const { return m_isNeuterable; } |
| 76 bool isShared() const { return m_buffer ? m_buffer->isShared() : false; } |
| 76 | 77 |
| 77 virtual ~ArrayBufferView(); | 78 virtual ~ArrayBufferView(); |
| 78 | 79 |
| 79 protected: | 80 protected: |
| 80 ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset); | 81 ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset); |
| 81 | 82 |
| 82 inline bool setImpl(ArrayBufferView*, unsigned byteOffset); | 83 inline bool setImpl(ArrayBufferView*, unsigned byteOffset); |
| 83 | 84 |
| 84 inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned b
yteOffset); | 85 inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned b
yteOffset); |
| 85 | 86 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 end = start; | 202 end = start; |
| 202 *offset = static_cast<unsigned>(start); | 203 *offset = static_cast<unsigned>(start); |
| 203 *length = static_cast<unsigned>(end - start); | 204 *length = static_cast<unsigned>(end - start); |
| 204 } | 205 } |
| 205 | 206 |
| 206 } // namespace WTF | 207 } // namespace WTF |
| 207 | 208 |
| 208 using WTF::ArrayBufferView; | 209 using WTF::ArrayBufferView; |
| 209 | 210 |
| 210 #endif // ArrayBufferView_h | 211 #endif // ArrayBufferView_h |
| OLD | NEW |