W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

[Bug 14231] Force values of runs of consecutive nodes, not individual nodes

From: <bugzilla@jessica.w3.org>
Date: Wed, 21 Sep 2011 20:50:19 +0000
To: public-webapps@w3.org
Message-Id: <E1R6TkJ-00081A-7l@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14231

Aryeh Gregor <ayg@aryeh.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Aryeh Gregor <ayg@aryeh.name> 2011-09-21 20:50:19 UTC ---
It turns out there was a simpler way to fix the problem:

https://dvcs.w3.org/hg/editing/rev/ee2791b98b92

Essentially, we just refuse to wrap invisible nodes by themselves.  But when
merging into an adjacent sibling, we skip over any intervening invisible nodes,
and if we decide to merge, we bring the invisible nodes along too.  So the test
case now becomes

1) <p>[foo</p><p> <span>bar</span> </p><p>baz]</p>
2) <p>[<b>foo</b></p><p> <span>bar</span> </p><p>baz]</p>
3) <p>[<b>foo</b></p><p> <b><span>bar</span></b> </p><p>baz]</p>

The last space doesn't get wrapped, because it's invisible.  By contrast:

1) <span>[foo</span><!--bar--><span>baz]</span>
2) <b><span>[foo</span></b><!--bar--><span>baz]</span>
2) <b><span>[foo</span><!--bar--><span>baz]</span></b>

The invisible node isn't wrapped by itself, but when we want to wrap the final
"baz", we stick it into the existing <b> along with the intervening invisible
node.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Wednesday, 21 September 2011 20:50:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT