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

Side by Side Diff: Source/core/editing/TypingCommand.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698