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 3 // found in the LICENSE file. 4 5 #include "third_party/blink/renderer/core/editing/serializers/text_offset.h" 6 7 #include "third_party/blink/renderer/core/dom/text.h" 8 9 namespace blink { 10 TextOffset()11TextOffset::TextOffset() : offset_(0) {} 12 TextOffset(Text * text,int offset)13TextOffset::TextOffset(Text* text, int offset) : text_(text), offset_(offset) {} 14 15 TextOffset::TextOffset(const TextOffset& other) = default; 16 IsNull() const17bool TextOffset::IsNull() const { 18 return !text_; 19 } 20 IsNotNull() const21bool TextOffset::IsNotNull() const { 22 return text_; 23 } 24 25 } // namespace blink 26