[webkit-dev] Rich Text Editing Questions, Refactoring of Position Classes
ap at webkit.org
Tue Apr 6 09:29:54 PDT 2010
05.04.2010, в 22:46, Maciej Stachowiak написал(а):
>> The current implementation allows for (and operates on) positions such as [img, 0] - [img, 1] or [br,0] - [br, 1]. Is there a fundamental reason to keep such positions within the internal representation rather than normalize them to [parent-of-img, index-of-img(+1)] - round-tripping perhaps?
> Having fake positions like that is not good. I don't think there is a good reason for it. But the assumption got deeply embedded into the code, and it will take some doing to remove. One step in that direction would be to phase out all use of Position.deprecatedEditingOffset() and Position.node().
I think that one reason is performance - "index-of-img" can be costly. But I completely agree that we should try to get rid of these.
- WBR, Alexey Proskuryakov
More information about the webkit-dev