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

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

Issue 182533004: Fix crash in CompositeEditCommand::cloneParagraphUnderNewElement(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 PassRefPtr<Node> insertNewDefaultParagraphElementAt(const Position&); 145 PassRefPtr<Node> insertNewDefaultParagraphElementAt(const Position&);
146 146
147 PassRefPtr<Node> moveParagraphContentsToNewBlockIfNecessary(const Position&) ; 147 PassRefPtr<Node> moveParagraphContentsToNewBlockIfNecessary(const Position&) ;
148 148
149 void pushAnchorElementDown(Node*); 149 void pushAnchorElementDown(Node*);
150 150
151 // FIXME: preserveSelection and preserveStyle should be enums 151 // FIXME: preserveSelection and preserveStyle should be enums
152 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis iblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0); 152 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis iblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0);
153 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi siblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0); 153 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi siblePosition&, bool preserveSelection = false, bool preserveStyle = true, Node* constrainingAncestor = 0);
154 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerN ode); 154 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerN ode);
155 void cloneParagraphUnderNewElement(Position& start, Position& end, Node* out erNode, Element* blockElement); 155 void cloneParagraphUnderNewElement(const Position& start, const Position& en d, Node* outerNode, Element* blockElement);
156 void cleanupAfterDeletion(VisiblePosition destination = VisiblePosition()); 156 void cleanupAfterDeletion(VisiblePosition destination = VisiblePosition());
157 157
158 bool breakOutOfEmptyListItem(); 158 bool breakOutOfEmptyListItem();
159 bool breakOutOfEmptyMailBlockquotedParagraph(); 159 bool breakOutOfEmptyMailBlockquotedParagraph();
160 160
161 Position positionAvoidingSpecialElementBoundary(const Position&); 161 Position positionAvoidingSpecialElementBoundary(const Position&);
162 162
163 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false); 163 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false);
164 164
165 Vector<RefPtr<EditCommand> > m_commands; 165 Vector<RefPtr<EditCommand> > m_commands;
166 166
167 private: 167 private:
168 virtual bool isCompositeEditCommand() const OVERRIDE FINAL { return true; } 168 virtual bool isCompositeEditCommand() const OVERRIDE FINAL { return true; }
169 169
170 RefPtr<EditCommandComposition> m_composition; 170 RefPtr<EditCommandComposition> m_composition;
171 }; 171 };
172 172
173 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi teEditCommand(), command.isCompositeEditCommand()); 173 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi teEditCommand(), command.isCompositeEditCommand());
174 174
175 } // namespace WebCore 175 } // namespace WebCore
176 176
177 #endif // CompositeEditCommand_h 177 #endif // CompositeEditCommand_h
OLDNEW
« no previous file with comments | « LayoutTests/editing/execCommand/resources/format-block-crash-iframe.html ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698