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

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

Issue 2370253002: Mark calls of visible{Start,End} with dirty layout deprecated (Closed)
Patch Set: 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
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 VisiblePosition endOfContents = createVisiblePositionDeprecated(end); 153 VisiblePosition endOfContents = createVisiblePositionDeprecated(end);
154 if (startOfContents.isNull() || endOfContents.isNull()) 154 if (startOfContents.isNull() || endOfContents.isNull())
155 return; 155 return;
156 moveParagraphWithClones(startOfContents, endOfContents, targetBlockquote, ou terBlock, editingState); 156 moveParagraphWithClones(startOfContents, endOfContents, targetBlockquote, ou terBlock, editingState);
157 } 157 }
158 158
159 void IndentOutdentCommand::outdentParagraph(EditingState* editingState) 159 void IndentOutdentCommand::outdentParagraph(EditingState* editingState)
160 { 160 {
161 VisiblePosition visibleStartOfParagraph = startOfParagraphDeprecated(endingS election().visibleStart()); 161 VisiblePosition visibleStartOfParagraph = startOfParagraphDeprecated(endingS election().visibleStartDeprecated());
162 VisiblePosition visibleEndOfParagraph = endOfParagraphDeprecated(visibleStar tOfParagraph); 162 VisiblePosition visibleEndOfParagraph = endOfParagraphDeprecated(visibleStar tOfParagraph);
163 163
164 HTMLElement* enclosingElement = toHTMLElement(enclosingNodeOfType(visibleSta rtOfParagraph.deepEquivalent(), &isHTMLListOrBlockquoteElement)); 164 HTMLElement* enclosingElement = toHTMLElement(enclosingNodeOfType(visibleSta rtOfParagraph.deepEquivalent(), &isHTMLListOrBlockquoteElement));
165 if (!enclosingElement || !hasEditableStyle(*enclosingElement->parentNode())) // We can't outdent if there is no place to go! 165 if (!enclosingElement || !hasEditableStyle(*enclosingElement->parentNode())) // We can't outdent if there is no place to go!
166 return; 166 return;
167 167
168 // Use InsertListCommand to remove the selection from the list 168 // Use InsertListCommand to remove the selection from the list
169 if (isHTMLOListElement(*enclosingElement)) { 169 if (isHTMLOListElement(*enclosingElement)) {
170 applyCommandToComposite(InsertListCommand::create(document(), InsertList Command::OrderedList), editingState); 170 applyCommandToComposite(InsertListCommand::create(document(), InsertList Command::OrderedList), editingState);
171 return; 171 return;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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

Powered by Google App Engine
This is Rietveld 408576698