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

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

Issue 13954003: Remove mail blockquote special case handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void applyStyledElement(PassRefPtr<Element>); 102 void applyStyledElement(PassRefPtr<Element>);
103 void removeStyledElement(PassRefPtr<Element>); 103 void removeStyledElement(PassRefPtr<Element>);
104 void deleteSelection(bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true, bool sanitize Markup = true); 104 void deleteSelection(bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true, bool sanitize Markup = true);
105 void deleteSelection(const VisibleSelection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialEleme nts = true, bool sanitizeMarkup = true); 105 void deleteSelection(const VisibleSelection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialEleme nts = true, bool sanitizeMarkup = true);
106 virtual void deleteTextFromNode(PassRefPtr<Text>, unsigned offset, unsigned count); 106 virtual void deleteTextFromNode(PassRefPtr<Text>, unsigned offset, unsigned count);
107 bool isRemovableBlock(const Node*); 107 bool isRemovableBlock(const Node*);
108 void insertNodeAfter(PassRefPtr<Node>, PassRefPtr<Node> refChild); 108 void insertNodeAfter(PassRefPtr<Node>, PassRefPtr<Node> refChild);
109 void insertNodeAt(PassRefPtr<Node>, const Position&); 109 void insertNodeAt(PassRefPtr<Node>, const Position&);
110 void insertNodeAtTabSpanPosition(PassRefPtr<Node>, const Position&); 110 void insertNodeAtTabSpanPosition(PassRefPtr<Node>, const Position&);
111 void insertNodeBefore(PassRefPtr<Node>, PassRefPtr<Node> refChild, ShouldAss umeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable); 111 void insertNodeBefore(PassRefPtr<Node>, PassRefPtr<Node> refChild, ShouldAss umeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
112 void insertParagraphSeparator(bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false); 112 void insertParagraphSeparator(bool useDefaultParagraphElement = false);
113 void insertLineBreak(); 113 void insertLineBreak();
114 void insertTextIntoNode(PassRefPtr<Text>, unsigned offset, const String& tex t); 114 void insertTextIntoNode(PassRefPtr<Text>, unsigned offset, const String& tex t);
115 void mergeIdenticalElements(PassRefPtr<Element>, PassRefPtr<Element>); 115 void mergeIdenticalElements(PassRefPtr<Element>, PassRefPtr<Element>);
116 void rebalanceWhitespace(); 116 void rebalanceWhitespace();
117 void rebalanceWhitespaceAt(const Position&); 117 void rebalanceWhitespaceAt(const Position&);
118 void rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text>, int startOffset, i nt endOffset); 118 void rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text>, int startOffset, i nt endOffset);
119 void prepareWhitespaceAtPositionForSplit(Position&); 119 void prepareWhitespaceAtPositionForSplit(Position&);
120 bool canRebalance(const Position&) const; 120 bool canRebalance(const Position&) const;
121 bool shouldRebalanceLeadingWhitespaceFor(const String&) const; 121 bool shouldRebalanceLeadingWhitespaceFor(const String&) const;
122 void removeCSSProperty(PassRefPtr<StyledElement>, CSSPropertyID); 122 void removeCSSProperty(PassRefPtr<StyledElement>, CSSPropertyID);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 void pushAnchorElementDown(Node*); 155 void pushAnchorElementDown(Node*);
156 156
157 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis iblePosition&, bool preserveSelection = false, bool preserveStyle = true); 157 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis iblePosition&, bool preserveSelection = false, bool preserveStyle = true);
158 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi siblePosition&, bool preserveSelection = false, bool preserveStyle = true); 158 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi siblePosition&, bool preserveSelection = false, bool preserveStyle = true);
159 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerN ode); 159 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerN ode);
160 void cloneParagraphUnderNewElement(Position& start, Position& end, Node* out erNode, Element* blockElement); 160 void cloneParagraphUnderNewElement(Position& start, Position& end, Node* out erNode, Element* blockElement);
161 void cleanupAfterDeletion(VisiblePosition destination = VisiblePosition()); 161 void cleanupAfterDeletion(VisiblePosition destination = VisiblePosition());
162 162
163 bool breakOutOfEmptyListItem(); 163 bool breakOutOfEmptyListItem();
164 bool breakOutOfEmptyMailBlockquotedParagraph();
165 164
166 Position positionAvoidingSpecialElementBoundary(const Position&); 165 Position positionAvoidingSpecialElementBoundary(const Position&);
167 166
168 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false); 167 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false);
169 168
170 Vector<RefPtr<EditCommand> > m_commands; 169 Vector<RefPtr<EditCommand> > m_commands;
171 170
172 private: 171 private:
173 bool isCompositeEditCommand() const OVERRIDE { return true; } 172 bool isCompositeEditCommand() const OVERRIDE { return true; }
174 173
175 RefPtr<EditCommandComposition> m_composition; 174 RefPtr<EditCommandComposition> m_composition;
176 }; 175 };
177 176
178 void applyCommand(PassRefPtr<CompositeEditCommand>); 177 void applyCommand(PassRefPtr<CompositeEditCommand>);
179 178
180 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command) 179 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command)
181 { 180 {
182 ASSERT(command); 181 ASSERT(command);
183 ASSERT(command->isCompositeEditCommand()); 182 ASSERT(command->isCompositeEditCommand());
184 return static_cast<CompositeEditCommand*>(command); 183 return static_cast<CompositeEditCommand*>(command);
185 } 184 }
186 185
187 } // namespace WebCore 186 } // namespace WebCore
188 187
189 #endif // CompositeEditCommand_h 188 #endif // CompositeEditCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698