| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/editing/serializers/TextOffset.h" | 5 #include "core/editing/serializers/TextOffset.h" |
| 6 | 6 |
| 7 #include "core/dom/Text.h" | 7 #include "core/dom/Text.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 TextOffset::TextOffset() | 11 TextOffset::TextOffset() |
| 12 : m_offset(0) | 12 : m_offset(0) |
| 13 { | 13 { |
| 14 } | 14 } |
| 15 | 15 |
| 16 TextOffset::TextOffset(PassRefPtrWillBeRawPtr<Text> text, int offset) | 16 TextOffset::TextOffset(RawPtr<Text> text, int offset) |
| 17 : m_text(text) | 17 : m_text(text) |
| 18 , m_offset(offset) | 18 , m_offset(offset) |
| 19 { | 19 { |
| 20 } | 20 } |
| 21 | 21 |
| 22 TextOffset::TextOffset(const TextOffset& other) | 22 TextOffset::TextOffset(const TextOffset& other) |
| 23 : m_text(other.m_text) | 23 : m_text(other.m_text) |
| 24 , m_offset(other.m_offset) | 24 , m_offset(other.m_offset) |
| 25 { | 25 { |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool TextOffset::isNull() const | 28 bool TextOffset::isNull() const |
| 29 { | 29 { |
| 30 return !m_text; | 30 return !m_text; |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool TextOffset::isNotNull() const | 33 bool TextOffset::isNotNull() const |
| 34 { | 34 { |
| 35 return m_text; | 35 return m_text; |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace blink | 38 } // namespace blink |
| OLD | NEW |