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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/EditCommand.h

Issue 2558643003: [InputEvent] Move 'beforeinput' logic into |CompositeEditCommand::willApplyEditing()| (3/3) (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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 virtual bool isSimpleEditCommand() const { return false; } 53 virtual bool isSimpleEditCommand() const { return false; }
54 virtual bool isCompositeEditCommand() const { return false; } 54 virtual bool isCompositeEditCommand() const { return false; }
55 bool isTopLevelCommand() const { return !m_parent; } 55 bool isTopLevelCommand() const { return !m_parent; }
56 56
57 // The |EditingState*| argument must not be nullptr. 57 // The |EditingState*| argument must not be nullptr.
58 virtual void doApply(EditingState*) = 0; 58 virtual void doApply(EditingState*) = 0;
59 59
60 // |TypingCommand| will return the text of the last |m_commands|. 60 // |TypingCommand| will return the text of the last |m_commands|.
61 virtual String textDataForInputEvent() const; 61 virtual String textDataForInputEvent() const;
62 virtual DataTransfer* dataTransferForInputEvent() const;
63 virtual RangeVector* targetRangesForInputEvent() const;
62 64
63 DECLARE_VIRTUAL_TRACE(); 65 DECLARE_VIRTUAL_TRACE();
64 66
65 protected: 67 protected:
66 explicit EditCommand(Document&); 68 explicit EditCommand(Document&);
67 69
68 Document& document() const { return *m_document.get(); } 70 Document& document() const { return *m_document.get(); }
69 CompositeEditCommand* parent() const { return m_parent; } 71 CompositeEditCommand* parent() const { return m_parent; }
70 void setStartingSelection(const VisibleSelection&); 72 void setStartingSelection(const VisibleSelection&);
71 void setEndingSelection(const SelectionInDOMTree&); 73 void setEndingSelection(const SelectionInDOMTree&);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 106
105 DEFINE_TYPE_CASTS(SimpleEditCommand, 107 DEFINE_TYPE_CASTS(SimpleEditCommand,
106 EditCommand, 108 EditCommand,
107 command, 109 command,
108 command->isSimpleEditCommand(), 110 command->isSimpleEditCommand(),
109 command.isSimpleEditCommand()); 111 command.isSimpleEditCommand());
110 112
111 } // namespace blink 113 } // namespace blink
112 114
113 #endif // EditCommand_h 115 #endif // EditCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698