OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 m_start = first.deepEquivalent(); | 608 m_start = first.deepEquivalent(); |
609 if (m_start.isNull()) { | 609 if (m_start.isNull()) { |
610 ASSERT_NOT_REACHED(); | 610 ASSERT_NOT_REACHED(); |
611 m_start = m_end; | 611 m_start = m_end; |
612 } | 612 } |
613 } | 613 } |
614 // If the end is outside the base's editable root, cap it at the end of
that root. | 614 // If the end is outside the base's editable root, cap it at the end of
that root. |
615 // If the end is in non-editable content that is inside the base's root,
put it | 615 // If the end is in non-editable content that is inside the base's root,
put it |
616 // at the last editable position before the end inside the base's root. | 616 // at the last editable position before the end inside the base's root. |
617 if (endRoot != baseRoot) { | 617 if (endRoot != baseRoot) { |
618 VisiblePosition last = lastEditablePositionBeforePositionInRoot(m_en
d, baseRoot); | 618 VisiblePosition last = VisiblePosition(lastEditablePositionBeforePos
itionInRoot(m_end, baseRoot)); |
619 m_end = last.deepEquivalent(); | 619 m_end = last.deepEquivalent(); |
620 if (m_end.isNull()) | 620 if (m_end.isNull()) |
621 m_end = m_start; | 621 m_end = m_start; |
622 } | 622 } |
623 // The selection is based in non-editable content. | 623 // The selection is based in non-editable content. |
624 } else { | 624 } else { |
625 // FIXME: Non-editable pieces inside editable content should be atomic,
in the same way that editable | 625 // FIXME: Non-editable pieces inside editable content should be atomic,
in the same way that editable |
626 // pieces in non-editable content are atomic. | 626 // pieces in non-editable content are atomic. |
627 | 627 |
628 // The selection ends in editable content or non-editable content inside
a different editable ancestor, | 628 // The selection ends in editable content or non-editable content inside
a different editable ancestor, |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 sel.showTreeForThis(); | 857 sel.showTreeForThis(); |
858 } | 858 } |
859 | 859 |
860 void showTree(const WebCore::VisibleSelection* sel) | 860 void showTree(const WebCore::VisibleSelection* sel) |
861 { | 861 { |
862 if (sel) | 862 if (sel) |
863 sel->showTreeForThis(); | 863 sel->showTreeForThis(); |
864 } | 864 } |
865 | 865 |
866 #endif | 866 #endif |
OLD | NEW |