| Index: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| index 8837a3fd990e14bab27c9490cc4f1ea5966ed3f2..622369096739fffbb049790c98af9435bdcfbd1e 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| @@ -154,11 +154,11 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
|
| // indentIntoBlockquote could move more than one paragraph if the paragraph
|
| // is in a list item or a table. As a result, endAfterSelection could refer to a position
|
| // no longer in the document.
|
| - if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().inShadowIncludingDocument())
|
| + if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().isConnected())
|
| break;
|
| // Sanity check: Make sure our moveParagraph calls didn't remove endOfNextParagraph.deepEquivalent().anchorNode()
|
| // If somehow, e.g. mutation event handler, we did, return to prevent crashes.
|
| - if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().inShadowIncludingDocument())
|
| + if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().isConnected())
|
| return;
|
| endOfCurrentParagraph = endOfNextParagraph;
|
| }
|
|
|