Reviewed by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2005 01:49:09 +0000 (01:49 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2005 01:49:09 +0000 (01:49 +0000)
        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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/SelectionController.cpp
WebCore/khtml/editing/selection.cpp

index 44f2b2763c4f11218b6020c410f6d00abef526dc..340147cb8aeddb284cf8d6ea073c393bf4bf9e60 100644 (file)
@@ -1,3 +1,12 @@
+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.
index 26894c7789d7df0874a6403d41f41d6e459ae4a4..b0eeee4f6dec33a3737a3596a514f1100903ae82 100644 (file)
@@ -871,16 +871,11 @@ void Selection::validate(ETextGranularity granularity)
                 // 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();
index 26894c7789d7df0874a6403d41f41d6e459ae4a4..b0eeee4f6dec33a3737a3596a514f1100903ae82 100644 (file)
@@ -871,16 +871,11 @@ void Selection::validate(ETextGranularity granularity)
                 // 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();