зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1123067) for mochitest-1 bustage on a CLOSED TREE
Backed out changeset d35d83e9c9f2 (bug 1123067) Backed out changeset ea4ea5299409 (bug 1123067)
This commit is contained in:
Родитель
bdedcc0b2a
Коммит
249a7cc50c
|
@ -1,38 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1123067</title>
|
||||
<script>
|
||||
function click(id) {
|
||||
var e = document.querySelector(id);
|
||||
synthesizeMouse(e, 1, 1, {type: "mousedown"}, window);
|
||||
synthesizeMouse(e, 1, 1, {type: "mouseup"}, window);
|
||||
}
|
||||
function test() {
|
||||
for (var i = 0; i < 5; ++i) {
|
||||
synthesizeKey("VK_RIGHT", {});
|
||||
}
|
||||
synthesizeKey("VK_LEFT", {});
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function runTests() {
|
||||
click('#test1')
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
div { -moz-user-select:none; }
|
||||
div:focus { outline:1px solid black; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="test1" contenteditable="true" spellcheck="false" onfocus="test()">This text is NOT selectable.</div>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForFocus(runTests);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,34 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase #2 for bug 1123067</title>
|
||||
<script>
|
||||
function test() {
|
||||
for (var i = 0; i < 5; ++i) {
|
||||
synthesizeKey("VK_RIGHT", {});
|
||||
}
|
||||
synthesizeKey("VK_LEFT", {});
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function runTests() {
|
||||
var e = document.querySelector('#test1');
|
||||
e.focus();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
div { -moz-user-select:none; }
|
||||
div:focus { outline:1px solid black; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="test1" contenteditable="true" spellcheck="false" onfocus="setTimeout(test,0)">This text is NOT selectable.</div>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForFocus(runTests);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,35 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait" style="-moz-user-select:none" spellcheck="false">
|
||||
<head>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase #2 for bug 1123067</title>
|
||||
<script>
|
||||
function test() {
|
||||
for (var i = 0; i < 5; ++i) {
|
||||
synthesizeKey("VK_RIGHT", {});
|
||||
}
|
||||
synthesizeKey("VK_LEFT", {});
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function runTests() {
|
||||
document.designMode='on';
|
||||
document.querySelector('div').focus();
|
||||
document.body.offsetHeight;
|
||||
setTimeout(test,0)
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
div { outline:1px solid black; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>This text is NOT selectable.</div>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForFocus(runTests);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1123067</title>
|
||||
<script>
|
||||
function test() {
|
||||
for (var i = 0; i < 5; ++i) {
|
||||
synthesizeKey("VK_RIGHT", {});
|
||||
}
|
||||
synthesizeKey("VK_LEFT", {});
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function runTests() {
|
||||
var e = document.querySelector('#test1');
|
||||
e.focus();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
div:focus { outline:1px solid black; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="test1" contenteditable="true" spellcheck="false" onfocus="test()">This text is NOT selectable.</div>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForFocus(runTests);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -65,10 +65,6 @@ support-files =
|
|||
bug1109968-1.html
|
||||
bug1109968-2-ref.html
|
||||
bug1109968-2.html
|
||||
bug1123067-1.html
|
||||
bug1123067-2.html
|
||||
bug1123067-3.html
|
||||
bug1123067-ref.html
|
||||
|
||||
[test_preserve3d_sorting_hit_testing.html]
|
||||
[test_after_paint_pref.html]
|
||||
|
|
|
@ -152,9 +152,6 @@ var tests = [
|
|||
[ 'bug1061468.html' , 'bug1061468-ref.html' ] ,
|
||||
[ 'bug1109968-1.html', 'bug1109968-1-ref.html'] ,
|
||||
[ 'bug1109968-2.html', 'bug1109968-2-ref.html'] ,
|
||||
[ 'bug1123067-1.html' , 'bug1123067-ref.html' ] ,
|
||||
[ 'bug1123067-2.html' , 'bug1123067-ref.html' ] ,
|
||||
[ 'bug1123067-3.html' , 'bug1123067-ref.html' ] ,
|
||||
function() {SpecialPowers.clearUserPref("touchcaret.enabled");} ,
|
||||
];
|
||||
|
||||
|
|
|
@ -3518,16 +3518,6 @@ Selection::AddItem(nsRange* aItem, int32_t* aOutIndex)
|
|||
if (mApplyUserSelectStyle) {
|
||||
nsAutoTArray<nsRefPtr<nsRange>, 4> rangesToAdd;
|
||||
aItem->ExcludeNonSelectableNodes(&rangesToAdd);
|
||||
if (rangesToAdd.IsEmpty()) {
|
||||
ErrorResult err;
|
||||
nsINode* node = aItem->GetStartContainer(err);
|
||||
if (node && node->IsContent() && node->AsContent()->GetEditingHost()) {
|
||||
// A contenteditable node with user-select:none, for example.
|
||||
// Allow it to have a collapsed selection (for the caret).
|
||||
aItem->Collapse(GetDirection() == eDirPrevious);
|
||||
rangesToAdd.AppendElement(aItem);
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; i < rangesToAdd.Length(); ++i) {
|
||||
nsresult rv = AddItemInternal(rangesToAdd[i], aOutIndex);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче