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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2636403002: Clean up names related to EditCommandComposition (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index d5cbfa241d6090d5e235fc75e7548457dc241578..0efff2a54a1b41f26e0e83ac85c13e7b3ae68500 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -836,15 +836,14 @@ void Editor::appliedEditing(CompositeEditCommand* cmd) {
// Request spell checking before any further DOM change.
spellChecker().markMisspellingsAfterApplyingCommand(*cmd);
- UndoStep* composition = cmd->composition();
- DCHECK(composition);
- dispatchEditableContentChangedEvents(
- composition->startingRootEditableElement(),
- composition->endingRootEditableElement());
+ UndoStep* undoStep = cmd->undoStep();
+ DCHECK(undoStep);
+ dispatchEditableContentChangedEvents(undoStep->startingRootEditableElement(),
+ undoStep->endingRootEditableElement());
// TODO(chongz): Filter empty InputType after spec is finalized.
dispatchInputEventEditableContentChanged(
- composition->startingRootEditableElement(),
- composition->endingRootEditableElement(), cmd->inputType(),
+ undoStep->startingRootEditableElement(),
+ undoStep->endingRootEditableElement(), cmd->inputType(),
cmd->textDataForInputEvent(), isComposingFromCommand(cmd));
// TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
@@ -870,14 +869,14 @@ void Editor::appliedEditing(CompositeEditCommand* cmd) {
(cmd->inputType() == InputEvent::InputType::DeleteByDrag ||
cmd->inputType() == InputEvent::InputType::InsertFromDrop)) {
// Only register undo entry when combined with other commands.
- if (!m_lastEditCommand->composition())
- m_undoStack->registerUndoStep(m_lastEditCommand->ensureComposition());
- m_lastEditCommand->appendCommandToComposite(cmd);
+ if (!m_lastEditCommand->undoStep())
+ m_undoStack->registerUndoStep(m_lastEditCommand->ensureUndoStep());
+ m_lastEditCommand->appendCommandToUndoStep(cmd);
} else {
// Only register a new undo command if the command passed in is
// different from the last command
m_lastEditCommand = cmd;
- m_undoStack->registerUndoStep(m_lastEditCommand->ensureComposition());
+ m_undoStack->registerUndoStep(m_lastEditCommand->ensureUndoStep());
}
respondToChangedContents(newSelection);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698