| Index: third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
|
| index 5c76f4bf954d718dd3a094a745dc0e793efff708..0baa17de61116ad2af83413eac40fd4b49b9cc4c 100644
|
| --- a/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
|
| @@ -1,5 +1,6 @@
|
| /*
|
| - * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
|
| + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
|
| + * rights reserved.
|
| * Copyright (C) 2005 Alexey Proskuryakov.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| @@ -320,14 +321,16 @@ bool SimplifiedBackwardsTextIteratorAlgorithm<
|
|
|
| template <typename Strategy>
|
| bool SimplifiedBackwardsTextIteratorAlgorithm<Strategy>::handleNonTextNode() {
|
| - // We can use a linefeed in place of a tab because this simple iterator is only used to
|
| - // find boundaries, not actual content. A linefeed breaks words, sentences, and paragraphs.
|
| + // We can use a linefeed in place of a tab because this simple iterator is
|
| + // only used to find boundaries, not actual content. A linefeed breaks words,
|
| + // sentences, and paragraphs.
|
| if (TextIterator::shouldEmitNewlineForNode(m_node, m_emitsOriginalText) ||
|
| TextIterator::shouldEmitNewlineAfterNode(*m_node) ||
|
| TextIterator::shouldEmitTabBeforeNode(m_node)) {
|
| unsigned index = Strategy::index(*m_node);
|
| - // The start of this emitted range is wrong. Ensuring correctness would require
|
| - // VisiblePositions and so would be slow. previousBoundary expects this.
|
| + // The start of this emitted range is wrong. Ensuring correctness would
|
| + // require VisiblePositions and so would be slow. previousBoundary expects
|
| + // this.
|
| emitCharacter('\n', Strategy::parent(*m_node), index + 1, index + 1);
|
| }
|
| return true;
|
| @@ -338,8 +341,9 @@ void SimplifiedBackwardsTextIteratorAlgorithm<Strategy>::exitNode() {
|
| if (TextIterator::shouldEmitNewlineForNode(m_node, m_emitsOriginalText) ||
|
| TextIterator::shouldEmitNewlineBeforeNode(*m_node) ||
|
| TextIterator::shouldEmitTabBeforeNode(m_node)) {
|
| - // The start of this emitted range is wrong. Ensuring correctness would require
|
| - // VisiblePositions and so would be slow. previousBoundary expects this.
|
| + // The start of this emitted range is wrong. Ensuring correctness would
|
| + // require VisiblePositions and so would be slow. previousBoundary expects
|
| + // this.
|
| emitCharacter('\n', m_node, 0, 0);
|
| }
|
| }
|
|
|