Changeset 76053 in webkit
- Timestamp:
- Jan 18, 2011 1:24:04 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76048 r76053 1 2011-01-18 Benjamin Kalman <kalman@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 Tweak style in visible_units.cpp and TextIterator.cpp in preparation for another patch 6 https://bugs.webkit.org/show_bug.cgi?id=52610 7 8 This is a purely aesthetic change. 9 10 * editing/TextIterator.cpp: 11 (WebCore::SimplifiedBackwardsTextIterator::advance): 12 * editing/visible_units.cpp: 13 (WebCore::previousBoundary): 14 1 15 2011-01-18 Adam Klein <adamk@chromium.org> 2 16 -
trunk/Source/WebCore/editing/TextIterator.cpp
r73618 r76053 1129 1129 // Exit empty containers as we pass over them or containers 1130 1130 // where [container, 0] is where we started iterating. 1131 if (!m_handledNode &&1132 canHaveChildrenForEditing(m_node) &&1133 m_node->parentNode() &&1134 (!m_node->lastChild() || (m_node == m_endNode && m_endOffset == 0))) {1131 if (!m_handledNode 1132 && canHaveChildrenForEditing(m_node) 1133 && m_node->parentNode() 1134 && (!m_node->lastChild() || (m_node == m_endNode && !m_endOffset))) { 1135 1135 exitNode(); 1136 1136 if (m_positionNode) { -
trunk/Source/WebCore/editing/visible_units.cpp
r75018 r76053 116 116 } 117 117 118 if (it.atEnd() && next == 0) { 119 pos = it.range()->startPosition(); 120 } else if (next != 0) { 121 Node *node = it.range()->startContainer(ec); 122 if ((node->isTextNode() && static_cast<int>(next) <= node->maxCharacterOffset()) || (node->renderer() && node->renderer()->isBR() && !next)) 123 // The next variable contains a usable index into a text node 124 pos = Position(node, next); 125 else { 126 // Use the character iterator to translate the next value into a DOM position. 127 BackwardsCharacterIterator charIt(searchRange.get(), TextIteratorEndsAtEditingBoundary); 128 charIt.advance(string.size() - suffixLength - next); 129 pos = charIt.range()->endPosition(); 130 } 131 } 132 133 return VisiblePosition(pos, DOWNSTREAM); 118 if (!next) 119 return VisiblePosition(it.atEnd() ? it.range()->startPosition() : pos, DOWNSTREAM); 120 121 Node* node = it.range()->startContainer(ec); 122 if ((node->isTextNode() && static_cast<int>(next) <= node->maxCharacterOffset()) || (node->renderer() && node->renderer()->isBR() && !next)) 123 // The next variable contains a usable index into a text node 124 return VisiblePosition(Position(node, next), DOWNSTREAM); 125 126 // Use the character iterator to translate the next value into a DOM position. 127 BackwardsCharacterIterator charIt(searchRange.get(), TextIteratorEndsAtEditingBoundary); 128 charIt.advance(string.size() - suffixLength - next); 129 return VisiblePosition(charIt.range()->endPosition(), DOWNSTREAM); 134 130 } 135 131
Note: See TracChangeset
for help on using the changeset viewer.