Bug 52099 - [Meta] Get rid of legacy editing position
Summary: [Meta] Get rid of legacy editing position
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
Depends on: 52674 52696 52250 52481 52642 52644 52676 52742 52759 52919 54535 54536 54622 54633 54937 55352 56025 56439 58569 63037 63672 63816 66014
Blocks: 52098
  Show dependency treegraph
Reported: 2011-01-07 18:16 PST by Ryosuke Niwa
Modified: 2017-07-18 08:27 PDT (History)
9 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-01-07 18:16:55 PST
We should fix various parts of editing code not to instantiate a Position with m_isLegacyEditingPosition set true.  This will allow us to clean up other Position-related code in editing.
Comment 1 Ryosuke Niwa 2011-01-19 17:43:28 PST
Under this meta bug, we need to do:
- Stop instantiating legacy editing positions
- Remove calls to deprecatedEditingOffset()
- Remove improper calls to node()

The first two accomplishes the goal of this bug to eliminate the dependency on legacy editing positions. 

The third comes from the fact, obtaining the anchor node of Position doesn't make much sense for new positions.  When some editing code calls node() on some position, and checks if it's a text node or not.  But what if the position was before or after a text node.  The anchor node still be a text node but it's not inside.  In fact, they're explicitly outside of the text node.

For this reason, we need to examine every and each call to node() and replace it by containerNode(), computeNodeBeforePosition(), computeNodeAfterPosition(), and anchorNode().