зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 931ffb6a2a7a (bug 1525805) by request. CLOSED TREE
This commit is contained in:
Родитель
062a28422e
Коммит
769bb21bcf
|
@ -1,53 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=0.25, initial-scale=0.5, user-scalable=no">
|
||||
<title>Tests that the layout viewport is not expanted to the minimum scale size if user-scalable=no is specified</title>
|
||||
<script type="application/javascript" src="apz_test_utils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
|
||||
<style>
|
||||
html,body {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 400%; height: 400%; background: red;"></div>
|
||||
<div style="width: 100%; height: 100%; background-color: blue"></div>
|
||||
<script type="application/javascript">
|
||||
function waitForFrame() {
|
||||
return new Promise(resolve => {
|
||||
window.requestAnimationFrame(resolve);
|
||||
});
|
||||
}
|
||||
const utils = SpecialPowers.getDOMWindowUtils(window);
|
||||
|
||||
async function test(testDriver) {
|
||||
utils.scrollToVisual(100, 0, utils.UPDATE_TYPE_MAIN_THREAD);
|
||||
|
||||
let receivedScrollEvent = false;
|
||||
window.visualViewport.addEventListener("scroll", () => {
|
||||
receivedScrollEvent = true;
|
||||
}, { once: true });
|
||||
|
||||
await waitUntilApzStable();
|
||||
|
||||
// Waits two frames to get a chance to deliver scroll events.
|
||||
await waitForFrame();
|
||||
await waitForFrame();
|
||||
|
||||
ok(!receivedScrollEvent, "Scroll should never happen");
|
||||
is(visualViewport.offsetLeft, 0,
|
||||
"The visual viewport offset should not be moved");
|
||||
}
|
||||
|
||||
waitUntilApzStable().then(test).then(subtestDone);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -36,7 +36,6 @@ const prefs = [
|
|||
|
||||
const subtests = [
|
||||
{ file: "helper_minimum_scale_1_0.html", prefs },
|
||||
{ file: "helper_no_scalable_with_initial_scale.html", prefs },
|
||||
];
|
||||
|
||||
if (isApzEnabled()) {
|
||||
|
|
|
@ -784,8 +784,7 @@ void nsHTMLScrollFrame::PlaceScrollArea(ScrollReflowInput& aState,
|
|||
|
||||
nsRect scrolledArea;
|
||||
// Preserve the width or height of empty rects
|
||||
nsSize portSize =// mHelper.mScrollPort.Size();
|
||||
nsSize(mHelper.mScrollPort.XMost(), mHelper.mScrollPort.YMost());
|
||||
nsSize portSize = mHelper.mScrollPort.Size();
|
||||
nsRect scrolledRect = mHelper.GetUnsnappedScrolledRectInternal(
|
||||
aState.mContentsOverflowAreas.ScrollableOverflow(), portSize);
|
||||
scrolledArea.UnionRectEdges(scrolledRect, nsRect(nsPoint(0, 0), portSize));
|
||||
|
@ -5575,10 +5574,6 @@ void ScrollFrameHelper::UpdateMinimumScaleSize(
|
|||
}
|
||||
|
||||
nsViewportInfo viewportInfo = doc->GetViewportInfo(displaySize);
|
||||
if (!viewportInfo.IsZoomAllowed()) {
|
||||
// Don't apply the minimum scale size if user-scalable=no is specified.
|
||||
return;
|
||||
}
|
||||
|
||||
// The intrinsic minimum scale is the scale that fits the entire content
|
||||
// width into the visual viewport.
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
<style>
|
||||
html {
|
||||
overflow: hidden;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
<div style="background: red; width: 300%; height: 300%"></div>
|
||||
<div style="background: green; width: 200%; height: 200%"></div>
|
||||
<div style="background: blue; width: 100%; height: 100%"></div>
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=0.5,user-scalable=no">
|
||||
<style>
|
||||
html {
|
||||
overflow: hidden;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
<div style="background: red; width: 300%; height: 300%"></div>
|
||||
<div style="background: green; width: 200%; height: 200%"></div>
|
||||
<div style="background: blue; width: 100%; height: 100%"></div>
|
|
@ -8,7 +8,6 @@ default-preferences pref(dom.meta-viewport.enabled,true) pref(apz.allow_zooming,
|
|||
== viewport-width.html initial-scale-0_5-ref.html
|
||||
== initial-scale-1.html no-zoom-ref.html
|
||||
== minimum-scale.html no-zoom-ref.html
|
||||
== no-scalable-with-minimum-scale.html no-scalable-with-minimum-scale-ref.html
|
||||
== clamped-by-default-minimum-scale.html initial-scale-0_25-ref.html
|
||||
|
||||
skip-if(!Android) == position-fixed-on-minimum-scale-size.html position-fixed-on-minimum-scale-size-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче