Reviewed by Dave Harrison.
[WebKit-https.git] / WebCore / khtml / editing / selection.cpp
index c0eb391804d5ecac23ce093fd049dce87079cd16..90558be329d765dc34dfa7aca347f892a502d069 100644 (file)
@@ -61,6 +61,7 @@ using DOM::Position;
 using DOM::Range;
 using DOM::RangeImpl;
 using DOM::StayInBlock;
 using DOM::Range;
 using DOM::RangeImpl;
 using DOM::StayInBlock;
+using DOM::DoNotStayInBlock;
 
 namespace khtml {
 
 
 namespace khtml {
 
@@ -1026,23 +1027,23 @@ void Selection::debugPosition() const
 
     if (m_start == m_end) {
         Position pos = m_start;
 
     if (m_start == m_end) {
         Position pos = m_start;
-        Position upstream = pos.upstream();
-        Position downstream = pos.downstream();
+        Position upstream = pos.upstream(DoNotStayInBlock);
+        Position downstream = pos.downstream(DoNotStayInBlock);
         fprintf(stderr, "upstream:   %s %p:%ld\n", upstream.node()->nodeName().string().latin1(), upstream.node(), upstream.offset());
         fprintf(stderr, "pos:        %s %p:%ld\n", pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
         fprintf(stderr, "downstream: %s %p:%ld\n", downstream.node()->nodeName().string().latin1(), downstream.node(), downstream.offset());
     }
     else {
         Position pos = m_start;
         fprintf(stderr, "upstream:   %s %p:%ld\n", upstream.node()->nodeName().string().latin1(), upstream.node(), upstream.offset());
         fprintf(stderr, "pos:        %s %p:%ld\n", pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
         fprintf(stderr, "downstream: %s %p:%ld\n", downstream.node()->nodeName().string().latin1(), downstream.node(), downstream.offset());
     }
     else {
         Position pos = m_start;
-        Position upstream = pos.upstream();
-        Position downstream = pos.downstream();
+        Position upstream = pos.upstream(DoNotStayInBlock);
+        Position downstream = pos.downstream(DoNotStayInBlock);
         fprintf(stderr, "upstream:   %s %p:%ld\n", upstream.node()->nodeName().string().latin1(), upstream.node(), upstream.offset());
         fprintf(stderr, "start:      %s %p:%ld\n", pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
         fprintf(stderr, "downstream: %s %p:%ld\n", downstream.node()->nodeName().string().latin1(), downstream.node(), downstream.offset());
         fprintf(stderr, "-----------------------------------\n");
         pos = m_end;
         fprintf(stderr, "upstream:   %s %p:%ld\n", upstream.node()->nodeName().string().latin1(), upstream.node(), upstream.offset());
         fprintf(stderr, "start:      %s %p:%ld\n", pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
         fprintf(stderr, "downstream: %s %p:%ld\n", downstream.node()->nodeName().string().latin1(), downstream.node(), downstream.offset());
         fprintf(stderr, "-----------------------------------\n");
         pos = m_end;
-        upstream = pos.upstream();
-        downstream = pos.downstream();
+        upstream = pos.upstream(DoNotStayInBlock);
+        downstream = pos.downstream(DoNotStayInBlock);
         fprintf(stderr, "upstream:   %s %p:%ld\n", upstream.node()->nodeName().string().latin1(), upstream.node(), upstream.offset());
         fprintf(stderr, "end:        %s %p:%ld\n", pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
         fprintf(stderr, "downstream: %s %p:%ld\n", downstream.node()->nodeName().string().latin1(), downstream.node(), downstream.offset());
         fprintf(stderr, "upstream:   %s %p:%ld\n", upstream.node()->nodeName().string().latin1(), upstream.node(), upstream.offset());
         fprintf(stderr, "end:        %s %p:%ld\n", pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
         fprintf(stderr, "downstream: %s %p:%ld\n", downstream.node()->nodeName().string().latin1(), downstream.node(), downstream.offset());