Summary: | listifyParagraph should use moveParagraphWithClones instead of moveParagraph | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||||||
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | NEW --- | ||||||||||||
Severity: | Normal | CC: | enrica, justin.garcia, rolandsteiner, tkent, tony | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Bug Depends on: | 42913, 33668, 42608 | ||||||||||||
Bug Blocks: | 27522, 32422, 49315 | ||||||||||||
Attachments: |
|
Description
Ryosuke Niwa
2010-07-15 18:15:20 PDT
Created attachment 61844 [details]
work in progress, request for comments
Work in progress. I made some good progress but moveParagraphWithClones grabs extra div's in many cases. It seems like I'm not giving the correct outerBlock.
Created attachment 61921 [details]
work in progress 2
More progress. 5 rebaselines are added to the patch but there are 3 additional tests in /editing/execCommand/ that require rebaseline: create-list-from-range-selection.html, create-list-with-hr.html, and insert-list-empty-div.html. These tests should be dumpAsText or dumpAsMarkup tests instead and should be converted in a separate patch before this patch is to be landed.
It seems like I should be making a separate cleanup patch at this point. I'll appreciate if any of you can comment on my approach / modification here.
Created attachment 62000 [details]
work in progress 3
I added PersistentEditingPosition to isolate the code saving and restoring selection. It stores a VisiblePosition and returns the VisiblePosition when available. When the deepEquivalent node gets detached from the document and the original VisiblePosition becomes invalid, it restores the position using the range length.
Created attachment 62007 [details]
work in progress 3
Sorry, I uploaded a wrong patch.
+Roland I'll appreciate if you can comment on PersistentEditingPosition and if there's any similarity to what you were proposing few weeks ago. I just realized that my patch might cause a significant performance regression since TextIterator will iterate through all the nodes starting at the editable root to find the correct location. I need to figure out an alternative approach here. |