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

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

Issue 2636043002: Revert of [EditCommandSource] Pass source to |CompositEditCommand| and |TypingCommand| (3/3) (Closed)
Patch Set: Remove command source in ApplyStyleCommandTest.cpp 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 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 }; 89 };
90 90
91 class CORE_EXPORT CompositeEditCommand : public EditCommand { 91 class CORE_EXPORT CompositeEditCommand : public EditCommand {
92 public: 92 public:
93 enum ShouldPreserveSelection { PreserveSelection, DoNotPreserveSelection }; 93 enum ShouldPreserveSelection { PreserveSelection, DoNotPreserveSelection };
94 enum ShouldPreserveStyle { PreserveStyle, DoNotPreserveStyle }; 94 enum ShouldPreserveStyle { PreserveStyle, DoNotPreserveStyle };
95 95
96 ~CompositeEditCommand() override; 96 ~CompositeEditCommand() override;
97 97
98 // Returns |false| if the command failed. e.g. It's aborted. 98 // Returns |false| if the command failed. e.g. It's aborted.
99 bool apply(EditCommandSource); 99 bool apply();
100 bool isFirstCommand(EditCommand* command) { 100 bool isFirstCommand(EditCommand* command) {
101 return !m_commands.isEmpty() && m_commands.front() == command; 101 return !m_commands.isEmpty() && m_commands.front() == command;
102 } 102 }
103 EditCommandComposition* composition() { return m_composition.get(); } 103 EditCommandComposition* composition() { return m_composition.get(); }
104 EditCommandComposition* ensureComposition(); 104 EditCommandComposition* ensureComposition();
105 // Append composition from an already applied command. 105 // Append composition from an already applied command.
106 void appendCommandToComposite(CompositeEditCommand*); 106 void appendCommandToComposite(CompositeEditCommand*);
107 107
108 virtual bool isReplaceSelectionCommand() const; 108 virtual bool isReplaceSelectionCommand() const;
109 virtual bool isTypingCommand() const; 109 virtual bool isTypingCommand() const;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 DEFINE_TYPE_CASTS(CompositeEditCommand, 273 DEFINE_TYPE_CASTS(CompositeEditCommand,
274 EditCommand, 274 EditCommand,
275 command, 275 command,
276 command->isCompositeEditCommand(), 276 command->isCompositeEditCommand(),
277 command.isCompositeEditCommand()); 277 command.isCompositeEditCommand());
278 278
279 } // namespace blink 279 } // namespace blink
280 280
281 #endif // CompositeEditCommand_h 281 #endif // CompositeEditCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698