| 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());
|
|
|