RESOLVED FIXED 34737
copy and paste of list items should work for styled list items
https://bugs.webkit.org/show_bug.cgi?id=34737
Summary copy and paste of list items should work for styled list items
Tony Chang
Reported 2010-02-08 18:54:45 PST
In bug 24872, I added support for copying and pasting list items. Unfortunately, if the bulleted item has styles applied to it, it doesn't work. Patch coming to handle the styled case.
Attachments
Patch (6.07 KB, patch)
2010-02-08 19:00 PST, Tony Chang
no flags
Tony Chang
Comment 1 2010-02-08 19:00:28 PST
Tony Chang
Comment 2 2010-02-08 19:02:07 PST
Comment on attachment 48382 [details] Patch I wasn't taking into account the <span> that we put around fragment HTML when we copy to the clipboard. The span is talked about in bug 26937.
Adam Barth
Comment 3 2010-02-09 12:30:12 PST
I wanted to review this patch, but the editing code is too complicated for me.
Eric Seidel (no email)
Comment 4 2010-02-17 15:57:43 PST
Comment on attachment 48382 [details] Patch So you check if the first child of the style span is a list item. What if the style span includes more than just list items? Either before or after the list? What is the correct behavior for those cases? This is an improvement, so r+. But I'm not sure it's a fully correct fix.
Tony Chang
Comment 5 2010-02-17 18:43:00 PST
(In reply to comment #4) > (From update of attachment 48382 [details]) > So you check if the first child of the style span is a list item. > > What if the style span includes more than just list items? Either before or > after the list? What is the correct behavior for those cases? > > This is an improvement, so r+. But I'm not sure it's a fully correct fix. If the style span includes non-list items before the list, this code never triggers so we paste everything into the current list item node. This would result in the stuff before the list then a sub list. This is the same behavior before the patch on bug 24872. If the style span includes non-list items after the list, we insert into the current list, then the stuff after the list gets added to the last node we insert. Firefox breaks out of the list in this case, maybe we should too. I've filed bug 35068 about this case. Neither of these behavior change from this patch, as you said, this is just an improvement. There's still work to be done.
WebKit Commit Bot
Comment 6 2010-02-17 22:28:35 PST
Comment on attachment 48382 [details] Patch Clearing flags on attachment: 48382 Committed r54931: <http://trac.webkit.org/changeset/54931>
WebKit Commit Bot
Comment 7 2010-02-17 22:28:40 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.