| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 TypingCommand::create(document, InsertParagraphSeparator, "", options)->appl
y(); | 227 TypingCommand::create(document, InsertParagraphSeparator, "", options)->appl
y(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 PassRefPtr<TypingCommand> TypingCommand::lastTypingCommandIfStillOpenForTyping(F
rame* frame) | 230 PassRefPtr<TypingCommand> TypingCommand::lastTypingCommandIfStillOpenForTyping(F
rame* frame) |
| 231 { | 231 { |
| 232 ASSERT(frame); | 232 ASSERT(frame); |
| 233 | 233 |
| 234 RefPtr<CompositeEditCommand> lastEditCommand = frame->editor().lastEditComma
nd(); | 234 RefPtr<CompositeEditCommand> lastEditCommand = frame->editor().lastEditComma
nd(); |
| 235 if (!lastEditCommand || !lastEditCommand->isTypingCommand() || !static_cast<
TypingCommand*>(lastEditCommand.get())->isOpenForMoreTyping()) | 235 if (!lastEditCommand || !lastEditCommand->isTypingCommand() || !static_cast<
TypingCommand*>(lastEditCommand.get())->isOpenForMoreTyping()) |
| 236 return 0; | 236 return nullptr; |
| 237 | 237 |
| 238 return static_cast<TypingCommand*>(lastEditCommand.get()); | 238 return static_cast<TypingCommand*>(lastEditCommand.get()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void TypingCommand::closeTyping(Frame* frame) | 241 void TypingCommand::closeTyping(Frame* frame) |
| 242 { | 242 { |
| 243 if (RefPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenFo
rTyping(frame)) | 243 if (RefPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenFo
rTyping(frame)) |
| 244 lastTypingCommand->closeTyping(); | 244 lastTypingCommand->closeTyping(); |
| 245 } | 245 } |
| 246 | 246 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 ASSERT_NOT_REACHED(); | 618 ASSERT_NOT_REACHED(); |
| 619 m_preservesTypingStyle = false; | 619 m_preservesTypingStyle = false; |
| 620 } | 620 } |
| 621 | 621 |
| 622 bool TypingCommand::isTypingCommand() const | 622 bool TypingCommand::isTypingCommand() const |
| 623 { | 623 { |
| 624 return true; | 624 return true; |
| 625 } | 625 } |
| 626 | 626 |
| 627 } // namespace WebCore | 627 } // namespace WebCore |
| OLD | NEW |