OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart
.inDocument())) { | 553 } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart
.inDocument())) { |
554 int offset = 0; | 554 int offset = 0; |
555 if (m_upstreamStart.anchorNode()->isDescendantOf(m_downstrea
mEnd.anchorNode())) { | 555 if (m_upstreamStart.anchorNode()->isDescendantOf(m_downstrea
mEnd.anchorNode())) { |
556 Node* n = m_upstreamStart.anchorNode(); | 556 Node* n = m_upstreamStart.anchorNode(); |
557 while (n && n->parentNode() != m_downstreamEnd.anchorNod
e()) | 557 while (n && n->parentNode() != m_downstreamEnd.anchorNod
e()) |
558 n = n->parentNode(); | 558 n = n->parentNode(); |
559 if (n) | 559 if (n) |
560 offset = n->nodeIndex() + 1; | 560 offset = n->nodeIndex() + 1; |
561 } | 561 } |
562 removeChildrenInRange(m_downstreamEnd.anchorNode(), offset,
m_downstreamEnd.computeEditingOffset()); | 562 removeChildrenInRange(m_downstreamEnd.anchorNode(), offset,
m_downstreamEnd.computeEditingOffset()); |
563 m_downstreamEnd = createLegacyEditingPosition(m_downstreamEn
d.anchorNode(), offset); | 563 m_downstreamEnd = Position::editingPositionOf(m_downstreamEn
d.anchorNode(), offset); |
564 } | 564 } |
565 } | 565 } |
566 } | 566 } |
567 } | 567 } |
568 } | 568 } |
569 | 569 |
570 void DeleteSelectionCommand::fixupWhitespace() | 570 void DeleteSelectionCommand::fixupWhitespace() |
571 { | 571 { |
572 document().updateLayoutIgnorePendingStylesheets(); | 572 document().updateLayoutIgnorePendingStylesheets(); |
573 // FIXME: isRenderedCharacter should be removed, and we should use VisiblePo
sition::characterAfter and VisiblePosition::characterBefore | 573 // FIXME: isRenderedCharacter should be removed, and we should use VisiblePo
sition::characterAfter and VisiblePosition::characterBefore |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 visitor->trace(m_deleteIntoBlockquoteStyle); | 897 visitor->trace(m_deleteIntoBlockquoteStyle); |
898 visitor->trace(m_startRoot); | 898 visitor->trace(m_startRoot); |
899 visitor->trace(m_endRoot); | 899 visitor->trace(m_endRoot); |
900 visitor->trace(m_startTableRow); | 900 visitor->trace(m_startTableRow); |
901 visitor->trace(m_endTableRow); | 901 visitor->trace(m_endTableRow); |
902 visitor->trace(m_temporaryPlaceholder); | 902 visitor->trace(m_temporaryPlaceholder); |
903 CompositeEditCommand::trace(visitor); | 903 CompositeEditCommand::trace(visitor); |
904 } | 904 } |
905 | 905 |
906 } // namespace blink | 906 } // namespace blink |
OLD | NEW |