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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp

Issue 2371793003: Mark calls of {previous,next}PositionOf with invalid VisiblePosition deprecated (Closed)
Patch Set: Prevent code copying Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp ('k') | no next file » | 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 if (endOfCurrentParagraph.deepEquivalent() == endOfLastParagraph.deepEquival ent()) { 242 if (endOfCurrentParagraph.deepEquivalent() == endOfLastParagraph.deepEquival ent()) {
243 outdentParagraph(editingState); 243 outdentParagraph(editingState);
244 return; 244 return;
245 } 245 }
246 246
247 Position originalSelectionEnd = endingSelection().end(); 247 Position originalSelectionEnd = endingSelection().end();
248 VisiblePosition endAfterSelection = endOfParagraphDeprecated(nextPositionOf( endOfLastParagraph)); 248 VisiblePosition endAfterSelection = endOfParagraphDeprecated(nextPositionOf( endOfLastParagraph));
249 249
250 while (endOfCurrentParagraph.deepEquivalent() != endAfterSelection.deepEquiv alent()) { 250 while (endOfCurrentParagraph.deepEquivalent() != endAfterSelection.deepEquiv alent()) {
251 VisiblePosition endOfNextParagraph = endOfParagraphDeprecated(nextPositi onOf(endOfCurrentParagraph)); 251 VisiblePosition endOfNextParagraph = endOfParagraphDeprecated(nextPositi onOfDeprecated(endOfCurrentParagraph));
252 if (endOfCurrentParagraph.deepEquivalent() == endOfLastParagraph.deepEqu ivalent()) 252 if (endOfCurrentParagraph.deepEquivalent() == endOfLastParagraph.deepEqu ivalent())
253 setEndingSelection(VisibleSelection(originalSelectionEnd, TextAffini ty::Downstream)); 253 setEndingSelection(VisibleSelection(originalSelectionEnd, TextAffini ty::Downstream));
254 else 254 else
255 setEndingSelection(endOfCurrentParagraph); 255 setEndingSelection(endOfCurrentParagraph);
256 256
257 outdentParagraph(editingState); 257 outdentParagraph(editingState);
258 if (editingState->isAborted()) 258 if (editingState->isAborted())
259 return; 259 return;
260 260
261 // outdentParagraph could move more than one paragraph if the paragraph 261 // outdentParagraph could move more than one paragraph if the paragraph
(...skipping 28 matching lines...) Expand all
290 else 290 else
291 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); 291 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState);
292 } 292 }
293 293
294 InputEvent::InputType IndentOutdentCommand::inputType() const 294 InputEvent::InputType IndentOutdentCommand::inputType() const
295 { 295 {
296 return m_typeOfAction == Indent ? InputEvent::InputType::Indent : InputEvent ::InputType::Outdent; 296 return m_typeOfAction == Indent ? InputEvent::InputType::Indent : InputEvent ::InputType::Outdent;
297 } 297 }
298 298
299 } // namespace blink 299 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698