| 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 fb353fdb7b7853b4c85314c897247b4e190f174c..c94e20a314fa721bc82c91de70caf1b10b43e9a0 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| @@ -61,6 +61,9 @@ void ApplyBlockElementCommand::doApply(EditingState* editingState) {
|
| // execution, which updates layout before entering doApply().
|
| DCHECK(!document().needsLayoutTreeUpdate());
|
|
|
| + // We don't want to modify outside of <body>.
|
| + shrinkEndingSelectionToFitBody();
|
| +
|
| VisiblePosition visibleEnd = endingSelection().visibleEnd();
|
| VisiblePosition visibleStart = endingSelection().visibleStart();
|
| if (visibleStart.isNull() || visibleStart.isOrphan() || visibleEnd.isNull() ||
|
|
|