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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 2370253002: Mark calls of visible{Start,End} with dirty layout deprecated (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index dd422c7a00ed50d29be7fdb2ea0d494b67ab01dd..3907be42c28b32736a332a11db08b78064ca450f 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1177,7 +1177,7 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(const Position& start,
void CompositeEditCommand::cleanupAfterDeletion(EditingState* editingState, VisiblePosition destination)
{
- VisiblePosition caretAfterDelete = endingSelection().visibleStart();
+ VisiblePosition caretAfterDelete = endingSelection().visibleStartDeprecated();
Node* destinationNode = destination.deepEquivalent().anchorNode();
if (caretAfterDelete.deepEquivalent() != destination.deepEquivalent() && isStartOfParagraphDeprecated(caretAfterDelete) && isEndOfParagraphDeprecated(caretAfterDelete)) {
// Note: We want the rightmost candidate.
@@ -1292,8 +1292,8 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap
int destinationIndex = -1;
bool originalIsDirectional = endingSelection().isDirectional();
if (shouldPreserveSelection == PreserveSelection && !endingSelection().isNone()) {
- VisiblePosition visibleStart = endingSelection().visibleStart();
- VisiblePosition visibleEnd = endingSelection().visibleEnd();
+ VisiblePosition visibleStart = endingSelection().visibleStartDeprecated();
+ VisiblePosition visibleEnd = endingSelection().visibleEndDeprecated();
bool startAfterParagraph = comparePositions(visibleStart, endOfParagraphToMove) > 0;
bool endBeforeParagraph = comparePositions(visibleEnd, startOfParagraphToMove) < 0;
@@ -1390,7 +1390,7 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap
document().frame()->spellChecker().markMisspellingsAndBadGrammarForMovingParagraphs(endingSelection());
// If the selection is in an empty paragraph, restore styles from the old empty paragraph to the new empty paragraph.
- bool selectionIsEmptyParagraph = endingSelection().isCaret() && isStartOfParagraphDeprecated(endingSelection().visibleStart()) && isEndOfParagraphDeprecated(endingSelection().visibleStart());
+ bool selectionIsEmptyParagraph = endingSelection().isCaret() && isStartOfParagraphDeprecated(endingSelection().visibleStartDeprecated()) && isEndOfParagraphDeprecated(endingSelection().visibleStartDeprecated());
if (styleInEmptyParagraph && selectionIsEmptyParagraph) {
applyStyle(styleInEmptyParagraph, editingState);
if (editingState->isAborted())
@@ -1423,7 +1423,7 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap
// FIXME: Send an appropriate shouldDeleteRange call.
bool CompositeEditCommand::breakOutOfEmptyListItem(EditingState* editingState)
{
- Node* emptyListItem = enclosingEmptyListItem(endingSelection().visibleStart());
+ Node* emptyListItem = enclosingEmptyListItem(endingSelection().visibleStartDeprecated());
if (!emptyListItem)
return false;
@@ -1509,7 +1509,7 @@ bool CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph(EditingState*
if (!endingSelection().isCaret())
return false;
- VisiblePosition caret = endingSelection().visibleStart();
+ VisiblePosition caret = endingSelection().visibleStartDeprecated();
HTMLQuoteElement* highestBlockquote = toHTMLQuoteElement(highestEnclosingNodeOfType(caret.deepEquivalent(), &isMailHTMLBlockquoteElement));
if (!highestBlockquote)
return false;

Powered by Google App Engine
This is Rietveld 408576698