Chromium Code Reviews| Index: Source/core/html/HTMLScriptElement.cpp |
| diff --git a/Source/core/html/HTMLScriptElement.cpp b/Source/core/html/HTMLScriptElement.cpp |
| index 1b53647d8de808ab82193dec486b9394acb8cd0a..e04e3e798671d5d153fb43748a95728ff34d3fbf 100644 |
| --- a/Source/core/html/HTMLScriptElement.cpp |
| +++ b/Source/core/html/HTMLScriptElement.cpp |
| @@ -130,6 +130,11 @@ void HTMLScriptElement::setText(const String &value) |
| { |
| RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this); |
|
tkent
2015/08/19 00:11:26
Can we just call setTextContent(value), and add is
ramya.v
2015/08/19 08:08:42
Modified code to call setTextContent. isEmpty() ch
|
| + if (value.isEmpty()) { |
| + removeChildren(); |
| + return; |
| + } |
| + |
| if (hasOneTextChild()) { |
| toText(firstChild())->setData(value); |
| return; |