See https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text The setter implementation of HTMLScriptElement.prototype.text should be identical to that of textContent but it isn't. This bug was found by the newly added test: LayoutTests/http/tests/w3c/html/semantics/scripting-1/the-script-element/script-text.html
Created attachment 287204 [details] Patch
<rdar://problem/28044640>
Comment on attachment 287204 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287204&action=review r=me with comment. > Source/WebCore/html/HTMLScriptElement.cpp:85 > + setTextContent(value, IGNORE_EXCEPTION); I believe this cannot actually throw. If this is the case, then we should use ASSERT_NOT_EXCEPTION, not IGNORE_EXCEPTION. If it can actually throw, then we should use [SetterRaisesException] on the text attribute and relay the exception to the caller.
Comment on attachment 287204 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287204&action=review >> Source/WebCore/html/HTMLScriptElement.cpp:85 >> + setTextContent(value, IGNORE_EXCEPTION); > > I believe this cannot actually throw. If this is the case, then we should use ASSERT_NOT_EXCEPTION, not IGNORE_EXCEPTION. If it can actually throw, then we should use [SetterRaisesException] on the text attribute and relay the exception to the caller. Hmm. You are probably right about this. I suspect the same is also true for HTMLAnchorElement.text and HTMLTitleElement.text
Created attachment 287205 [details] Patch for landing
Comment on attachment 287205 [details] Patch for landing Clearing flags on attachment: 287205 Committed r205079: <http://trac.webkit.org/changeset/205079>
All reviewed patches have been landed. Closing bug.