| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 RefPtr<IDBKey> key = prpKey; | 38 RefPtr<IDBKey> key = prpKey; |
| 39 return adoptRef(new IDBKeyRange(key, key, LowerBoundClosed, UpperBoundClosed
)); | 39 return adoptRef(new IDBKeyRange(key, key, LowerBoundClosed, UpperBoundClosed
)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 IDBKeyRange::IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, Low
erBoundType lowerType, UpperBoundType upperType) | 42 IDBKeyRange::IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, Low
erBoundType lowerType, UpperBoundType upperType) |
| 43 : m_lower(lower) | 43 : m_lower(lower) |
| 44 , m_upper(upper) | 44 , m_upper(upper) |
| 45 , m_lowerType(lowerType) | 45 , m_lowerType(lowerType) |
| 46 , m_upperType(upperType) | 46 , m_upperType(upperType) |
| 47 { | 47 { |
| 48 ScriptWrappable::init(this); |
| 48 } | 49 } |
| 49 | 50 |
| 50 ScriptValue IDBKeyRange::lowerValue(ScriptExecutionContext* context) const | 51 ScriptValue IDBKeyRange::lowerValue(ScriptExecutionContext* context) const |
| 51 { | 52 { |
| 52 DOMRequestState requestState(context); | 53 DOMRequestState requestState(context); |
| 53 return idbKeyToScriptValue(&requestState, m_lower); | 54 return idbKeyToScriptValue(&requestState, m_lower); |
| 54 } | 55 } |
| 55 | 56 |
| 56 ScriptValue IDBKeyRange::upperValue(ScriptExecutionContext* context) const | 57 ScriptValue IDBKeyRange::upperValue(ScriptExecutionContext* context) const |
| 57 { | 58 { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 { | 133 { |
| 133 if (m_lowerType != LowerBoundClosed || m_upperType != UpperBoundClosed) | 134 if (m_lowerType != LowerBoundClosed || m_upperType != UpperBoundClosed) |
| 134 return false; | 135 return false; |
| 135 | 136 |
| 136 ASSERT(m_lower); | 137 ASSERT(m_lower); |
| 137 ASSERT(m_upper); | 138 ASSERT(m_upper); |
| 138 return m_lower->isEqual(m_upper.get()); | 139 return m_lower->isEqual(m_upper.get()); |
| 139 } | 140 } |
| 140 | 141 |
| 141 } // namespace WebCore | 142 } // namespace WebCore |
| OLD | NEW |