Reviewed by John
[WebKit-https.git] / WebCore / khtml / editing / visible_position.cpp
index 54604555747107e2a81c887b2d5e6d333d045dd0..e47d6c660ad3dff2b8a39d0065478c6479f28463 100644 (file)
@@ -544,10 +544,10 @@ bool isFirstVisiblePositionInBlock(const VisiblePosition &pos)
         case NoBlockRelationship:
         case SameBlockRelationship:
         case AncestorBlockRelationship:
+        case OtherBlockRelationship:
             return false;
         case PeerBlockRelationship:
         case DescendantBlockRelationship:
-        case OtherBlockRelationship:
             return true;
     }
     ASSERT_NOT_REACHED();
@@ -584,11 +584,11 @@ bool isLastVisiblePositionInBlock(const VisiblePosition &pos)
     switch (blockRelationship(pos, next)) {
         case NoBlockRelationship:
         case SameBlockRelationship:
+        case AncestorBlockRelationship:
         case DescendantBlockRelationship:
+        case OtherBlockRelationship:
             return false;
         case PeerBlockRelationship:
-        case AncestorBlockRelationship:
-        case OtherBlockRelationship:
             return true;
     }
     ASSERT_NOT_REACHED();