Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: Source/core/editing/TypingCommand.cpp

Issue 26237004: Remove unused editing related member functions from WebViewClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-10-09T17:59:14 Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/SpellingCorrectionCommand.cpp ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 472 }
473 case VisibleSelection::NoSelection: 473 case VisibleSelection::NoSelection:
474 ASSERT_NOT_REACHED(); 474 ASSERT_NOT_REACHED();
475 break; 475 break;
476 } 476 }
477 477
478 ASSERT(!selectionToDelete.isNone()); 478 ASSERT(!selectionToDelete.isNone());
479 if (selectionToDelete.isNone()) 479 if (selectionToDelete.isNone())
480 return; 480 return;
481 481
482 if (selectionToDelete.isCaret() || !frame->selection().shouldDeleteSelection (selectionToDelete)) 482 if (selectionToDelete.isCaret())
483 return; 483 return;
484 484
485 if (killRing) 485 if (killRing)
486 frame->editor().addToKillRing(selectionToDelete.toNormalizedRange().get( ), false); 486 frame->editor().addToKillRing(selectionToDelete.toNormalizedRange().get( ), false);
487 // Make undo select everything that has been deleted, unless an undo will un do more than just this deletion. 487 // Make undo select everything that has been deleted, unless an undo will un do more than just this deletion.
488 // FIXME: This behaves like TextEdit except for the case where you open with text insertion and then delete 488 // FIXME: This behaves like TextEdit except for the case where you open with text insertion and then delete
489 // more text than you insert. In that case all of the text that was around originally should be selected. 489 // more text than you insert. In that case all of the text that was around originally should be selected.
490 if (m_openedByBackwardDelete) 490 if (m_openedByBackwardDelete)
491 setStartingSelection(selectionAfterUndo); 491 setStartingSelection(selectionAfterUndo);
492 CompositeEditCommand::deleteSelection(selectionToDelete, m_smartDelete); 492 CompositeEditCommand::deleteSelection(selectionToDelete, m_smartDelete);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 } 565 }
566 case VisibleSelection::NoSelection: 566 case VisibleSelection::NoSelection:
567 ASSERT_NOT_REACHED(); 567 ASSERT_NOT_REACHED();
568 break; 568 break;
569 } 569 }
570 570
571 ASSERT(!selectionToDelete.isNone()); 571 ASSERT(!selectionToDelete.isNone());
572 if (selectionToDelete.isNone()) 572 if (selectionToDelete.isNone())
573 return; 573 return;
574 574
575 if (selectionToDelete.isCaret() || !frame->selection().shouldDeleteSelection (selectionToDelete)) 575 if (selectionToDelete.isCaret())
576 return; 576 return;
577 577
578 if (killRing) 578 if (killRing)
579 frame->editor().addToKillRing(selectionToDelete.toNormalizedRange().get( ), false); 579 frame->editor().addToKillRing(selectionToDelete.toNormalizedRange().get( ), false);
580 // make undo select what was deleted 580 // make undo select what was deleted
581 setStartingSelection(selectionAfterUndo); 581 setStartingSelection(selectionAfterUndo);
582 CompositeEditCommand::deleteSelection(selectionToDelete, m_smartDelete); 582 CompositeEditCommand::deleteSelection(selectionToDelete, m_smartDelete);
583 setSmartDelete(false); 583 setSmartDelete(false);
584 typingAddedToOpenCommand(ForwardDeleteKey); 584 typingAddedToOpenCommand(ForwardDeleteKey);
585 } 585 }
(...skipping 22 matching lines...) Expand all
608 ASSERT_NOT_REACHED(); 608 ASSERT_NOT_REACHED();
609 m_preservesTypingStyle = false; 609 m_preservesTypingStyle = false;
610 } 610 }
611 611
612 bool TypingCommand::isTypingCommand() const 612 bool TypingCommand::isTypingCommand() const
613 { 613 {
614 return true; 614 return true;
615 } 615 }
616 616
617 } // namespace WebCore 617 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/SpellingCorrectionCommand.cpp ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698