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

Unified Diff: Source/core/html/HTMLScriptElement.cpp

Issue 1292503003: Setting empty script text should remove child node of script element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 4 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 | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLScriptElement.cpp
diff --git a/Source/core/html/HTMLScriptElement.cpp b/Source/core/html/HTMLScriptElement.cpp
index 1b53647d8de808ab82193dec486b9394acb8cd0a..7993d5bcfd96275d40516574ab1a272b013dd282 100644
--- a/Source/core/html/HTMLScriptElement.cpp
+++ b/Source/core/html/HTMLScriptElement.cpp
@@ -129,14 +129,7 @@ void HTMLScriptElement::didNotifySubtreeInsertionsToDocument()
void HTMLScriptElement::setText(const String &value)
{
RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this);
tkent 2015/08/19 08:11:21 This line is unnecessary. setTextContent has simi
ramya.v 2015/08/19 08:14:18 Done.
-
- if (hasOneTextChild()) {
- toText(firstChild())->setData(value);
- return;
- }
-
- removeChildren();
- appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION);
+ setTextContent(value);
}
void HTMLScriptElement::setAsync(bool async)
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698