mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
8b6c211c36
A lot of methods in editor returns a child offset with an out param when it returns its container and offset in the container. This is ugly hack for performance of nsINode::IndexOf(). However, there are a lot of regression since the relation between offset and child node can be broken really easily. So, we should make EditorDOMPoint as a subclass of RangeBoundary and manage a set of container, reference child and its offset in it (e.g., SetNextSibling() added by this patch). Note that RangeBoundary's performance is not good for temporary use if we set a point with offset, it immediately retrieves mRef. The following patch will improve this performance. MozReview-Commit-ID: 7mcJ1P1OjVr --HG-- rename : editor/libeditor/EditorUtils.h => editor/libeditor/EditorDOMPoint.h extra : rebase_source : 785094fcfc592d9e5b48cbc36ed225dbb8bb4111