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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/AppendNodeCommand.cpp

Issue 2615953003: Rename IGNORE_EXCEPTION to IGNORE_EXCEPTION_FOR_TESTING (Closed)
Patch Set: temp 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 26 matching lines...) Expand all
37 DCHECK(!m_node->parentNode()) << m_node; 37 DCHECK(!m_node->parentNode()) << m_node;
38 38
39 DCHECK(hasEditableStyle(*m_parent) || !m_parent->inActiveDocument()) 39 DCHECK(hasEditableStyle(*m_parent) || !m_parent->inActiveDocument())
40 << m_parent; 40 << m_parent;
41 } 41 }
42 42
43 void AppendNodeCommand::doApply(EditingState*) { 43 void AppendNodeCommand::doApply(EditingState*) {
44 if (!hasEditableStyle(*m_parent) && m_parent->inActiveDocument()) 44 if (!hasEditableStyle(*m_parent) && m_parent->inActiveDocument())
45 return; 45 return;
46 46
47 m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION); 47 m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION_FOR_TESTING);
48 } 48 }
49 49
50 void AppendNodeCommand::doUnapply() { 50 void AppendNodeCommand::doUnapply() {
51 if (!hasEditableStyle(*m_parent)) 51 if (!hasEditableStyle(*m_parent))
52 return; 52 return;
53 53
54 m_node->remove(IGNORE_EXCEPTION); 54 m_node->remove(IGNORE_EXCEPTION_FOR_TESTING);
55 } 55 }
56 56
57 DEFINE_TRACE(AppendNodeCommand) { 57 DEFINE_TRACE(AppendNodeCommand) {
58 visitor->trace(m_parent); 58 visitor->trace(m_parent);
59 visitor->trace(m_node); 59 visitor->trace(m_node);
60 SimpleEditCommand::trace(visitor); 60 SimpleEditCommand::trace(visitor);
61 } 61 }
62 62
63 } // namespace blink 63 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698