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

Unified Diff: third_party/WebKit/Source/core/editing/serializers/Serialization.cpp

Issue 2532393003: Remove the wrong optimization in replacing a text node with innerHTML (Closed)
Patch Set: use NeedsRebaseline Created 4 years 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/LayoutTests/shadow-dom/slotchange.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
diff --git a/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp b/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
index bf02c4e921063660c3dab572aa2b4d9dca6b0ea8..c91ae7830da91c647ce182dcd493d0556cfedf9c 100644
--- a/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
@@ -713,13 +713,6 @@ void replaceChildrenWithFragment(ContainerNode* container,
return;
}
- // FIXME: This is wrong if containerNode->firstChild() has more than one ref!
- if (containerNode->hasOneTextChild() && fragment->hasOneTextChild()) {
- toText(containerNode->firstChild())
- ->setData(toText(fragment->firstChild())->data());
- return;
- }
-
// FIXME: No need to replace the child it is a text node and its contents are
// already == text.
if (containerNode->hasOneChild()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/slotchange.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698