Chromium Code Reviews| Index: Source/core/editing/ApplyBlockElementCommand.cpp |
| diff --git a/Source/core/editing/ApplyBlockElementCommand.cpp b/Source/core/editing/ApplyBlockElementCommand.cpp |
| index 5ecf67a627649d9769d1236f31b5f777fb76fb77..fe35eb03de3df545c81e1fc978509a646d16320c 100644 |
| --- a/Source/core/editing/ApplyBlockElementCommand.cpp |
| +++ b/Source/core/editing/ApplyBlockElementCommand.cpp |
| @@ -73,8 +73,11 @@ void ApplyBlockElementCommand::doApply() |
| // FIXME: We paint the gap before some paragraphs that are indented with left |
| // margin/padding, but not others. We should make the gap painting more consistent and |
| // then use a left margin/padding rule here. |
| - if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd)) |
| + if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd)) { |
| setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional())); |
| + if (endingSelection().isNone()) |
|
Yuta Kitamura
2014/05/20 09:44:36
Is this logic equivalent to the following?
Vi
yosin_UTC9
2014/05/21 03:44:07
Done.
Yes, you're right. Your version is better t
|
| + return; |
| + } |
| VisibleSelection selection = selectionForParagraphIteration(endingSelection()); |
| VisiblePosition startOfSelection = selection.visibleStart(); |