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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1637323002: Editing: Tidy up HTML document structure before execCommand(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert the Node.cpp change Created 4 years, 11 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 281497ca4858358e3a6b229b6f1806410ff59386..76d4a7909fe66b354a962780f9ddc73a63d190a3 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4455,6 +4455,7 @@ bool Document::execCommand(const String& commandName, bool, const String& value,
// Postpone DOM mutation events, which can execute scripts and change
// DOM tree against implementation assumption.
EventQueueScope eventQueueScope;
+ Editor::tidyUpHTMLStructure(*this);
Editor::Command editorCommand = command(this, commandName);
Platform::current()->histogramSparse("WebCore.Document.execCommand", editorCommand.idForHistogram());
return editorCommand.execute(value);

Powered by Google App Engine
This is Rietveld 408576698