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

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

Issue 2574793002: [Editing] Store |CommandSource| in |CompositeEditCommand| (Closed)
Patch Set: Created 4 years 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.h
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
index 2289ba003dbe6ab03853a66d221e545f53d649ea..82f56e8e5440553d8d002c231bf62dc8a8cc1345 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
@@ -42,6 +42,8 @@ class HTMLElement;
class HTMLSpanElement;
class Text;
+enum class CommandSource { MenuOrKeyBinding, Dom };
+
class EditCommandComposition final : public UndoStep {
public:
static EditCommandComposition* create(Document*,
@@ -114,7 +116,7 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand {
DECLARE_VIRTUAL_TRACE();
protected:
- explicit CompositeEditCommand(Document&);
+ CompositeEditCommand(Document&, CommandSource);
//
// sugary-sweet convenience functions to help create and apply edit commands
@@ -260,12 +262,15 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand {
Node* splitTreeToNode(Node*, Node*, bool splitAncestor = false);
+ CommandSource commandSource() const;
+
HeapVector<Member<EditCommand>> m_commands;
private:
bool isCompositeEditCommand() const final { return true; }
Member<EditCommandComposition> m_composition;
+ CommandSource m_source;
};
DEFINE_TYPE_CASTS(CompositeEditCommand,

Powered by Google App Engine
This is Rietveld 408576698