RESOLVED FIXED 8622
VisiblePositions aren't canonicalized in some cases
https://bugs.webkit.org/show_bug.cgi?id=8622
Summary VisiblePositions aren't canonicalized in some cases
Justin Garcia
Reported 2006-04-26 22:02:57 PDT
In this example: <div>foo<br></div> VP(div, 2) != VP(br, 0) There are a couple of problems in initDeepPosition. First, in the fall through code, where neither upstream() nor downstream() are candidates, we canonicalize to next in most cases, whereas we claim that we always canonicalize to the candidate that appears first in the DOM. Second, in the fall through code, prev is just the first candidate found when going backward through the DOM. There may be another equivalent candidate if you go further, and we should canonicalize to that one. In the example above, VP(div, 2) gets into the fall through code, prev is [br, 0], which is equivalent to [foo, 3]. [foo, 3] should be used, but [br, 0] is used instead.
Attachments
Justin Garcia
Comment 1 2006-04-26 23:26:54 PDT
Note, remove the workaround in VisiblePosition::isEqualIgnoringAffinity when this is fixed.
David Harrison
Comment 2 2007-05-07 17:00:38 PDT
Justin says he thinks this sounds like rdar://5096134 is a result of the workaround not being in affect for WebKit Accessibility's TextMarkers.
Justin Garcia
Comment 3 2007-05-30 15:17:26 PDT
Note You need to log in before you can comment on or make changes to this bug.