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

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

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized Created 6 years, 6 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 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/editing/InsertNodeBeforeCommand.h" 27 #include "core/editing/InsertNodeBeforeCommand.h"
28 28
29 #include "bindings/v8/ExceptionStatePlaceholder.h" 29 #include "bindings/v8/ExceptionStatePlaceholder.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 InsertNodeBeforeCommand::InsertNodeBeforeCommand(PassRefPtr<Node> insertChild, P assRefPtr<Node> refChild, 34 InsertNodeBeforeCommand::InsertNodeBeforeCommand(PassRefPtrWillBeRawPtr<Node> in sertChild, PassRefPtrWillBeRawPtr<Node> refChild,
35 ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable) 35 ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
36 : SimpleEditCommand(refChild->document()) 36 : SimpleEditCommand(refChild->document())
37 , m_insertChild(insertChild) 37 , m_insertChild(insertChild)
38 , m_refChild(refChild) 38 , m_refChild(refChild)
39 , m_shouldAssumeContentIsAlwaysEditable(shouldAssumeContentIsAlwaysEditable) 39 , m_shouldAssumeContentIsAlwaysEditable(shouldAssumeContentIsAlwaysEditable)
40 { 40 {
41 ASSERT(m_insertChild); 41 ASSERT(m_insertChild);
42 ASSERT(!m_insertChild->parentNode()); 42 ASSERT(!m_insertChild->parentNode());
43 ASSERT(m_refChild); 43 ASSERT(m_refChild);
44 ASSERT(m_refChild->parentNode()); 44 ASSERT(m_refChild->parentNode());
(...skipping 12 matching lines...) Expand all
57 } 57 }
58 58
59 void InsertNodeBeforeCommand::doUnapply() 59 void InsertNodeBeforeCommand::doUnapply()
60 { 60 {
61 if (!m_insertChild->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable )) 61 if (!m_insertChild->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable ))
62 return; 62 return;
63 63
64 m_insertChild->remove(IGNORE_EXCEPTION); 64 m_insertChild->remove(IGNORE_EXCEPTION);
65 } 65 }
66 66
67 void InsertNodeBeforeCommand::trace(Visitor* visitor)
68 {
69 visitor->trace(m_insertChild);
70 visitor->trace(m_refChild);
71 SimpleEditCommand::trace(visitor);
67 } 72 }
73
74 }
OLDNEW
« no previous file with comments | « Source/core/editing/InsertNodeBeforeCommand.h ('k') | Source/core/editing/InsertParagraphSeparatorCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698