| Index: third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h
|
| diff --git a/third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h b/third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h
|
| index 11c781262f3370e22c65611f82fdcfc597aadd33..8ce06fbfaf8e3e696e263f7ccc53aacf44935d0c 100644
|
| --- a/third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h
|
| +++ b/third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h
|
| @@ -78,7 +78,7 @@ inline RangeBoundaryPoint::RangeBoundaryPoint(RawPtr<Node> container)
|
| , m_offsetInContainer(0)
|
| , m_childBeforeBoundary(nullptr)
|
| {
|
| - ASSERT(m_containerNode);
|
| + DCHECK(m_containerNode);
|
| }
|
|
|
| inline RangeBoundaryPoint::RangeBoundaryPoint(const RangeBoundaryPoint& other)
|
| @@ -103,7 +103,7 @@ inline void RangeBoundaryPoint::ensureOffsetIsValid() const
|
| if (m_offsetInContainer >= 0)
|
| return;
|
|
|
| - ASSERT(m_childBeforeBoundary);
|
| + DCHECK(m_childBeforeBoundary);
|
| m_offsetInContainer = m_childBeforeBoundary->nodeIndex() + 1;
|
| }
|
|
|
| @@ -133,9 +133,9 @@ inline void RangeBoundaryPoint::clear()
|
|
|
| inline void RangeBoundaryPoint::set(RawPtr<Node> container, int offset, Node* childBefore)
|
| {
|
| - ASSERT(container);
|
| - ASSERT(offset >= 0);
|
| - ASSERT(childBefore == (offset ? NodeTraversal::childAt(*container, offset - 1) : 0));
|
| + DCHECK(container);
|
| + DCHECK_GE(offset, 0);
|
| + DCHECK_EQ(childBefore, offset ? NodeTraversal::childAt(*container, offset - 1) : 0);
|
| m_containerNode = container;
|
| m_offsetInContainer = offset;
|
| m_childBeforeBoundary = childBefore;
|
| @@ -143,16 +143,16 @@ inline void RangeBoundaryPoint::set(RawPtr<Node> container, int offset, Node* ch
|
|
|
| inline void RangeBoundaryPoint::setOffset(int offset)
|
| {
|
| - ASSERT(m_containerNode);
|
| - ASSERT(m_containerNode->offsetInCharacters());
|
| - ASSERT(m_offsetInContainer >= 0);
|
| - ASSERT(!m_childBeforeBoundary);
|
| + DCHECK(m_containerNode);
|
| + DCHECK(m_containerNode->offsetInCharacters());
|
| + DCHECK_GE(m_offsetInContainer, 0);
|
| + DCHECK(!m_childBeforeBoundary);
|
| m_offsetInContainer = offset;
|
| }
|
|
|
| inline void RangeBoundaryPoint::setToBeforeChild(Node& child)
|
| {
|
| - ASSERT(child.parentNode());
|
| + DCHECK(child.parentNode());
|
| m_childBeforeBoundary = child.previousSibling();
|
| m_containerNode = child.parentNode();
|
| m_offsetInContainer = m_childBeforeBoundary ? invalidOffset : 0;
|
| @@ -179,7 +179,7 @@ inline void RangeBoundaryPoint::setToEndOfNode(Node& container)
|
|
|
| inline void RangeBoundaryPoint::childBeforeWillBeRemoved()
|
| {
|
| - ASSERT(m_offsetInContainer);
|
| + DCHECK(m_offsetInContainer);
|
| m_childBeforeBoundary = m_childBeforeBoundary->previousSibling();
|
| if (!m_childBeforeBoundary)
|
| m_offsetInContainer = 0;
|
|
|