| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 selection.modify(FrameSelection::AlterationExtend, DirectionForward,
CharacterGranularity); | 523 selection.modify(FrameSelection::AlterationExtend, DirectionForward,
CharacterGranularity); |
| 524 | 524 |
| 525 Position downstreamEnd = endingSelection().end().downstream(); | 525 Position downstreamEnd = endingSelection().end().downstream(); |
| 526 VisiblePosition visibleEnd = endingSelection().visibleEnd(); | 526 VisiblePosition visibleEnd = endingSelection().visibleEnd(); |
| 527 Node* enclosingTableCell = enclosingNodeOfType(visibleEnd.deepEquivalent
(), &isTableCell); | 527 Node* enclosingTableCell = enclosingNodeOfType(visibleEnd.deepEquivalent
(), &isTableCell); |
| 528 if (enclosingTableCell && visibleEnd == lastPositionInNode(enclosingTabl
eCell)) | 528 if (enclosingTableCell && visibleEnd == lastPositionInNode(enclosingTabl
eCell)) |
| 529 return; | 529 return; |
| 530 if (visibleEnd == endOfParagraph(visibleEnd)) | 530 if (visibleEnd == endOfParagraph(visibleEnd)) |
| 531 downstreamEnd = visibleEnd.next(CannotCrossEditingBoundary).deepEqui
valent().downstream(); | 531 downstreamEnd = visibleEnd.next(CannotCrossEditingBoundary).deepEqui
valent().downstream(); |
| 532 // When deleting tables: Select the table first, then perform the deleti
on | 532 // When deleting tables: Select the table first, then perform the deleti
on |
| 533 if (downstreamEnd.containerNode() && downstreamEnd.containerNode()->rend
erer() && downstreamEnd.containerNode()->renderer()->isTable() | 533 if (isRenderedTable(downstreamEnd.containerNode()) && downstreamEnd.comp
uteOffsetInContainerNode() <= caretMinOffset(downstreamEnd.containerNode())) { |
| 534 && downstreamEnd.computeOffsetInContainerNode() <= caretMinOffset(do
wnstreamEnd.containerNode())) { | |
| 535 setEndingSelection(VisibleSelection(endingSelection().end(), positio
nAfterNode(downstreamEnd.containerNode()), DOWNSTREAM, endingSelection().isDirec
tional())); | 534 setEndingSelection(VisibleSelection(endingSelection().end(), positio
nAfterNode(downstreamEnd.containerNode()), DOWNSTREAM, endingSelection().isDirec
tional())); |
| 536 typingAddedToOpenCommand(ForwardDeleteKey); | 535 typingAddedToOpenCommand(ForwardDeleteKey); |
| 537 return; | 536 return; |
| 538 } | 537 } |
| 539 | 538 |
| 540 // deleting to end of paragraph when at end of paragraph needs to merge
the next paragraph (if any) | 539 // deleting to end of paragraph when at end of paragraph needs to merge
the next paragraph (if any) |
| 541 if (granularity == ParagraphBoundary && selection.selection().isCaret()
&& isEndOfParagraph(selection.selection().visibleEnd())) | 540 if (granularity == ParagraphBoundary && selection.selection().isCaret()
&& isEndOfParagraph(selection.selection().visibleEnd())) |
| 542 selection.modify(FrameSelection::AlterationExtend, DirectionForward,
CharacterGranularity); | 541 selection.modify(FrameSelection::AlterationExtend, DirectionForward,
CharacterGranularity); |
| 543 | 542 |
| 544 selectionToDelete = selection.selection(); | 543 selectionToDelete = selection.selection(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 ASSERT_NOT_REACHED(); | 608 ASSERT_NOT_REACHED(); |
| 610 m_preservesTypingStyle = false; | 609 m_preservesTypingStyle = false; |
| 611 } | 610 } |
| 612 | 611 |
| 613 bool TypingCommand::isTypingCommand() const | 612 bool TypingCommand::isTypingCommand() const |
| 614 { | 613 { |
| 615 return true; | 614 return true; |
| 616 } | 615 } |
| 617 | 616 |
| 618 } // namespace WebCore | 617 } // namespace WebCore |
| OLD | NEW |