[webkit-dev] Canonical positions
Alexey Proskuryakov
ap-carbon at rambler.ru
Tue Nov 6 08:56:58 PST 2007
It looks like WebKit HTML editing code has several concepts of a
"canonical" position:
- Positions are not automatically canonicalized, but Position.isCandidate()
and PositionIterator.isCandidate() pick out some of them as better ones.
- VisiblePositions are automatically canonicalized with
VisiblePosition::canonicalPosition(). A Position that corresponds to a
VisiblePosition is called deepEquivalent.
- To be used in ranges, Positions have to be canonicalized with
rangeCompliantEquivalent(). Even VisiblePositions are not directly suitable
for use in ranges.
Can the differences between these be explained in some high-level fashion?
So far, I haven't had much luck with understanding them from reading the
code.
- WBR, Alexey Proskuryakov.
More information about the webkit-dev
mailing list