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

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

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 years, 8 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, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 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 20 matching lines...) Expand all
31 #include "core/dom/Element.h" 31 #include "core/dom/Element.h"
32 #include "wtf/Assertions.h" 32 #include "wtf/Assertions.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 SplitElementCommand::SplitElementCommand(Element* element, Node* atChild) 36 SplitElementCommand::SplitElementCommand(Element* element, Node* atChild)
37 : SimpleEditCommand(element->document()) 37 : SimpleEditCommand(element->document())
38 , m_element2(element) 38 , m_element2(element)
39 , m_atChild(atChild) 39 , m_atChild(atChild)
40 { 40 {
41 ASSERT(m_element2); 41 DCHECK(m_element2);
42 ASSERT(m_atChild); 42 DCHECK(m_atChild);
43 ASSERT(m_atChild->parentNode() == m_element2); 43 DCHECK_EQ(m_atChild->parentNode(), m_element2);
44 } 44 }
45 45
46 void SplitElementCommand::executeApply() 46 void SplitElementCommand::executeApply()
47 { 47 {
48 if (m_atChild->parentNode() != m_element2) 48 if (m_atChild->parentNode() != m_element2)
49 return; 49 return;
50 50
51 HeapVector<Member<Node>> children; 51 HeapVector<Member<Node>> children;
52 for (Node* node = m_element2->firstChild(); node != m_atChild; node = node-> nextSibling()) 52 for (Node* node = m_element2->firstChild(); node != m_atChild; node = node-> nextSibling())
53 children.append(node); 53 children.append(node);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 DEFINE_TRACE(SplitElementCommand) 107 DEFINE_TRACE(SplitElementCommand)
108 { 108 {
109 visitor->trace(m_element1); 109 visitor->trace(m_element1);
110 visitor->trace(m_element2); 110 visitor->trace(m_element2);
111 visitor->trace(m_atChild); 111 visitor->trace(m_atChild);
112 SimpleEditCommand::trace(visitor); 112 SimpleEditCommand::trace(visitor);
113 } 113 }
114 114
115 } // namespace blink 115 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698