[Webkit-unassigned] [Bug 33191] New: CDATA sections are merged into Text nodes when normalize() is used

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 18:13:22 PST 2010


           Summary: CDATA sections are merged into Text nodes when
                    normalize() is used
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: XML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bedney at technicalpursuit.com

Created an attachment (id=45855)
 --> (https://bugs.webkit.org/attachment.cgi?id=45855)
Testcase showing invalid merging behavior

As the attached testcase demonstrates, Webkit violates the DOM Specification by
merging adjacent CDATA sections into Text nodes when normalize() is used.

The 'normalize()' method in the DOM Level 2 specification says:

"Puts all Text nodes in the full depth of the sub-tree underneath this Node,
including attribute nodes, into a "normal" form where only structure (e.g.,
elements, comments, processing instructions, CDATA sections, and entity
references) separates Text nodes".

Further, section 1.3 describing CDATA sections state that adjacent CDATA
sections are not to be merged with each other when normalize() is used:

"Adjacent CDATASection nodes are not merged by use of the normalize method of
the Node interface"

The attached testcase shows that the XML chunk starts out with 3 nodes under
the document element in this order:

- Text node
- CDATA Section node
- Text node

and confirms that the document element has 3 child nodes before normalization
and 1 child node after normalization (when it should still have 3, having
preserved the above structure).

This test passes on Mozilla and IE.

This is failing on the latest Webkit build I have: build 52571.


- Bill

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list