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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 if (listItemInFirstParagraph && listItemInSecondParagraph | 646 if (listItemInFirstParagraph && listItemInSecondParagraph |
647 && listItemInFirstParagraph->parentElement() != listItemInSecondParagrap
h->parentElement() | 647 && listItemInFirstParagraph->parentElement() != listItemInSecondParagrap
h->parentElement() |
648 && canMergeLists(listItemInFirstParagraph->parentElement(), listItemInSe
condParagraph->parentElement())) { | 648 && canMergeLists(listItemInFirstParagraph->parentElement(), listItemInSe
condParagraph->parentElement())) { |
649 mergeIdenticalElements(listItemInFirstParagraph->parentElement(), listIt
emInSecondParagraph->parentElement()); | 649 mergeIdenticalElements(listItemInFirstParagraph->parentElement(), listIt
emInSecondParagraph->parentElement()); |
650 m_endingPosition = mergeDestination.deepEquivalent(); | 650 m_endingPosition = mergeDestination.deepEquivalent(); |
651 return; | 651 return; |
652 } | 652 } |
653 | 653 |
654 // The rule for merging into an empty block is: only do so if its farther to
the right. | 654 // The rule for merging into an empty block is: only do so if its farther to
the right. |
655 // FIXME: Consider RTL. | 655 // FIXME: Consider RTL. |
656 if (!m_startsAtEmptyLine && isStartOfParagraph(mergeDestination) && startOfP
aragraphToMove.absoluteCaretBounds().x() > mergeDestination.absoluteCaretBounds(
).x()) { | 656 if (!m_startsAtEmptyLine && isStartOfParagraph(mergeDestination) && absolute
CaretBoundsOf(startOfParagraphToMove).x() > absoluteCaretBoundsOf(mergeDestinati
on).x()) { |
657 if (isHTMLBRElement(*mostForwardCaretPosition(mergeDestination.deepEquiv
alent()).anchorNode())) { | 657 if (isHTMLBRElement(*mostForwardCaretPosition(mergeDestination.deepEquiv
alent()).anchorNode())) { |
658 removeNodeAndPruneAncestors(mostForwardCaretPosition(mergeDestinatio
n.deepEquivalent()).anchorNode()); | 658 removeNodeAndPruneAncestors(mostForwardCaretPosition(mergeDestinatio
n.deepEquivalent()).anchorNode()); |
659 m_endingPosition = startOfParagraphToMove.deepEquivalent(); | 659 m_endingPosition = startOfParagraphToMove.deepEquivalent(); |
660 return; | 660 return; |
661 } | 661 } |
662 } | 662 } |
663 | 663 |
664 // Block images, tables and horizontal rules cannot be made inline with cont
ent at mergeDestination. If there is | 664 // Block images, tables and horizontal rules cannot be made inline with cont
ent at mergeDestination. If there is |
665 // any (!isStartOfParagraph(mergeDestination)), don't merge, just move the c
aret to just before the selection we deleted. | 665 // any (!isStartOfParagraph(mergeDestination)), don't merge, just move the c
aret to just before the selection we deleted. |
666 // See https://bugs.webkit.org/show_bug.cgi?id=25439 | 666 // See https://bugs.webkit.org/show_bug.cgi?id=25439 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 visitor->trace(m_deleteIntoBlockquoteStyle); | 900 visitor->trace(m_deleteIntoBlockquoteStyle); |
901 visitor->trace(m_startRoot); | 901 visitor->trace(m_startRoot); |
902 visitor->trace(m_endRoot); | 902 visitor->trace(m_endRoot); |
903 visitor->trace(m_startTableRow); | 903 visitor->trace(m_startTableRow); |
904 visitor->trace(m_endTableRow); | 904 visitor->trace(m_endTableRow); |
905 visitor->trace(m_temporaryPlaceholder); | 905 visitor->trace(m_temporaryPlaceholder); |
906 CompositeEditCommand::trace(visitor); | 906 CompositeEditCommand::trace(visitor); |
907 } | 907 } |
908 | 908 |
909 } // namespace blink | 909 } // namespace blink |
OLD | NEW |