Backed out changeset 766c31839315 (bug 1703497) for causing mochitest failures in test_group_double_tap_zoom. CLOSED TREE

This commit is contained in:
smolnar 2021-04-09 15:05:43 +03:00
Родитель d7e38be9ab
Коммит 39d4b3fc1e
3 изменённых файлов: 1 добавлений и 64 удалений

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

@ -1,60 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=2100"/>
<title>Check that double tapping a small element works</title>
<script src="apz_test_native_event_utils.js"></script>
<script src="apz_test_utils.js"></script>
<script src="/tests/SimpleTest/paint_listener.js"></script>
<script>
async function doubleTapOn(element, x, y) {
let useTouchpad = (location.search == "?touchpad");
let transformEndPromise = promiseTransformEnd();
if (useTouchpad) {
synthesizeNativeTouchpadDoubleTap(element, x, y);
} else {
synthesizeNativeTap(element, x, y);
synthesizeNativeTap(element, x, y);
}
// Wait for the APZ:TransformEnd to fire
await transformEndPromise;
// Flush state so we can query an accurate resolution
await promiseOnlyApzControllerFlushed();
}
async function test() {
var resolution = getResolution();
ok(resolution > 0,
"The initial_resolution is " + resolution + ", which is some sane value");
// Check that double-tapping once zooms in
await doubleTapOn(document.getElementById("target"), 1, 1);
var prev_resolution = resolution;
resolution = getResolution();
ok(resolution > prev_resolution, "The first double-tap has increased the resolution to " + resolution);
// Check that double-tapping again on the same spot zooms out
await doubleTapOn(document.getElementById("target"), 1, 1);
prev_resolution = resolution;
resolution = getResolution();
ok(resolution < prev_resolution, "The second double-tap has decreased the resolution to " + resolution);
}
waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);
</script>
</head>
<body>
<div id="target" style="background: blue; width: 3px; height: 3px;"></div>
</body>
</html>

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

@ -27,7 +27,6 @@ var subtests = [
{"file": "helper_doubletap_zoom_img.html", "prefs": doubletap_prefs},
{"file": "helper_doubletap_zoom_textarea.html", "prefs": doubletap_prefs},
{"file": "helper_doubletap_zoom_horizontal_center.html", "prefs": visualviewport_and_doubletap_prefs},
{"file": "helper_doubletap_zoom_small.html", "prefs": doubletap_prefs},
];
if (getPlatform() == "mac") {
@ -36,7 +35,6 @@ if (getPlatform() == "mac") {
{"file": "helper_doubletap_zoom_img.html?touchpad", "prefs": doubletap_prefs},
{"file": "helper_doubletap_zoom_textarea.html?touchpad", "prefs": doubletap_prefs},
{"file": "helper_doubletap_zoom_horizontal_center.html?touchpad", "prefs": visualviewport_and_doubletap_prefs},
{"file": "helper_doubletap_zoom_small.html?touchpad", "prefs": doubletap_prefs},
);
}

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

@ -1050,8 +1050,7 @@ nsresult nsChildView::SynthesizeNativeTouchpadDoubleTap(mozilla::LayoutDeviceInt
uint32_t aModifierFlags) {
NS_OBJC_BEGIN_TRY_BLOCK_RETURN;
DispatchDoubleTapGesture(TimeStamp::Now(), aPoint - WidgetToScreenOffset(),
static_cast<Modifiers>(aModifierFlags));
DispatchDoubleTapGesture(TimeStamp::Now(), aPoint, static_cast<Modifiers>(aModifierFlags));
return NS_OK;