Reviewed by Darin
[WebKit-https.git] / WebCore / khtml / editing / selection.cpp
index 55a9e26bd71fb1b52f4acc58fcc5fa21f4a1070d..09f139ed1508ad993efd5122d3bc6dba41a8d5ec 100644 (file)
@@ -622,10 +622,10 @@ void Selection::layout()
         pos.node()->getDocument()->updateRendering();
         switch (m_affinity) {
             case DOWNSTREAM:
-                pos = VisiblePosition(m_start).deepEquivalent();
+                pos = VisiblePosition(m_start).downstreamDeepEquivalent();
                 break;
             case UPSTREAM:
-                pos = VisiblePosition(m_start).upstreamDeepEquivalent();
+                pos = VisiblePosition(m_start).deepEquivalent();
                 break;
         }
         m_caretRect = pos.node()->renderer()->caretRect(pos.offset(), false);