blob: 37d32a8b35d378ae10edca556a8fd91ae6a21d01 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "core/editing/TextOffset.h"
#include "core/dom/Text.h"
namespace blink {
TextOffset::TextOffset()
: m_offset(0)
{
}
TextOffset::TextOffset(PassRefPtrWillBeRawPtr<Text> text, int offset)
: m_text(text)
, m_offset(offset)
{
}
TextOffset::TextOffset(const TextOffset& other)
: m_text(other.m_text)
, m_offset(other.m_offset)
{
}
bool TextOffset::isNull() const
{
return !m_text;
}
bool TextOffset::isNotNull() const
{
return m_text;
}
} // namespace blink