[Webkit-unassigned] [Bug 26937] Copying and pasting into a contenteditable area can create <div>s surrounded by <span>s

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 17 22:35:30 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=26937





--- Comment #20 from Tony Chang (Google) <tony at chromium.org>  2010-02-17 22:35:30 PST ---
(In reply to comment #19)
> It might be sensible to use ApplyStyleCommand here. Because if we're applying
> style, we might want to consider converting them to u, i, etc... tags as well.
> 
> @Tony, have you looked into this point? i.e. when user is editing html in
> styleWithCSS=false, doesn't your code provide new style attribute rather than
> decorating them with tags?

I hadn't looked into it, so I tried it locally.  There are a couple problems
with using apply style:

1) In some cases, ApplyStyleCommand copies nodes.  This causes some nodes
pointed to by ReplaceSelectionCommand to become stale.  This is probably
fixable, but non-trivial.

2) It would mean rebaselining a a few dozen tests.  Since we always put a span
on the pasteboard, these tests expect the span when pasted, regardless of
whether we're in stylewithcss mode or not.

I think it's possible, but it's not really regressing anything here. 
Previously we had a span around divs with styleWithCSS=false.  Maybe file a new
bug about this?  I'm not sure it's worth the effort to fix (i.e., I'm not sure
what actual sites are impacted by not honoring styleWithCSS when pasting).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list