[Webkit-unassigned] [Bug 71207] An extra line break is inserted when pasting into a font element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 27 23:13:49 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=71207
--- Comment #21 from Ryosuke Niwa <rniwa at webkit.org> 2012-03-27 23:13:49 PST ---
(From update of attachment 134055)
View in context: https://bugs.webkit.org/attachment.cgi?id=134055&action=review
> Source/WebCore/ChangeLog:1
> +02012-03-27 Yi Shen <yi.4.shen at nokia.com>, Ryosuke Niwa <rniwa at webkit.org>
Oops, you need to fix this line :( Please delete my name.
> LayoutTests/editing/inserting/insert-text-into-font.html:1
> +<body contentEditable="true">
No DOCTYPE?
> LayoutTests/editing/inserting/insert-text-into-font.html:39
> + // Inserting HTML to replace the "line" in the "Second line" should not insert an extra div (line break).
> + var targetDiv = document.getElementById("secondDiv");
> + var targetText = targetDiv.firstChild;
> + execSetSelectionCommand(targetText, 8, targetText, targetText.textContent.length);
> + document.execCommand("inserthtml", false, "<span id='red' style='color:red'>line</span>");
> +
> + // Verify that the font still only has one div.
> + var font = document.getElementById("fonts");
> + var divs = font.querySelectorAll("div");
> + if (divs.length != 1)
> + fail("An extra div is inserted which is incorrect. There are " + divs.length + " divs inside font element.");
> +
> + // Inserting HTML into "Second line" should not insert an extra div (line break).
> + execSetSelectionCommand(targetText, 8, targetText, 8);
> + document.execCommand("inserthtml", false, "<span id='green' style='color:green'>green</span>");
> +
> + // Verify that the font still only has one div.
> + var font = document.getElementById("fonts");
> + var divs = font.querySelectorAll("div");
> + if (divs.length != 1)
> + fail("An extra div is inserted which is incorrect. There are " + divs.length + " divs inside font element.");
It's probably better to use dump-as-markup.js here.
--
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