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

Side by Side Diff: third_party/WebKit/WebCore/editing/EditCommand.cpp

Issue 39293: WebKit merge 41447:41498 [third_party/WebKit] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove CRLF Created 11 years, 9 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 | « third_party/WebKit/WebCore/dom/Node.cpp ('k') | third_party/WebKit/WebCore/editing/Editor.h » ('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 Apple, Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (!m_parent) 87 if (!m_parent)
88 updateLayout(); 88 updateLayout();
89 89
90 DeleteButtonController* deleteButtonController = frame->editor()->deleteButt onController(); 90 DeleteButtonController* deleteButtonController = frame->editor()->deleteButt onController();
91 deleteButtonController->disable(); 91 deleteButtonController->disable();
92 doApply(); 92 doApply();
93 deleteButtonController->enable(); 93 deleteButtonController->enable();
94 94
95 if (!m_parent) { 95 if (!m_parent) {
96 updateLayout(); 96 updateLayout();
97 frame->editor()->appliedEditing(this); 97 // Only need to call appliedEditing for top-level commands, and TypingCo mmands do it on their
98 // own (see TypingCommand::typingAddedToOpenCommand).
99 if (!isTypingCommand())
100 frame->editor()->appliedEditing(this);
98 } 101 }
99 } 102 }
100 103
101 void EditCommand::unapply() 104 void EditCommand::unapply()
102 { 105 {
103 ASSERT(m_document); 106 ASSERT(m_document);
104 ASSERT(m_document->frame()); 107 ASSERT(m_document->frame());
105 108
106 Frame* frame = m_document->frame(); 109 Frame* frame = m_document->frame();
107 110
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 m_endingRootEditableElement = parent->m_endingRootEditableElement; 225 m_endingRootEditableElement = parent->m_endingRootEditableElement;
223 } 226 }
224 227
225 void applyCommand(PassRefPtr<EditCommand> command) 228 void applyCommand(PassRefPtr<EditCommand> command)
226 { 229 {
227 command->apply(); 230 command->apply();
228 } 231 }
229 232
230 } // namespace WebCore 233 } // namespace WebCore
231 234
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/dom/Node.cpp ('k') | third_party/WebKit/WebCore/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698