Bug 24621

Summary: PositionIterator doesn't iterate "after last child" positions when going backwards
Product: WebKit Reporter: Darin Adler <darin>
Component: HTML EditingAssignee: Darin Adler <darin>
Status: ASSIGNED    
Severity: Normal CC: antaryami.pandia, ap, enrica, eric, leviw, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 24576    
Attachments:
Description Flags
patch none

Darin Adler
Reported 2009-03-16 09:08:27 PDT
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.
Attachments
patch (3.64 KB, patch)
2009-03-16 14:52 PDT, Darin Adler
no flags
Darin Adler
Comment 1 2009-03-16 14:48:09 PDT
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.
Darin Adler
Comment 2 2009-03-16 14:52:27 PDT
Adele Peterson
Comment 3 2009-03-24 15:42:12 PDT
Is it possible to make a layout test for this?
Darin Adler
Comment 4 2009-03-24 15:59:31 PDT
(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.
Darin Adler
Comment 5 2009-03-28 12:48:00 PDT
This seems like the kind of patch Eric might want to review.
Eric Seidel (no email)
Comment 6 2009-03-30 09:12:42 PDT
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.
Eric Seidel (no email)
Comment 7 2009-03-30 09:15:16 PDT
Comment on attachment 28660 [details] patch Yup, looks fine.
Eric Seidel (no email)
Comment 8 2009-03-30 09:16:37 PDT
Nevermind, the interesting parts of bug 24854 haven't been posted from my git repo yet, even in obsoleted form.
Darin Adler
Comment 9 2009-03-31 21:42:01 PDT
Darin Adler
Comment 10 2009-03-31 23:43:54 PDT
Seems to have caused regression test failures. Reopening the bug for now.
Darin Adler
Comment 11 2009-03-31 23:44:14 PDT
Comment on attachment 28660 [details] patch Clearing the review flag until I find out what's wrong.
Eric Seidel (no email)
Comment 12 2009-04-01 00:03:15 PDT
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.
Darin Adler
Comment 13 2012-05-27 21:51:25 PDT
Thought the modern day editing experts might be interested in my struggle from three years ago. This was never resolved.
Note You need to log in before you can comment on or make changes to this bug.