зеркало из https://github.com/mozilla/gecko-dev.git
Bug 833610 - Backout the second half of bug 832025; r=ehsan
This commit is contained in:
Родитель
86a666bcbe
Коммит
2e4b8d1b8d
|
@ -6565,10 +6565,6 @@ nsHTMLEditRules::ReturnInListItem(nsISelection *aSelection,
|
||||||
// otherwise kill this listitem
|
// otherwise kill this listitem
|
||||||
res = mHTMLEditor->DeleteNode(aListItem);
|
res = mHTMLEditor->DeleteNode(aListItem);
|
||||||
NS_ENSURE_SUCCESS(res, res);
|
NS_ENSURE_SUCCESS(res, res);
|
||||||
|
|
||||||
res = ClearCachedStyles();
|
|
||||||
NS_ENSURE_SUCCESS(res, res);
|
|
||||||
mHTMLEditor->mTypeInState->ClearAllProps();
|
|
||||||
|
|
||||||
// time to insert a paragraph
|
// time to insert a paragraph
|
||||||
NS_NAMED_LITERAL_STRING(pType, "p");
|
NS_NAMED_LITERAL_STRING(pType, "p");
|
||||||
|
|
|
@ -85,7 +85,6 @@ MOCHITEST_FILES = \
|
||||||
test_bug790475.html \
|
test_bug790475.html \
|
||||||
test_bug796839.html \
|
test_bug796839.html \
|
||||||
test_bug832025.html \
|
test_bug832025.html \
|
||||||
test_bug832025_2.html \
|
|
||||||
test_spellcheck_pref.html \
|
test_spellcheck_pref.html \
|
||||||
$(NULL)
|
$(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>
|
|
Загрузка…
Ссылка в новой задаче