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

Side by Side Diff: Source/core/editing/CompositeEditCommand.h

Issue 16053005: Avoid removing destination during moving paragrahs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-07-11T15:13:49 Created 7 years, 5 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
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text>, int startOffset, i nt endOffset); 117 void rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text>, int startOffset, i nt endOffset);
118 void prepareWhitespaceAtPositionForSplit(Position&); 118 void prepareWhitespaceAtPositionForSplit(Position&);
119 bool canRebalance(const Position&) const; 119 bool canRebalance(const Position&) const;
120 bool shouldRebalanceLeadingWhitespaceFor(const String&) const; 120 bool shouldRebalanceLeadingWhitespaceFor(const String&) const;
121 void removeCSSProperty(PassRefPtr<Element>, CSSPropertyID); 121 void removeCSSProperty(PassRefPtr<Element>, CSSPropertyID);
122 void removeNodeAttribute(PassRefPtr<Element>, const QualifiedName& attribute ); 122 void removeNodeAttribute(PassRefPtr<Element>, const QualifiedName& attribute );
123 void removeChildrenInRange(PassRefPtr<Node>, unsigned from, unsigned to); 123 void removeChildrenInRange(PassRefPtr<Node>, unsigned from, unsigned to);
124 virtual void removeNode(PassRefPtr<Node>, ShouldAssumeContentIsAlwaysEditabl e = DoNotAssumeContentIsAlwaysEditable); 124 virtual void removeNode(PassRefPtr<Node>, ShouldAssumeContentIsAlwaysEditabl e = DoNotAssumeContentIsAlwaysEditable);
125 HTMLElement* replaceElementWithSpanPreservingChildrenAndAttributes(PassRefPt r<HTMLElement>); 125 HTMLElement* replaceElementWithSpanPreservingChildrenAndAttributes(PassRefPt r<HTMLElement>);
126 void removeNodePreservingChildren(PassRefPtr<Node>, ShouldAssumeContentIsAlw aysEditable = DoNotAssumeContentIsAlwaysEditable); 126 void removeNodePreservingChildren(PassRefPtr<Node>, ShouldAssumeContentIsAlw aysEditable = DoNotAssumeContentIsAlwaysEditable);
127 void removeNodeAndPruneAncestors(PassRefPtr<Node>); 127 void removeNodeAndPruneAncestors(PassRefPtr<Node>, Node* excludeNode = 0);
128 void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, PassR efPtr<Element> prpNewParent); 128 void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, PassR efPtr<Element> prpNewParent);
129 void updatePositionForNodeRemovalPreservingChildren(Position&, Node*); 129 void updatePositionForNodeRemovalPreservingChildren(Position&, Node*);
130 void prune(PassRefPtr<Node>); 130 void prune(PassRefPtr<Node>, Node* excludeNode = 0);
131 void replaceTextInNode(PassRefPtr<Text>, unsigned offset, unsigned count, co nst String& replacementText); 131 void replaceTextInNode(PassRefPtr<Text>, unsigned offset, unsigned count, co nst String& replacementText);
132 Position replaceSelectedTextInNode(const String&); 132 Position replaceSelectedTextInNode(const String&);
133 void replaceTextInNodePreservingMarkers(PassRefPtr<Text>, unsigned offset, u nsigned count, const String& replacementText); 133 void replaceTextInNodePreservingMarkers(PassRefPtr<Text>, unsigned offset, u nsigned count, const String& replacementText);
134 Position positionOutsideTabSpan(const Position&); 134 Position positionOutsideTabSpan(const Position&);
135 void setNodeAttribute(PassRefPtr<Element>, const QualifiedName& attribute, c onst AtomicString& value); 135 void setNodeAttribute(PassRefPtr<Element>, const QualifiedName& attribute, c onst AtomicString& value);
136 void splitElement(PassRefPtr<Element>, PassRefPtr<Node> atChild); 136 void splitElement(PassRefPtr<Element>, PassRefPtr<Node> atChild);
137 void splitTextNode(PassRefPtr<Text>, unsigned offset); 137 void splitTextNode(PassRefPtr<Text>, unsigned offset);
138 void splitTextNodeContainingElement(PassRefPtr<Text>, unsigned offset); 138 void splitTextNodeContainingElement(PassRefPtr<Text>, unsigned offset);
139 void wrapContentsInDummySpan(PassRefPtr<Element>); 139 void wrapContentsInDummySpan(PassRefPtr<Element>);
140 140
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command) 180 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command)
181 { 181 {
182 ASSERT(command); 182 ASSERT(command);
183 ASSERT(command->isCompositeEditCommand()); 183 ASSERT(command->isCompositeEditCommand());
184 return static_cast<CompositeEditCommand*>(command); 184 return static_cast<CompositeEditCommand*>(command);
185 } 185 }
186 186
187 } // namespace WebCore 187 } // namespace WebCore
188 188
189 #endif // CompositeEditCommand_h 189 #endif // CompositeEditCommand_h
OLDNEW
« no previous file with comments | « LayoutTests/editing/inserting/insert-html-crash-01-expected.txt ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698