[Webkit-unassigned] [Bug 63040] [meta] positionIsOffsetInAnchor should only accept text nodes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 28 23:46:23 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=63040

--- Comment #9 from Levi Weintraub <leviw at chromium.org> ---
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > >> What do you mind to represent child node w/o PositionIsOffsetInAnchor?
> > > > Performance.
> > > 
> > > Oops, my question is unclear.
> > > How do we represent a position at child node w/o PositionIsOffsetInAnchor?
> > > Use LegacyEditingPosition?
> > 
> > Use BeforeChildren, AfterChildren, BeforeAnchor, or AfterAnchor (for the
> > latter two, you need to change the anchor node since we're no longer
> > anchoring at the parent)
> 
> Thanks for explanation. So, you want to avoid computing node index. But, why
> not use RangeBoundaryPoint?

It's not only about *computing* the node index, it's about finding the child nodes when you just have a pointer to the parent node and index. If you have a position between two non-text nodes in a node list with 1000 siblings, just having [parent, 500] will be very expensive...

> It seems AnchorType introduces complexity in Position class.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150629/1eacdab9/attachment.html>


More information about the webkit-unassigned mailing list