[Webkit-unassigned] [Bug 25822] DOM normalize does not remove empty text node between element nodes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun May 17 08:51:14 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=25822
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #30421|review? |review+
Flag| |
------- Comment #9 from darin at apple.com 2009-05-17 08:51 PDT -------
(From update of attachment 30421)
> + // Merge non-empty text nodes.
> + while (1) {
> + Node* nextSibling = node->nextSibling();
> + if (!nextSibling || !nextSibling->isTextNode()) {
> + node = node->traverseNextNodePostOrder();
> + break;
> + }
I think it would be clearer to have the node =
node->traverseNextNodePostOrder() line outside the if statement. I also would
prefer to have a while condition instead of just while (1).
Here's how I'd write it:
while (Node* nextSibling = node->nextSibling()) {
if (!nextSiblng->isTextNode())
break;
...
}
node = node->traverseNextNodePostOrder();
Patch looks good, r=me even without that change.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list