Bug 833610 - Backout the second half of bug 832025; r=ehsan

This commit is contained in:
Daniel Glazman 2013-01-23 18:19:00 -05:00
Родитель 86a666bcbe
Коммит 2e4b8d1b8d
3 изменённых файлов: 0 добавлений и 47 удалений

Просмотреть файл

@ -6565,10 +6565,6 @@ nsHTMLEditRules::ReturnInListItem(nsISelection *aSelection,
// otherwise kill this listitem
res = mHTMLEditor->DeleteNode(aListItem);
NS_ENSURE_SUCCESS(res, res);
res = ClearCachedStyles();
NS_ENSURE_SUCCESS(res, res);
mHTMLEditor->mTypeInState->ClearAllProps();
// time to insert a paragraph
NS_NAMED_LITERAL_STRING(pType, "p");

Просмотреть файл

@ -85,7 +85,6 @@ MOCHITEST_FILES = \
test_bug790475.html \
test_bug796839.html \
test_bug832025.html \
test_bug832025_2.html \
test_spellcheck_pref.html \
$(NULL)

Просмотреть файл

@ -1,42 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=832025
-->
<head>
<title>Test for Bug 832025</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=832025">Mozilla Bug 832025</a>
<div id="test" contenteditable="true"><ul><li>listitem <strong id="s">strong</strong></li></ul></div>
<script type="application/javascript">
/**
* Second Test for Bug 832025
*
*/
document.execCommand("stylewithcss", false, "true");
var test = document.getElementById("test");
var s = document.getElementById("s");
test.focus();
// place caret at end of editable area
var sel = getSelection();
sel.collapse(s, s.childNodes.length);
// simulate two CR keys
sendKey("return");
sendKey("return");
// insert some text
document.execCommand("insertText", false, "abc");
is(test.innerHTML == '<ul><li>listitem <strong id="s">strong</strong></li></ul><p>abc<br></p>',
true, "A paragraph automatically created after two CRs at the end of a bold listitem should not be bold");
</script>
</body>
</html>