Bug 52099

Summary: [Meta] Get rid of legacy editing position
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: darin, enrica, eric, jparent, kalman, leviw, tonikitoo, tony, webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug 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    
Bug Blocks: 52098    

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().