Rolled out Ken's accidental checkin when committing <rdar://problem/
3986155> fix yesterday.
* khtml/editing/selection.cpp:
(khtml::Selection::validate):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8527
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-02-04 David Harrison <harrison@apple.com>
+
+ Reviewed by Darin.
+
+ Rolled out Ken's accidental checkin when committing <rdar://problem/3986155> fix yesterday.
+
+ * khtml/editing/selection.cpp:
+ (khtml::Selection::validate):
+
2005-02-04 Adele Amchan <adele@apple.com>
Reviewed by Darin.
// However, the end of the document is an exception and always selects the previous word even though it could be
// both the start of a line and after a hard line break.
VisiblePosition pos(m_base);
- if (isStartOfBlock(pos) && isEndOfBlock(pos)) {
- m_start = m_end = m_base;
- }
- else {
- EWordSide side = LeftWordIfOnBoundary;
- //if ((isEndOfParagraph(pos) || isStartOfLine(pos, m_affinity)) && !isEndOfDocument(pos))
- // side = RightWordIfOnBoundary;
- m_start = startOfWord(pos, side).deepEquivalent();
- m_end = endOfWord(pos, side).deepEquivalent();
- }
+ EWordSide side = LeftWordIfOnBoundary;
+ if ((isEndOfParagraph(pos) || isStartOfLine(pos, m_affinity)) && !isEndOfDocument(pos))
+ side = RightWordIfOnBoundary;
+ m_start = startOfWord(pos, side).deepEquivalent();
+ m_end = endOfWord(pos, side).deepEquivalent();
} else if (m_baseIsStart) {
m_start = startOfWord(VisiblePosition(m_base)).deepEquivalent();
m_end = endOfWord(VisiblePosition(m_extent)).deepEquivalent();
// However, the end of the document is an exception and always selects the previous word even though it could be
// both the start of a line and after a hard line break.
VisiblePosition pos(m_base);
- if (isStartOfBlock(pos) && isEndOfBlock(pos)) {
- m_start = m_end = m_base;
- }
- else {
- EWordSide side = LeftWordIfOnBoundary;
- //if ((isEndOfParagraph(pos) || isStartOfLine(pos, m_affinity)) && !isEndOfDocument(pos))
- // side = RightWordIfOnBoundary;
- m_start = startOfWord(pos, side).deepEquivalent();
- m_end = endOfWord(pos, side).deepEquivalent();
- }
+ EWordSide side = LeftWordIfOnBoundary;
+ if ((isEndOfParagraph(pos) || isStartOfLine(pos, m_affinity)) && !isEndOfDocument(pos))
+ side = RightWordIfOnBoundary;
+ m_start = startOfWord(pos, side).deepEquivalent();
+ m_end = endOfWord(pos, side).deepEquivalent();
} else if (m_baseIsStart) {
m_start = startOfWord(VisiblePosition(m_base)).deepEquivalent();
m_end = endOfWord(VisiblePosition(m_extent)).deepEquivalent();