For example, consider a <table> element with these children: text node <tbody> text node The PositionIterator won't iterate to the <table> element position offset 3. This is causing various editing bugs, including problems uncovered by my changes for bug 24576.
The problem was narrower in scope than I thought, and only affects backwards iteration; without my other changes I couldn’t find any behavior changes.
Created attachment 28660 [details] patch
Is it possible to make a layout test for this?
(In reply to comment #3) > Is it possible to make a layout test for this? No. There’s no direct effect of this change alone. It simply prevents certain other changes from causing bugs.
This seems like the kind of patch Eric might want to review.
Comment on attachment 28660 [details] patch Sigh. We really need a way to add c++ unit tests to WebCore. Also, I'm about to re-write increment and decrement as part of bug 24854. Still debugging why my (obsoleted) change on that bug causes regressions.
Comment on attachment 28660 [details] patch Yup, looks fine.
Nevermind, the interesting parts of bug 24854 haven't been posted from my git repo yet, even in obsoleted form.
http://trac.webkit.org/changeset/42147
Seems to have caused regression test failures. Reopening the bug for now.
Comment on attachment 28660 [details] patch Clearing the review flag until I find out what's wrong.
I had the same PositionIterator constructor change in my recent PositionIterator re-write and also saw lots of regressions. I think that might have been the source of the regression.
Thought the modern day editing experts might be interested in my struggle from three years ago. This was never resolved.