Chromium Code Reviews| Index: Source/core/editing/VisibleSelection.cpp |
| diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp |
| index 6a79d0460bdb1014b6a2de6b0ee85b7dc1819002..e677c388e3fc85deb1a654ebbaa1e3f2e7b6c449 100644 |
| --- a/Source/core/editing/VisibleSelection.cpp |
| +++ b/Source/core/editing/VisibleSelection.cpp |
| @@ -356,6 +356,13 @@ void VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity(Text |
| // last word to the line break (also RightWordIfOnBoundary); |
| VisiblePosition start = VisiblePosition(m_start, m_affinity); |
| VisiblePosition originalEnd(m_end, m_affinity); |
| + |
| + if (!isContentEditable() && isStartOfWordASpace(start)) { |
| + start = start.next(); |
| + if (comparePositions(start, originalEnd) >= 0) |
| + originalEnd = originalEnd.next(); |
| + } |
|
Yuta Kitamura
2014/05/07 11:09:08
It's totally unclear to me why |start| and |end| n
|
| + |
| EWordSide side = RightWordIfOnBoundary; |
| if (isEndOfEditableOrNonEditableContent(start) || (isEndOfLine(start) && !isStartOfLine(start) && !isEndOfParagraph(start))) |
| side = LeftWordIfOnBoundary; |