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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.h

Issue 2533703002: Don't refer to removed spans when reformulating pasted content. (Closed)
Patch Set: Address nit. Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.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, 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return m_lastNodeInserted 84 return m_lastNodeInserted
85 ? &NodeTraversal::lastWithinOrSelf(*m_lastNodeInserted) 85 ? &NodeTraversal::lastWithinOrSelf(*m_lastNodeInserted)
86 : 0; 86 : 0;
87 } 87 }
88 Node* pastLastLeaf() const { 88 Node* pastLastLeaf() const {
89 return m_lastNodeInserted 89 return m_lastNodeInserted
90 ? NodeTraversal::next( 90 ? NodeTraversal::next(
91 NodeTraversal::lastWithinOrSelf(*m_lastNodeInserted)) 91 NodeTraversal::lastWithinOrSelf(*m_lastNodeInserted))
92 : 0; 92 : 0;
93 } 93 }
94 Node* refNode() const { return m_refNode.get(); }
95 void setRefNode(Node* node) { m_refNode = node; }
94 96
95 private: 97 private:
96 Member<Node> m_firstNodeInserted; 98 Member<Node> m_firstNodeInserted;
97 Member<Node> m_lastNodeInserted; 99 Member<Node> m_lastNodeInserted;
100 Member<Node> m_refNode;
98 }; 101 };
99 102
100 Node* insertAsListItems(HTMLElement* listElement, 103 Node* insertAsListItems(HTMLElement* listElement,
101 Element* insertionBlock, 104 Element* insertionBlock,
102 const Position&, 105 const Position&,
103 InsertedNodes&, 106 InsertedNodes&,
104 EditingState*); 107 EditingState*);
105 108
106 void updateNodesInserted(Node*); 109 void updateNodesInserted(Node*);
107 bool shouldRemoveEndBR(HTMLBRElement*, const VisiblePosition&); 110 bool shouldRemoveEndBR(HTMLBRElement*, const VisiblePosition&);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 157
155 DEFINE_TYPE_CASTS(ReplaceSelectionCommand, 158 DEFINE_TYPE_CASTS(ReplaceSelectionCommand,
156 CompositeEditCommand, 159 CompositeEditCommand,
157 command, 160 command,
158 command->isReplaceSelectionCommand(), 161 command->isReplaceSelectionCommand(),
159 command.isReplaceSelectionCommand()); 162 command.isReplaceSelectionCommand());
160 163
161 } // namespace blink 164 } // namespace blink
162 165
163 #endif // ReplaceSelectionCommand_h 166 #endif // ReplaceSelectionCommand_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698