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

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-23T11:24:24 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..a2a7a6ea5a93e0440440ffb20b3d4723af6cd9f5 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 = VisiblePosition(end);
Yuta Kitamura 2014/06/23 06:34:06 nit: You can simplify this line with: Visible
yosin_UTC9 2014/06/23 06:52:19 Done.
+ 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