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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 || (downstreamEnd.containerNode()->isTextNode() && downstreamEnd.contain
erNode()->parentNode() == downstreamEnd.containerNode()->rootEditableElement()); | 793 || (downstreamEnd.containerNode()->isTextNode() && downstreamEnd.contain
erNode()->parentNode() == downstreamEnd.containerNode()->rootEditableElement()); |
794 bool lineBreakAtEndOfSelectionToDelete = lineBreakExistsAtVisiblePosition(m_
selectionToDelete.visibleEnd()); | 794 bool lineBreakAtEndOfSelectionToDelete = lineBreakExistsAtVisiblePosition(m_
selectionToDelete.visibleEnd()); |
795 m_needPlaceholder = !rootWillStayOpenWithoutPlaceholder | 795 m_needPlaceholder = !rootWillStayOpenWithoutPlaceholder |
796 && isStartOfParagraph(m_selectionToDelete.visibleStart(), CanCrossEditin
gBoundary) | 796 && isStartOfParagraph(m_selectionToDelete.visibleStart(), CanCrossEditin
gBoundary) |
797 && isEndOfParagraph(m_selectionToDelete.visibleEnd(), CanCrossEditingBou
ndary) | 797 && isEndOfParagraph(m_selectionToDelete.visibleEnd(), CanCrossEditingBou
ndary) |
798 && !lineBreakAtEndOfSelectionToDelete; | 798 && !lineBreakAtEndOfSelectionToDelete; |
799 if (m_needPlaceholder) { | 799 if (m_needPlaceholder) { |
800 // Don't need a placeholder when deleting a selection that starts just b
efore a table | 800 // Don't need a placeholder when deleting a selection that starts just b
efore a table |
801 // and ends inside it (we do need placeholders to hold open empty cells,
but that's | 801 // and ends inside it (we do need placeholders to hold open empty cells,
but that's |
802 // handled elsewhere). | 802 // handled elsewhere). |
803 if (Node* table = isLastPositionBeforeTable(m_selectionToDelete.visibleS
tart())) | 803 if (Element* table = isLastPositionBeforeTable(m_selectionToDelete.visib
leStart())) |
804 if (m_selectionToDelete.end().deprecatedNode()->isDescendantOf(table
)) | 804 if (m_selectionToDelete.end().deprecatedNode()->isDescendantOf(table
)) |
805 m_needPlaceholder = false; | 805 m_needPlaceholder = false; |
806 } | 806 } |
807 | 807 |
808 | 808 |
809 // set up our state | 809 // set up our state |
810 initializePositionData(); | 810 initializePositionData(); |
811 | 811 |
812 bool lineBreakBeforeStart = lineBreakExistsAtVisiblePosition(VisiblePosition
(m_upstreamStart).previous()); | 812 bool lineBreakBeforeStart = lineBreakExistsAtVisiblePosition(VisiblePosition
(m_upstreamStart).previous()); |
813 | 813 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 visitor->trace(m_deleteIntoBlockquoteStyle); | 889 visitor->trace(m_deleteIntoBlockquoteStyle); |
890 visitor->trace(m_startRoot); | 890 visitor->trace(m_startRoot); |
891 visitor->trace(m_endRoot); | 891 visitor->trace(m_endRoot); |
892 visitor->trace(m_startTableRow); | 892 visitor->trace(m_startTableRow); |
893 visitor->trace(m_endTableRow); | 893 visitor->trace(m_endTableRow); |
894 visitor->trace(m_temporaryPlaceholder); | 894 visitor->trace(m_temporaryPlaceholder); |
895 CompositeEditCommand::trace(visitor); | 895 CompositeEditCommand::trace(visitor); |
896 } | 896 } |
897 | 897 |
898 } // namespace blink | 898 } // namespace blink |
OLD | NEW |