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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 2637443002: Revert of [InputEvent] Remove unused |inputType()| from |UndoStep| and |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
Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 866d02dfe99734e203c106c3f9c8b144b4f294f3..ee81dce271d7319aab59e5652f6a218db8f031a0 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -82,20 +82,23 @@
EditCommandComposition* EditCommandComposition::create(
Document* document,
const VisibleSelection& startingSelection,
- const VisibleSelection& endingSelection) {
+ const VisibleSelection& endingSelection,
+ InputEvent::InputType inputType) {
return new EditCommandComposition(document, startingSelection,
- endingSelection);
+ endingSelection, inputType);
}
EditCommandComposition::EditCommandComposition(
Document* document,
const VisibleSelection& startingSelection,
- const VisibleSelection& endingSelection)
+ const VisibleSelection& endingSelection,
+ InputEvent::InputType inputType)
: m_document(document),
m_startingSelection(startingSelection),
m_endingSelection(endingSelection),
m_startingRootEditableElement(startingSelection.rootEditableElement()),
- m_endingRootEditableElement(endingSelection.rootEditableElement()) {}
+ m_endingRootEditableElement(endingSelection.rootEditableElement()),
+ m_inputType(inputType) {}
bool EditCommandComposition::belongsTo(const LocalFrame& frame) const {
DCHECK(m_document);
@@ -157,6 +160,10 @@
bool EditCommandComposition::willReapply(EditCommandSource) {
// TODO(chongz): Fire 'beforeinput' for 'historyRedo'.
return true;
+}
+
+InputEvent::InputType EditCommandComposition::inputType() const {
+ return m_inputType;
}
void EditCommandComposition::append(SimpleEditCommand* command) {
@@ -255,10 +262,9 @@
CompositeEditCommand* command = this;
while (command && command->parent())
command = command->parent();
- if (!command->m_composition) {
+ if (!command->m_composition)
command->m_composition = EditCommandComposition::create(
- &document(), startingSelection(), endingSelection());
- }
+ &document(), startingSelection(), endingSelection(), inputType());
return command->m_composition.get();
}

Powered by Google App Engine
This is Rietveld 408576698