Changeset 205079 in webkit
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r205077 r205079 1 2016-08-27 Andreas Kling <akling@apple.com> 2 3 script.text should behave like script.textContent on setting 4 <https://webkit.org/b/148852> 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-expected.txt: 9 1 10 2016-08-27 Youenn Fablet <youenn@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-expected.txt
r203428 r205079 2 2 PASS Getter 3 3 PASS Setter (non-empty string) 4 FAIL Setter (empty string) assert_equals: expected null but got Text node "" 4 PASS Setter (empty string) 5 5 PASS Setter (null) 6 6 PASS Setter (undefined) 7 FAIL Setter (text node reuse) assert_not_equals: got disallowed value Text node "two" 7 PASS Setter (text node reuse) 8 8 -
trunk/Source/WebCore/ChangeLog
r205076 r205079 1 2016-08-27 Andreas Kling <akling@apple.com> 2 3 script.text should behave like script.textContent on setting 4 <https://webkit.org/b/148852> 5 6 Reviewed by Chris Dumez. 7 8 HTMLScriptElement.text should behave just like .textContent when setting, 9 so just forward setText() to setTextContent(). 10 11 Test: import/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html 12 13 * html/HTMLScriptElement.cpp: 14 (WebCore::HTMLScriptElement::setText): 15 1 16 2016-08-27 Youenn Fablet <youenn@apple.com> 2 17 -
trunk/Source/WebCore/html/HTMLScriptElement.cpp
r203337 r205079 80 80 } 81 81 82 // https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text 82 83 void HTMLScriptElement::setText(const String& value) 83 84 { 84 Ref<HTMLScriptElement> protectedThis(*this); 85 86 if (hasOneChild() && is<Text>(*firstChild())) { 87 downcast<Text>(*firstChild()).setData(value); 88 return; 89 } 90 91 if (hasChildNodes()) 92 removeChildren(); 93 94 appendChild(document().createTextNode(value), IGNORE_EXCEPTION); 85 setTextContent(value, ASSERT_NO_EXCEPTION); 95 86 } 96 87
Note: See TracChangeset
for help on using the changeset viewer.