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

Unified Diff: Source/core/editing/IndentOutdentCommand.cpp

Issue 349143002: Don't try to move non visible contents in "Indent" command (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2014-06-23T03:50:27 Created 6 years, 6 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
« no previous file with comments | « LayoutTests/editing/execCommand/indent-no-visible-contents-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/IndentOutdentCommand.cpp
diff --git a/Source/core/editing/IndentOutdentCommand.cpp b/Source/core/editing/IndentOutdentCommand.cpp
index d1a4480a91172acb064a3d55e1bbb72fed91d64e..4caef802ed471640118f5a779199879c7b34bc70 100644
--- a/Source/core/editing/IndentOutdentCommand.cpp
+++ b/Source/core/editing/IndentOutdentCommand.cpp
@@ -121,7 +121,10 @@ void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Pos
startOfContents = VisiblePosition(positionInParentAfterNode(*targetBlockquote));
}
- moveParagraphWithClones(startOfContents, VisiblePosition(end), targetBlockquote.get(), outerBlock.get());
+ VisiblePosition endOfContents(end);
+ if (startOfContents.isNull() || endOfContents.isNull())
+ return;
+ moveParagraphWithClones(startOfContents, endOfContents, targetBlockquote.get(), outerBlock.get());
}
void IndentOutdentCommand::outdentParagraph()
« no previous file with comments | « LayoutTests/editing/execCommand/indent-no-visible-contents-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698