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

Unified Diff: third_party/WebKit/WebCore/editing/TypingCommand.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/WebCore/editing/TypingCommand.cpp
===================================================================
--- third_party/WebKit/WebCore/editing/TypingCommand.cpp (revision 9391)
+++ third_party/WebKit/WebCore/editing/TypingCommand.cpp (working copy)
@@ -373,12 +373,12 @@
Selection selectionToDelete;
Selection selectionAfterUndo;
- switch (endingSelection().state()) {
- case Selection::RANGE:
+ switch (endingSelection().selectionType()) {
+ case Selection::RangeSelection:
selectionToDelete = endingSelection();
selectionAfterUndo = selectionToDelete;
break;
- case Selection::CARET: {
+ case Selection::CaretSelection: {
if (breakOutOfEmptyMailBlockquotedParagraph()) {
typingAddedToOpenCommand();
return;
@@ -431,14 +431,14 @@
selectionAfterUndo.setWithoutValidation(startingSelection().end(), selectionToDelete.extent());
break;
}
- case Selection::NONE:
+ case Selection::NoSelection:
ASSERT_NOT_REACHED();
break;
}
if (selectionToDelete.isCaretOrRange() && document()->frame()->shouldDeleteSelection(selectionToDelete)) {
if (killRing)
- document()->frame()->editor()->addToKillRing(selectionToDelete.toRange().get(), false);
+ document()->frame()->editor()->addToKillRing(selectionToDelete.toNormalizedRange().get(), false);
// Make undo select everything that has been deleted, unless an undo will undo more than just this deletion.
// FIXME: This behaves like TextEdit except for the case where you open with text insertion and then delete
// more text than you insert. In that case all of the text that was around originally should be selected.
@@ -455,12 +455,12 @@
Selection selectionToDelete;
Selection selectionAfterUndo;
- switch (endingSelection().state()) {
- case Selection::RANGE:
+ switch (endingSelection().selectionType()) {
+ case Selection::RangeSelection:
selectionToDelete = endingSelection();
selectionAfterUndo = selectionToDelete;
break;
- case Selection::CARET: {
+ case Selection::CaretSelection: {
m_smartDelete = false;
// Handle delete at beginning-of-block case.
@@ -509,14 +509,14 @@
}
break;
}
- case Selection::NONE:
+ case Selection::NoSelection:
ASSERT_NOT_REACHED();
break;
}
if (selectionToDelete.isCaretOrRange() && document()->frame()->shouldDeleteSelection(selectionToDelete)) {
if (killRing)
- document()->frame()->editor()->addToKillRing(selectionToDelete.toRange().get(), false);
+ document()->frame()->editor()->addToKillRing(selectionToDelete.toNormalizedRange().get(), false);
// make undo select what was deleted
setStartingSelection(selectionAfterUndo);
CompositeEditCommand::deleteSelection(selectionToDelete, m_smartDelete);
« no previous file with comments | « third_party/WebKit/WebCore/editing/SelectionController.h ('k') | third_party/WebKit/WebCore/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698