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


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:


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

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 UTC