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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 1828623002: Make Editor::tidyUpHTMLStructure() handles BODY element correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/editing/EditorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 1ea22e3482a0af9a86941fb6fce93e5279d3f7ab..6442a0edea0c8b807bd04a65aa84be8f16b92fee 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -1361,7 +1361,7 @@ void Editor::tidyUpHTMLStructure(Document& document)
body = existingBody.release();
else
body = HTMLBodyElement::create(document);
- if (document.documentElement())
+ if (document.documentElement() && body != document.documentElement())
body->appendChild(document.documentElement());
root->appendChild(body.release());
ASSERT(!document.documentElement());
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/editing/EditorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698