Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp |
| index 5eef8486a3ba1f1926a0aaf780173a5a5a686a53..5add5329865fd6ba67eda705e647cb0efc4247c8 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp |
| @@ -1013,10 +1013,11 @@ void ReplaceSelectionCommand::doApply() |
| applyCommandToComposite(BreakBlockquoteCommand::create(document())); |
| // This will leave a br between the split. |
| Node* br = endingSelection().start().anchorNode(); |
| - ASSERT(isHTMLBRElement(br)); |
| - // Insert content between the two blockquotes, but remove the br (since it was just a placeholder). |
| - insertionPos = positionInParentBeforeNode(*br); |
| - removeNode(br); |
| + if (isHTMLBRElement(br)) { |
|
yosin_UTC9
2015/10/15 05:57:18
It seems this can fix issue 541402 too. However, i
|
| + // Insert content between the two blockquotes, but remove the br (since it was just a placeholder). |
| + insertionPos = positionInParentBeforeNode(*br); |
| + removeNode(br); |
| + } |
| } |
| // Inserting content could cause whitespace to collapse, e.g. inserting <div>foo</div> into hello^ world. |