Bug 52481 - Stop instantiating legacy editing positions in AccessibilityRenderObject.cpp, Element.cpp, BreakBlockquoteCommand.cpp, CompositeEditCommand.cpp, and DeleteButtonController.cpp
Summary: Stop instantiating legacy editing positions in AccessibilityRenderObject.cpp,...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 52099
  Show dependency treegraph
 
Reported: 2011-01-14 14:09 PST by Ryosuke Niwa
Modified: 2011-01-17 13:02 PST (History)
5 users (show)

See Also:


Attachments
cleanup (12.96 KB, patch)
2011-01-14 14:43 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-01-14 14:09:45 PST
This is a cleanup bug.
Comment 1 Ryosuke Niwa 2011-01-14 14:43:15 PST
Created attachment 79004 [details]
cleanup
Comment 2 Eric Seidel (no email) 2011-01-14 14:44:55 PST
Comment on attachment 79004 [details]
cleanup

OK.
Comment 3 Eric Seidel (no email) 2011-01-14 14:45:24 PST
We're going to have to solve the Position ref-churn problem at some point.  All these functions should be reutrning some sort of PassPosition object which knows how to avoid the ref-churn.
Comment 4 Ryosuke Niwa 2011-01-14 14:49:00 PST
(In reply to comment #3)
> We're going to have to solve the Position ref-churn problem at some point.  All these functions should be reutrning some sort of PassPosition object which knows how to avoid the ref-churn.

Yeah, that'll be nice.  In fact, PassPosition can just contain Node* and offset because we shouldn't be relying on positions to hang onto nodes given Position's constructor takes Node*.
Comment 5 Ryosuke Niwa 2011-01-14 16:17:00 PST
Comment on attachment 79004 [details]
cleanup

Clearing flags on attachment: 79004

Committed r75835: <http://trac.webkit.org/changeset/75835>
Comment 6 Ryosuke Niwa 2011-01-14 16:17:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Darin Adler 2011-01-17 12:57:46 PST
(In reply to comment #4)
> PassPosition can just contain Node* and offset because we shouldn't be relying on positions to hang onto nodes given Position's constructor takes Node*.

That’t not right. I think PassPosition needs to contain a RefPtr or PassRefPtr.
Comment 8 Ryosuke Niwa 2011-01-17 13:02:12 PST
(In reply to comment #7)
> (In reply to comment #4)
> > PassPosition can just contain Node* and offset because we shouldn't be relying on positions to hang onto nodes given Position's constructor takes Node*.
> 
> That’t not right. I think PassPosition needs to contain a RefPtr or PassRefPtr.

Yeah, it would have worked if only Position's helper functions (which also take Node*) returned PassPosition but to allow other functions return PassPosition, we need to use PassRefPtr (my work-in-progress patch uses PassRefPtr).  Anyhow, PassPosition is to be implemented in the bug 52504.