Reviewed by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Feb 2005 19:12:24 +0000 (19:12 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Feb 2005 19:12:24 +0000 (19:12 +0000)
        <rdar://problem/3991532> REGRESSION (Mail): Triple-click on trailing blank line should select previous line but doesn't

        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/editing/selection.cpp:
        (khtml::Selection::validate):
        Do moral equiavalent of LeftWordIfOnBoundary for PARAGRAPH.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

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

index 273db967e7ff03c6fe6d4b28d9dc46525f503b6d..445d05bd49ce379e762d952886913ace084e0939 100644 (file)
@@ -1,3 +1,16 @@
+2005-02-10  David Harrison  <harrison@apple.com>
+
+        Reviewed by Darin.
+
+        <rdar://problem/3991532> REGRESSION (Mail): Triple-click on trailing blank line should select previous line but doesn't
+
+        * khtml/css/cssvalues.c:
+        (hash_val):
+        (findValue):
+        * khtml/editing/selection.cpp:
+        (khtml::Selection::validate):
+        Do moral equiavalent of LeftWordIfOnBoundary for PARAGRAPH.
+
 2005-02-10  David Harrison  <harrison@apple.com>
 
         Reviewed by Darin.
index 15bfac44dc9103245e14d0e7ea875d32d3fd7bc9..54ece719458c0016fa39ed9fcc894be65602eb9e 100644 (file)
@@ -901,7 +901,10 @@ void Selection::validate(ETextGranularity granularity)
             break;
         case PARAGRAPH:
             if (m_baseIsStart) {
-                m_start = startOfParagraph(VisiblePosition(m_base, m_affinity)).deepEquivalent();
+                VisiblePosition pos(m_base, m_affinity);
+                if (isStartOfLine(pos, m_affinity) && isEndOfDocument(pos))
+                    pos = pos.previous();
+                m_start = startOfParagraph(pos).deepEquivalent();
                 m_end = endOfParagraph(VisiblePosition(m_extent, m_affinity), IncludeLineBreak).deepEquivalent();
             } else {
                 m_start = startOfParagraph(VisiblePosition(m_extent, m_affinity)).deepEquivalent();
index 15bfac44dc9103245e14d0e7ea875d32d3fd7bc9..54ece719458c0016fa39ed9fcc894be65602eb9e 100644 (file)
@@ -901,7 +901,10 @@ void Selection::validate(ETextGranularity granularity)
             break;
         case PARAGRAPH:
             if (m_baseIsStart) {
-                m_start = startOfParagraph(VisiblePosition(m_base, m_affinity)).deepEquivalent();
+                VisiblePosition pos(m_base, m_affinity);
+                if (isStartOfLine(pos, m_affinity) && isEndOfDocument(pos))
+                    pos = pos.previous();
+                m_start = startOfParagraph(pos).deepEquivalent();
                 m_end = endOfParagraph(VisiblePosition(m_extent, m_affinity), IncludeLineBreak).deepEquivalent();
             } else {
                 m_start = startOfParagraph(VisiblePosition(m_extent, m_affinity)).deepEquivalent();