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

Side by Side Diff: sky/engine/core/editing/CompositeEditCommand.h

Issue 767623004: Delete a bunch of rich text editing code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/core/core.gni ('k') | sky/engine/core/editing/CompositeEditCommand.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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void removeNodeAndPruneAncestors(PassRefPtr<Node>, Node* excludeNode = 0); 114 void removeNodeAndPruneAncestors(PassRefPtr<Node>, Node* excludeNode = 0);
115 void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, PassR efPtr<Element> prpNewParent); 115 void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, PassR efPtr<Element> prpNewParent);
116 void updatePositionForNodeRemovalPreservingChildren(Position&, Node&); 116 void updatePositionForNodeRemovalPreservingChildren(Position&, Node&);
117 void prune(PassRefPtr<Node>, Node* excludeNode = 0); 117 void prune(PassRefPtr<Node>, Node* excludeNode = 0);
118 void replaceTextInNode(PassRefPtr<Text>, unsigned offset, unsigned count, co nst String& replacementText); 118 void replaceTextInNode(PassRefPtr<Text>, unsigned offset, unsigned count, co nst String& replacementText);
119 Position replaceSelectedTextInNode(const String&); 119 Position replaceSelectedTextInNode(const String&);
120 void replaceTextInNodePreservingMarkers(PassRefPtr<Text>, unsigned offset, u nsigned count, const String& replacementText); 120 void replaceTextInNodePreservingMarkers(PassRefPtr<Text>, unsigned offset, u nsigned count, const String& replacementText);
121 Position positionOutsideTabSpan(const Position&); 121 Position positionOutsideTabSpan(const Position&);
122 void splitElement(PassRefPtr<Element>, PassRefPtr<Node> atChild); 122 void splitElement(PassRefPtr<Element>, PassRefPtr<Node> atChild);
123 void splitTextNode(PassRefPtr<Text>, unsigned offset); 123 void splitTextNode(PassRefPtr<Text>, unsigned offset);
124 void splitTextNodeContainingElement(PassRefPtr<Text>, unsigned offset);
125 124
126 void deleteInsignificantText(PassRefPtr<Text>, unsigned start, unsigned end) ; 125 void deleteInsignificantText(PassRefPtr<Text>, unsigned start, unsigned end) ;
127 void deleteInsignificantText(const Position& start, const Position& end); 126 void deleteInsignificantText(const Position& start, const Position& end);
128 void deleteInsignificantTextDownstream(const Position&); 127 void deleteInsignificantTextDownstream(const Position&);
129 128
130 void removePlaceholderAt(const Position&); 129 void removePlaceholderAt(const Position&);
131 130
132 PassRefPtr<HTMLElement> insertNewDefaultParagraphElementAt(const Position&);
133
134 PassRefPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessary(const Pos ition&);
135
136 void pushAnchorElementDown(Element*); 131 void pushAnchorElementDown(Element*);
137 132
138 // FIXME: preserveSelection and preserveStyle should be enums 133 // FIXME: preserveSelection and preserveStyle should be enums
139 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis iblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0); 134 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis iblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0);
140 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi siblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0); 135 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi siblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0);
141 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, HTMLElement* blockElement, Node* ou terNode);
142 void cloneParagraphUnderNewElement(const Position& start, const Position& en d, Node* outerNode, Element* blockElement);
143 void cleanupAfterDeletion(VisiblePosition destination = VisiblePosition()); 136 void cleanupAfterDeletion(VisiblePosition destination = VisiblePosition());
144 137
145 bool breakOutOfEmptyListItem();
146 bool breakOutOfEmptyMailBlockquotedParagraph();
147
148 Position positionAvoidingSpecialElementBoundary(const Position&); 138 Position positionAvoidingSpecialElementBoundary(const Position&);
149 139
150 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false); 140 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false);
151 141
152 Vector<RefPtr<EditCommand> > m_commands; 142 Vector<RefPtr<EditCommand> > m_commands;
153 143
154 private: 144 private:
155 virtual bool isCompositeEditCommand() const override final { return true; } 145 virtual bool isCompositeEditCommand() const override final { return true; }
156 146
157 RefPtr<EditCommandComposition> m_composition; 147 RefPtr<EditCommandComposition> m_composition;
158 }; 148 };
159 149
160 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi teEditCommand(), command.isCompositeEditCommand()); 150 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi teEditCommand(), command.isCompositeEditCommand());
161 151
162 } // namespace blink 152 } // namespace blink
163 153
164 #endif // SKY_ENGINE_CORE_EDITING_COMPOSITEEDITCOMMAND_H_ 154 #endif // SKY_ENGINE_CORE_EDITING_COMPOSITEEDITCOMMAND_H_
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698