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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp

Issue 2753193002: Editing: Indent command: Do not insert BLOCKQUOTE under the root HTML element. (Closed)
Patch Set: . Created 3 years, 9 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
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() ||

Powered by Google App Engine
This is Rietveld 408576698