RESOLVED CONFIGURATION CHANGED 17765
Empty CDATA section is not added to DOM when parsing
https://bugs.webkit.org/show_bug.cgi?id=17765
Summary Empty CDATA section is not added to DOM when parsing
benoit
Reported 2008-03-11 05:34:24 PDT
it's not possible to retrieve an empty cdata section (<![CDATA[]]>) with the firstChild property : null is return. Ex: <testWebkit><![CDATA[]]></testWebkit> with node = <testWebkit> var child = node.firstChild; on safari child is null on ie 6 and ff 2 child is a node type 4 (CDATA_SECTION_NODE) with an empty content tested on safari 3.0.4 and nightly build 30790
Attachments
html test with domparser (715 bytes, text/html)
2008-03-11 06:10 PDT, benoit
no flags
benoit
Comment 1 2008-03-11 06:10:49 PDT
Created attachment 19661 [details] html test with domparser html test. Use domparser but the pb is the same with xmlhhtprequest. This test does not work on ie (replace domparser with ActiveXObject)
Jeff Walden (remove +bwo to email)
Comment 2 2008-03-11 17:28:02 PDT
Not just firstChild, seems to be anywhere in a particular container.
Alexey Proskuryakov
Comment 3 2008-03-12 05:45:37 PDT
Confirmed with r30984.
Vincent Ricard
Comment 4 2008-05-24 05:56:06 PDT
With r34104 i got the right resut: "first.child type = 4"
Alexey Proskuryakov
Comment 5 2008-05-24 06:29:18 PDT
I'm still getting "first child is null" on the attached test case (also with 34104, local release build).
benoit
Comment 6 2008-08-22 09:48:25 PDT
I'm still getting "first child is null" with 35844
benoit
Comment 7 2008-09-19 13:25:19 PDT
Alexey Proskuryakov
Comment 8 2011-09-21 17:03:21 PDT
Seems to be working in Safari 5.1 on Lion. We'll need to land this test to avoid regressions.
Lucas Forschler
Comment 9 2019-02-06 09:03:39 PST
Mass moving XML DOM bugs to the "DOM" Component.
Ahmad Saleem
Comment 10 2022-08-02 04:10:42 PDT
I am unable to reproduce this bug using attached test case in Safari 15.6 on macOS 12.5 and it shows "first child type = 4" and matches with all other browsers (Chrome Canary 106 and Firefox Nightly 105). I think this can be marked as "RESOLVED CONFIGURATION CHANGED". Thanks! From Comment 8 - it seems we need to land this test case to avoid future regressions but I am not sure whether we have WPT coverage or not. Please do accordingly. Thanks!
Ryosuke Niwa
Comment 11 2022-08-02 09:14:34 PDT
Yup, config changed.
Note You need to log in before you can comment on or make changes to this bug.