зеркало из https://github.com/mozilla/gecko-dev.git
Merge b2g-inbound to m-c a=merge
This commit is contained in:
Коммит
033860a079
|
@ -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);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="fe92ddd450e03b38edb2d465de7897971d68ac68">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<project name="kernel/common" path="kernel" revision="28aab3bd1139b6beea545f50dee8903c0634de84"/>
|
||||
<project name="platform/system/core" path="system/core" revision="53d584d4a4b4316e4de9ee5f210d662f89b44e7e"/>
|
||||
<project name="u-boot" path="u-boot" revision="2d7a801a3e002078f885e8085fad374a564682e5"/>
|
||||
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="7feb3df0e150053e0143ef525f6e082bda320aea"/>
|
||||
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="6974f8e771d4d8e910357a6739ab124768891e8f"/>
|
||||
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="69c8c336794666b010e34b2f501d89118513c546"/>
|
||||
<project name="vendor/sprd/partner" path="vendor/sprd/partner" revision="8649c7145972251af11b0639997edfecabfc7c2e"/>
|
||||
<project name="vendor/sprd/proprietories" path="vendor/sprd/proprietories" revision="d2466593022f7078aaaf69026adf3367c2adb7bb"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f3e998242fb9a857cf50f5bf3a02304a530ea617"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="fe92ddd450e03b38edb2d465de7897971d68ac68">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="fe92ddd450e03b38edb2d465de7897971d68ac68">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f3e998242fb9a857cf50f5bf3a02304a530ea617"/>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "7075f5263087e8edd48bccd5289320d61b6ed6d7",
|
||||
"revision": "cc0cc3a29b940c3b2e7434540f0e7263458a925d",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f3e998242fb9a857cf50f5bf3a02304a530ea617"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d37950eb09e28aa18d0e01df9ff90574bd4337e0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="bc2da39ccd2b82b67773f10c8da8fc8eedc483ab"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f293787d4a86257c9e78a35bd3f73b31b706e2"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -15,6 +15,34 @@
|
|||
#include "platform.h"
|
||||
#include "shared-libraries.h"
|
||||
|
||||
#include "common/linux/file_id.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||
|
||||
// Get the breakpad Id for the binary file pointed by bin_name
|
||||
static std::string getId(const char *bin_name)
|
||||
{
|
||||
using namespace google_breakpad;
|
||||
using namespace std;
|
||||
|
||||
uint8_t identifier[kMDGUIDSize];
|
||||
char id_str[37]; // magic number from file_id.h
|
||||
|
||||
FileID file_id(bin_name);
|
||||
if (file_id.ElfFileIdentifier(identifier)) {
|
||||
FileID::ConvertIdentifierToString(identifier, id_str, ARRAY_SIZE(id_str));
|
||||
// ConvertIdentifierToString converts the identifier to a string with
|
||||
// some dashes (don't ask me why), but we need it raw, so remove the dashes.
|
||||
char *id_end = remove(id_str, id_str + strlen(id_str), '-');
|
||||
// Also add an extra "0" by the end. google-breakpad does it for
|
||||
// consistency with PDB files so we need to do too.
|
||||
return string(id_str, id_end) + '0';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
#if !defined(MOZ_WIDGET_GONK)
|
||||
// TODO fix me with proper include
|
||||
#include "nsDebug.h"
|
||||
|
@ -56,7 +84,8 @@ int dl_iterate_callback(struct dl_phdr_info *dl_info, size_t size, void *data)
|
|||
if (end > libEnd)
|
||||
libEnd = end;
|
||||
}
|
||||
SharedLibrary shlib(libStart, libEnd, 0, "", dl_info->dlpi_name);
|
||||
const char *name = dl_info->dlpi_name;
|
||||
SharedLibrary shlib(libStart, libEnd, 0, getId(name), name);
|
||||
info.AddSharedLibrary(shlib);
|
||||
|
||||
return 0;
|
||||
|
@ -121,7 +150,7 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
SharedLibrary shlib(start, end, offset, "", name);
|
||||
SharedLibrary shlib(start, end, offset, getId(name), name);
|
||||
info.AddSharedLibrary(shlib);
|
||||
if (count > 10000) {
|
||||
LOG("Get maps failed");
|
||||
|
|
Загрузка…
Ссылка в новой задаче