This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19837 - DomNode::normalize handling of text nodes
Summary: DomNode::normalize handling of text nodes
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-03 01:35 UTC by svitlant
Modified: 2012-11-21 18:55 UTC (History)
3 users (show)

See Also:


Attachments

Description svitlant 2012-11-03 01:35:14 UTC
Hello,

In the previous version of the specification (http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-normalize) DomNode::normalize is explicitly said to remove empty text nodes. There is no mention of how the empty nodes need to be handled in the new specification (http://dom.spec.whatwg.org/#dom-node-normalize).

In particular, I would really appreciate for a note on how the following situation should be handled: an empty text node (text1) followed by a non-empty text node (text2). According to the new specification, the content will be concatenated in text1. However, this does not correspond to the behavior of major browsers: major browsers detach text1 and leave text2 unchanged.

Thanks,
Svitlana
Comment 1 Ms2ger 2012-11-03 09:01:29 UTC
Thanks for the bug report, Svitlana. I uploaded a test: <http://dvcs.w3.org/hg/webapps/rev/f5262db28508>.
Comment 2 Anne 2012-11-09 15:47:19 UTC
https://github.com/whatwg/dom/commit/a6b9ed1c84dfc87de58b55b06cb3f40244d682ca
http://dom.spec.whatwg.org/#dom-node-normalize

svitlant, is your name in the Acknowledgments section already? (I'm not aware of your name or have forgotten.) If not, could you please give me either your name or preferred nick for that section?

And thanks for this report, much appreciated!
Comment 4 Anne 2012-11-21 18:55:07 UTC
Closing this as it was fixed. svitlant, your desired name for the acknowledgments would still be appreciated!