Commit 8e583677 authored by ramya.v@samsung.com's avatar ramya.v@samsung.com

Setting empty script text should remove child node of script element

BUG=520849

Review URL: https://codereview.chromium.org/1292503003

git-svn-id: svn://svn.chromium.org/blink/trunk@200816 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 65858927
......@@ -376,10 +376,9 @@ crbug.com/490511 imported/web-platform-tests/html/semantics/embedded-content/med
crbug.com/490511 imported/web-platform-tests/html/semantics/embedded-content/media-elements/location-of-the-media-resource/currentSrc.html [ Failure ]
crbug.com/520835 imported/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html [ Failure ]
crbug.com/520835 imported/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formaction.html [ Failure ]
# script-for-event.html and script-text.html: We can't check in failure results
# because we also have script-for-event.xhtml and script-text.xhtml.
# script-for-event.html: We can't check in failure results
# because we also have script-for-event.xhtml.
crbug.com/520844 imported/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event.html [ Failure ]
crbug.com/520849 imported/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html [ Failure ]
crbug.com/490511 imported/web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html [ Failure ]
crbug.com/490511 imported/web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html [ Failure ]
crbug.com/490511 imported/web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html [ Failure ]
......
......@@ -128,15 +128,7 @@ void HTMLScriptElement::didNotifySubtreeInsertionsToDocument()
void HTMLScriptElement::setText(const String &value)
{
RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this);
if (hasOneTextChild()) {
toText(firstChild())->setData(value);
return;
}
removeChildren();
appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION);
setTextContent(value);
}
void HTMLScriptElement::setAsync(bool async)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment