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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 class CORE_EXPORT CompositeEditCommand : public EditCommand { 89 class CORE_EXPORT CompositeEditCommand : public EditCommand {
90 public: 90 public:
91 enum ShouldPreserveSelection { PreserveSelection, DoNotPreserveSelection }; 91 enum ShouldPreserveSelection { PreserveSelection, DoNotPreserveSelection };
92 enum ShouldPreserveStyle { PreserveStyle, DoNotPreserveStyle }; 92 enum ShouldPreserveStyle { PreserveStyle, DoNotPreserveStyle };
93 93
94 ~CompositeEditCommand() override; 94 ~CompositeEditCommand() override;
95 95
96 // Returns |false| if the command failed. e.g. It's aborted. 96 // Returns |false| if the command failed. e.g. It's aborted.
97 bool apply(); 97 bool apply();
98 bool isFirstCommand(EditCommand* command) { 98 bool isFirstCommand(EditCommand* command) {
99 return !m_commands.isEmpty() && m_commands.first() == command; 99 return !m_commands.isEmpty() && m_commands.front() == command;
100 } 100 }
101 EditCommandComposition* composition() { return m_composition.get(); } 101 EditCommandComposition* composition() { return m_composition.get(); }
102 EditCommandComposition* ensureComposition(); 102 EditCommandComposition* ensureComposition();
103 // Append composition from an already applied command. 103 // Append composition from an already applied command.
104 void appendCommandToComposite(CompositeEditCommand*); 104 void appendCommandToComposite(CompositeEditCommand*);
105 105
106 virtual bool isReplaceSelectionCommand() const; 106 virtual bool isReplaceSelectionCommand() const;
107 virtual bool isTypingCommand() const; 107 virtual bool isTypingCommand() const;
108 virtual bool isCommandGroupWrapper() const; 108 virtual bool isCommandGroupWrapper() const;
109 virtual bool isDragAndDropCommand() const; 109 virtual bool isDragAndDropCommand() const;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 DEFINE_TYPE_CASTS(CompositeEditCommand, 271 DEFINE_TYPE_CASTS(CompositeEditCommand,
272 EditCommand, 272 EditCommand,
273 command, 273 command,
274 command->isCompositeEditCommand(), 274 command->isCompositeEditCommand(),
275 command.isCompositeEditCommand()); 275 command.isCompositeEditCommand());
276 276
277 } // namespace blink 277 } // namespace blink
278 278
279 #endif // CompositeEditCommand_h 279 #endif // CompositeEditCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698