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

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

Issue 2558643003: [InputEvent] Move 'beforeinput' logic into |CompositeEditCommand::willApplyEditing()| (3/3) (Closed)
Patch Set: yosin's review, fix nits 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual bool isDragAndDropCommand() const; 109 virtual bool isDragAndDropCommand() const;
110 virtual bool preservesTypingStyle() const; 110 virtual bool preservesTypingStyle() const;
111 virtual void setShouldRetainAutocorrectionIndicator(bool); 111 virtual void setShouldRetainAutocorrectionIndicator(bool);
112 virtual bool shouldStopCaretBlinking() const { return false; } 112 virtual bool shouldStopCaretBlinking() const { return false; }
113 113
114 DECLARE_VIRTUAL_TRACE(); 114 DECLARE_VIRTUAL_TRACE();
115 115
116 protected: 116 protected:
117 explicit CompositeEditCommand(Document&); 117 explicit CompositeEditCommand(Document&);
118 118
119 // Returns |false| to cancel applying command. Only "beforeinput" event
120 // handler asks to cancel.
121 virtual bool willApply();
122
119 // 123 //
120 // sugary-sweet convenience functions to help create and apply edit commands 124 // sugary-sweet convenience functions to help create and apply edit commands
121 // in composite commands 125 // in composite commands
122 // 126 //
123 void appendNode(Node*, ContainerNode* parent, EditingState*); 127 void appendNode(Node*, ContainerNode* parent, EditingState*);
124 void applyCommandToComposite(EditCommand*, EditingState*); 128 void applyCommandToComposite(EditCommand*, EditingState*);
125 void applyCommandToComposite(CompositeEditCommand*, 129 void applyCommandToComposite(CompositeEditCommand*,
126 const VisibleSelection&, 130 const VisibleSelection&,
127 EditingState*); 131 EditingState*);
128 void applyStyle(const EditingStyle*, EditingState*); 132 void applyStyle(const EditingStyle*, EditingState*);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 274
271 DEFINE_TYPE_CASTS(CompositeEditCommand, 275 DEFINE_TYPE_CASTS(CompositeEditCommand,
272 EditCommand, 276 EditCommand,
273 command, 277 command,
274 command->isCompositeEditCommand(), 278 command->isCompositeEditCommand(),
275 command.isCompositeEditCommand()); 279 command.isCompositeEditCommand());
276 280
277 } // namespace blink 281 } // namespace blink
278 282
279 #endif // CompositeEditCommand_h 283 #endif // CompositeEditCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698