Bug 148729 - Node.textContent = undefined should be equivalent to textContent = ""
Summary: Node.textContent = undefined should be equivalent to textContent = ""
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL: https://heycam.github.io/webidl/#es-n...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-02 16:45 PDT by Ryosuke Niwa
Modified: 2015-09-02 19:51 PDT (History)
4 users (show)

See Also:


Attachments
Fixes the bug (4.30 KB, patch)
2015-09-02 17:57 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-09-02 16:45:38 PDT
http://w3c-test.org/dom/nodes/Node-textContent.html fails because we don't treat undefined as an empty string in textContent's setter.
Comment 1 Ryosuke Niwa 2015-09-02 16:47:01 PDT
<rdar://problem/22549558>
Comment 2 Chris Dumez 2015-09-02 16:49:55 PDT
As per https://heycam.github.io/webidl/#es-nullable-type, since the attribute is nullable, "if V is null or undefined, then return the IDL nullable type T? value null".

Our generated bindings missed the "or undefined" part. I believe there is even a FIXME comment about this in the bindings generator already.
Comment 3 Ryosuke Niwa 2015-09-02 17:57:19 PDT
Created attachment 260462 [details]
Fixes the bug
Comment 4 WebKit Commit Bot 2015-09-02 19:51:12 PDT
Comment on attachment 260462 [details]
Fixes the bug

Clearing flags on attachment: 260462

Committed r189269: <http://trac.webkit.org/changeset/189269>
Comment 5 WebKit Commit Bot 2015-09-02 19:51:17 PDT
All reviewed patches have been landed.  Closing bug.