[Webkit-unassigned] [Bug 25002] Repeated copy/paste can lead to deeply nested divs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 31 22:50:02 PST 2010


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


Tony Chang (Google) <tony at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tony at chromium.org




--- Comment #2 from Tony Chang (Google) <tony at chromium.org>  2010-01-31 22:50:01 PST ---
(In reply to comment #1)
> Created an attachment (id=47813)
 --> (https://bugs.webkit.org/attachment.cgi?id=47813) [details]
> Patch

When inserting a new line, we grab the last block node and clone it as a
sibling. For example, in the original bug report, the last block is the <div>
around "c" and it gets cloned as a sibling of c.  This causes a problem in this
test case because the pasted content includes a <div> at the end.  When we
create a new line after a paste, we are now one level deeper than before.

For tags other than divs, this is what we want because we want to keep our
indention level.  For example, for blockquote tags, when you insert a newline,
you want to stay at the same depth as before (i.e., you want nested
blockquotes).  The same is true for lists.

The patch just special cases nested divs and breaks out of them when inserting
a new line.

-- 
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