Bug 291789 part 3 - Try not to ever delete across table boundaries; r=ehsan

This commit is contained in:
Aryeh Gregor 2012-07-27 17:03:28 +03:00
Родитель 0afc7f8770
Коммит 8782e85213
2 изменённых файлов: 2 добавлений и 4 удалений

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

@ -376,12 +376,9 @@
"[[\"delete\",\"\"]] \"<div style=white-space:pre-wrap>foo&nbsp; []bar</div>\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<div style=white-space:pre-line>foo &nbsp;[]</div>\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<div style=white-space:nowrap>foo &nbsp;[]</div>\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<p>foo<table><tr><td>bar</table><p>[]baz\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"foo<br><table><tr><td>[]bar</table>baz\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<p>foo<table><tr><td>bar<br></table><p>[]baz\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<table><tr><td>foo<br><td>[]bar</table>\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<table><tr><td>foo<br><tr><td>[]bar</table>\" compare innerHTML":true,
"[[\"delete\",\"\"]] \"<p>foo<table><tr><td>bar<br><br></table><p>[]baz\" compare innerHTML":true,
"[[\"defaultparagraphseparator\",\"div\"],[\"delete\",\"\"]] \"foo<ol><li>[]bar<li>baz</ol>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
"[[\"defaultparagraphseparator\",\"div\"],[\"delete\",\"\"]] \"foo<ol><li>[]bar<li>baz</ol>\" compare innerHTML":true,
"[[\"defaultparagraphseparator\",\"div\"],[\"delete\",\"\"]] \"foo<ol><li>[]bar<li>baz</ol>\" queryCommandValue(\"defaultparagraphseparator\") before":true,

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

@ -2169,8 +2169,9 @@ nsHTMLEditRules::WillDeleteSelection(Selection* aSelection,
return NS_OK;
}
// don't cross table boundaries
// don't cross table boundaries -- cancel it
if (InDifferentTableElements(leftNode, rightNode)) {
*aCancel = true;
return NS_OK;
}