зеркало из https://github.com/mozilla/gecko-dev.git
backout bug 1029943 for performance regressions (see bug 1066515)
This commit is contained in:
Родитель
f13b04f82f
Коммит
70514dcc33
|
@ -1007,8 +1007,8 @@ pref("dom.wakelock.enabled", true);
|
|||
// Enable touch caret by default
|
||||
pref("touchcaret.enabled", true);
|
||||
|
||||
// Enable selection caret by default
|
||||
pref("selectioncaret.enabled", true);
|
||||
// Disable selection caret by default
|
||||
pref("selectioncaret.enabled", false);
|
||||
|
||||
// Enable sync and mozId with Firefox Accounts.
|
||||
pref("services.sync.fxaccounts.enabled", true);
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "nsIObjectFrame.h"
|
||||
#include "nsBindingManager.h"
|
||||
#include "nsStyleCoord.h"
|
||||
#include "SelectionCarets.h"
|
||||
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
@ -1567,11 +1566,6 @@ nsFocusManager::Blur(nsPIDOMWindow* aWindowToClear,
|
|||
return true;
|
||||
}
|
||||
|
||||
nsRefPtr<SelectionCarets> selectionCarets = presShell->GetSelectionCarets();
|
||||
if (selectionCarets) {
|
||||
selectionCarets->SetVisibility(false);
|
||||
}
|
||||
|
||||
bool clearFirstBlurEvent = false;
|
||||
if (!mFirstBlurEvent) {
|
||||
mFirstBlurEvent = content;
|
||||
|
|
|
@ -81,9 +81,7 @@ for (var i = 0; i < testRanges.length; i++) {
|
|||
}
|
||||
}
|
||||
|
||||
setup(function () {
|
||||
generate_tests(testCollapse, tests);
|
||||
}, { timeout_multiplier: 2 });
|
||||
generate_tests(testCollapse, tests);
|
||||
|
||||
testDiv.style.display = "none";
|
||||
</script>
|
||||
|
|
|
@ -100,13 +100,13 @@ needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
|
|||
skip-if(B2G) fails-if(Android) needs-focus != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
|
||||
needs-focus == 824080-1.html 824080-1-ref.html
|
||||
needs-focus == 824080-2.html 824080-2-ref.html
|
||||
needs-focus test-pref(selectioncaret.enabled,false) == 824080-3.html 824080-3-ref.html
|
||||
needs-focus == 824080-3.html 824080-3-ref.html
|
||||
needs-focus != 824080-2.html 824080-3.html
|
||||
needs-focus == 824080-4.html 824080-4-ref.html
|
||||
needs-focus test-pref(selectioncaret.enabled,false) == 824080-5.html 824080-5-ref.html
|
||||
needs-focus == 824080-5.html 824080-5-ref.html
|
||||
needs-focus != 824080-4.html 824080-5.html
|
||||
needs-focus == 824080-6.html 824080-6-ref.html
|
||||
needs-focus pref(selectioncaret.enabled,false) == 824080-7.html 824080-7-ref.html
|
||||
needs-focus == 824080-7.html 824080-7-ref.html
|
||||
needs-focus != 824080-6.html 824080-7.html
|
||||
# Bug 674927: copy spellcheck-textarea tests to contenteditable
|
||||
== spellcheck-contenteditable-attr.html spellcheck-contenteditable-nofocus-ref.html
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=558663
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 558663</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=558663">Mozilla Bug 558663</a></p>
|
||||
|
||||
<!-- 20x20 of red -->
|
||||
<iframe id="iframe" src="data:text/html,<img id='image' border='0' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC'>"></iframe>
|
||||
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 558663 **/
|
||||
var ok = parent.ok;
|
||||
var SimpleTest = parent.SimpleTest;
|
||||
var compareSnapshots = parent.compareSnapshots;
|
||||
var snapshotWindow = parent.snapshotWindow;
|
||||
var synthesizeMouse = parent.synthesizeMouse;
|
||||
|
||||
window.addEventListener("load", runTest, false);
|
||||
|
||||
function checkSnapshots(s1, s2, shouldBeEqual, testName) {
|
||||
var res = compareSnapshots(s1, s2, shouldBeEqual);
|
||||
if (res[0]) {
|
||||
ok(true, testName + " snapshots compare correctly");
|
||||
} else {
|
||||
ok(false, testName + " snapshots compare incorrectly. snapshot 1: " +
|
||||
res[1] + " snapshot 2: " + res[2]);
|
||||
}
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
document.getElementById("iframe").contentWindow.document.designMode = "on";
|
||||
|
||||
// The editor requires the event loop to spin after you turn on design mode
|
||||
// before it takes effect.
|
||||
setTimeout(continueTest, 100);
|
||||
}
|
||||
|
||||
function continueTest() {
|
||||
var win = document.getElementById("iframe").contentWindow;
|
||||
var doc = win.document;
|
||||
var image = doc.getElementById("image");
|
||||
|
||||
// We want to test that clicking on the image and then clicking on one of the
|
||||
// draggers doesn't make the draggers disappear.
|
||||
|
||||
// clean snapshot
|
||||
var before = snapshotWindow(win);
|
||||
|
||||
// click to get the draggers
|
||||
synthesizeMouse(image, 1, 1, {type: "mousedown"}, win);
|
||||
synthesizeMouse(image, 1, 1, {type: "mouseup"}, win);
|
||||
|
||||
// mouse over a dragger will change its color, so move the mouse away
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mousemove"}, win);
|
||||
|
||||
// snapshot with hopefully draggers
|
||||
var middle = snapshotWindow(win);
|
||||
|
||||
// clicking on the top left dragger shouldn't change anything
|
||||
synthesizeMouse(image, 1, 1, {type: "mousedown"}, win);
|
||||
synthesizeMouse(image, 1, 1, {type: "mouseup"}, win);
|
||||
|
||||
// mouse over a dragger will change its color, so move the mouse away
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mousemove"}, win);
|
||||
|
||||
// snapshot with hopefully draggers again
|
||||
var middle2 = snapshotWindow(win);
|
||||
|
||||
// click outside the image (but inside the document) to unselect it
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mousedown"}, win);
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mouseup"}, win);
|
||||
|
||||
// and then click outside the document so we don't draw a caret
|
||||
synthesizeMouse(document.documentElement, 1, 1, {type: "mousedown"}, window);
|
||||
synthesizeMouse(document.documentElement, 1, 1, {type: "mouseup"}, window);
|
||||
|
||||
// hopefully clean snapshot
|
||||
var end = snapshotWindow(win);
|
||||
|
||||
// before == end && middle == middle2 && before/end != middle/middle2
|
||||
checkSnapshots(before, end, true, "before and after should be the same")
|
||||
checkSnapshots(middle, middle2, true, "middle two should be the same");
|
||||
checkSnapshots(before, middle, false, "before and middle should not be the same");
|
||||
checkSnapshots(before, middle2, false, "before and middle2 should not be the same");
|
||||
checkSnapshots(middle, end, false, "middle and end should not be the same");
|
||||
checkSnapshots(middle2, end, false, "middle2 and end should not be the same");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -30,7 +30,6 @@ support-files =
|
|||
bug467672-4-ref.html
|
||||
bug467672-5.html
|
||||
bug467672-5-ref.html
|
||||
bug558663.html
|
||||
bug570378-arabic-1.html
|
||||
bug570378-arabic-1-ref.html
|
||||
bug570378-arabic-2.html
|
||||
|
|
|
@ -1,33 +1,101 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 558663 test</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<style>
|
||||
iframe {
|
||||
width: 600px;
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
</body>
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Selection caret's pref is checked only when PresShell is initialized. To turn
|
||||
// off the pref, we test bug 558663 in an iframe.
|
||||
SpecialPowers.pushPrefEnv({"set": [['selectioncaret.enabled', false]]}, function() {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.src = "bug558663.html";
|
||||
document.getElementById('container').appendChild(iframe);
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=558663
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 558663</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<p><a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=558663">Mozilla Bug 514127</a></p>
|
||||
|
||||
<!-- 20x20 of red -->
|
||||
<iframe id="iframe" src="data:text/html,<img id='image' border='0' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC'>"></iframe>
|
||||
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 558663 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
window.addEventListener("load", runTest, false);
|
||||
|
||||
function checkSnapshots(s1, s2, shouldBeEqual, testName) {
|
||||
var res = compareSnapshots(s1, s2, shouldBeEqual);
|
||||
if (res[0]) {
|
||||
ok(true, testName + " snapshots compare correctly");
|
||||
} else {
|
||||
ok(false, testName + " snapshots compare incorrectly. snapshot 1: " +
|
||||
res[1] + " snapshot 2: " + res[2]);
|
||||
}
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
document.getElementById("iframe").contentWindow.document.designMode = "on";
|
||||
|
||||
// The editor requires the event loop to spin after you turn on design mode
|
||||
// before it takes effect.
|
||||
setTimeout(continueTest, 100);
|
||||
}
|
||||
|
||||
function continueTest() {
|
||||
var win = document.getElementById("iframe").contentWindow;
|
||||
var doc = win.document;
|
||||
var image = doc.getElementById("image");
|
||||
|
||||
// We want to test that clicking on the image and then clicking on one of the
|
||||
// draggers doesn't make the draggers disappear.
|
||||
|
||||
// clean snapshot
|
||||
var before = snapshotWindow(win);
|
||||
|
||||
// click to get the draggers
|
||||
synthesizeMouse(image, 1, 1, {type: "mousedown"}, win);
|
||||
synthesizeMouse(image, 1, 1, {type: "mouseup"}, win);
|
||||
|
||||
// mouse over a dragger will change its color, so move the mouse away
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mousemove"}, win);
|
||||
|
||||
// snapshot with hopefully draggers
|
||||
var middle = snapshotWindow(win);
|
||||
|
||||
// clicking on the top left dragger shouldn't change anything
|
||||
synthesizeMouse(image, 1, 1, {type: "mousedown"}, win);
|
||||
synthesizeMouse(image, 1, 1, {type: "mouseup"}, win);
|
||||
|
||||
// mouse over a dragger will change its color, so move the mouse away
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mousemove"}, win);
|
||||
|
||||
// snapshot with hopefully draggers again
|
||||
var middle2 = snapshotWindow(win);
|
||||
|
||||
// click outside the image (but inside the document) to unselect it
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mousedown"}, win);
|
||||
synthesizeMouse(doc.documentElement, 50, 50, {type: "mouseup"}, win);
|
||||
|
||||
// and then click outside the document so we don't draw a caret
|
||||
synthesizeMouse(document.documentElement, 1, 1, {type: "mousedown"}, window);
|
||||
synthesizeMouse(document.documentElement, 1, 1, {type: "mouseup"}, window);
|
||||
|
||||
// hopefully clean snapshot
|
||||
var end = snapshotWindow(win);
|
||||
|
||||
// before == end && middle == middle2 && before/end != middle/middle2
|
||||
checkSnapshots(before, end, true, "before and after should be the same")
|
||||
checkSnapshots(middle, middle2, true, "middle two should be the same");
|
||||
checkSnapshots(before, middle, false, "before and middle should not be the same");
|
||||
checkSnapshots(before, middle2, false, "before and middle2 should not be the same");
|
||||
checkSnapshots(middle, end, false, "middle and end should not be the same");
|
||||
checkSnapshots(middle2, end, false, "middle2 and end should not be the same");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче