зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1508177 - Expand the minimum scale height even if the expanded area doesn't contain any contents. r=botond
As a result of the expansion, position:fixed elements are attached to the expanded layout viewport. The expanded value is used behind a pref which is enabled by default on nightly initially, and the pref will be fliped in bug 1571599 on other channels. scrollbars-in-landscape-content.html still fails since the vertical overlay scrollbar doesn't appear since we are not yet using the expanded value during reflow to tell whether we need overlay scrollbars or not. This will be fixed by the next commit. Differential Revision: https://phabricator.services.mozilla.com/D40771 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
10f4aacd62
Коммит
a2a3c33989
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait"><head>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
</head>
|
||||
<body onload="scrollTo(450,0); document.documentElement.classList.remove('reftest-wait')">
|
||||
<div style="width: 9000px; height: 10px; background: white;"></div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html class="reftest-wait"
|
||||
reftest-async-scroll
|
||||
reftest-async-scroll-x="449" reftest-async-scroll-y="0"><head>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
</head>
|
||||
<!-- Doing scrollTo(1,0) is to activate the left arrow in the scrollbar
|
||||
for non-overlay scrollbar environments -->
|
||||
|
|
|
@ -5858,11 +5858,12 @@ void ScrollFrameHelper::UpdateMinimumScaleSize(
|
|||
mMinimumScaleSize = CSSSize::ToAppUnits(ScreenSize(displaySize) / minScale);
|
||||
|
||||
// Clamp the min-scale size so it's not taller than the content height.
|
||||
// TODO: Bug 1508177: We can drop this condition once after we shrink the
|
||||
// content even if no content area gets visible.
|
||||
mMinimumScaleSize =
|
||||
Min(mMinimumScaleSize,
|
||||
nsSize(aScrollableOverflow.XMost(), aScrollableOverflow.YMost()));
|
||||
// TODO: Bug 1571599: Drop this check.
|
||||
if (!StaticPrefs::layout_viewport_contains_no_contents_area()) {
|
||||
mMinimumScaleSize =
|
||||
Min(mMinimumScaleSize,
|
||||
nsSize(aScrollableOverflow.XMost(), aScrollableOverflow.YMost()));
|
||||
}
|
||||
|
||||
// Ensure the minimum-scale size is never smaller than the ICB size.
|
||||
// That could happen if a page has a meta viewport tag with large explicitly
|
||||
|
|
|
@ -13,6 +13,6 @@ needs-focus == select-required-multiple-invalid.html select-required-multiple-re
|
|||
needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html
|
||||
fuzzy(0-64,0-4) fuzzy-if(asyncPan&&layersGPUAccelerated,0-84,0-77) fuzzy-if(skiaContent,0-1,0-1000) needs-focus == select-required-multiple-valid-changed.html select-required-multiple-ref.html
|
||||
fuzzy-if(Android,0-9,0-1) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html
|
||||
fuzzy-if(skiaContent&&!Android,0-2,0-10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html
|
||||
fuzzy-if(skiaContent&&!Android,0-2,0-10) fuzzy-if(Android,0-9,0-1) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html
|
||||
fuzzy-if(skiaContent,0-2,0-10) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html
|
||||
fuzzy-if(skiaContent,0-2,0-5) needs-focus == select-novalidate.html select-required-ref.html
|
||||
|
|
|
@ -15,12 +15,12 @@ default-preferences pref(dom.meta-viewport.enabled,true) pref(apz.allow_zooming,
|
|||
== 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
|
||||
== position-fixed-on-half-height-content.html position-fixed-on-half-height-content-ref.html
|
||||
fails == position-fixed-on-landscape-content.html position-fixed-on-half-height-content-ref.html
|
||||
fails == position-fixed-on-square-content.html position-fixed-on-square-content-ref.html
|
||||
fails == async-scroll-to-no-content-area.html async-scroll-to-no-content-area-ref.html
|
||||
fails == resolution-change-on-landscape-content.html resolution-change-on-landscape-content-ref.html
|
||||
pref(layout.viewport_contains_no_contents_area,true) == position-fixed-on-landscape-content.html position-fixed-on-half-height-content-ref.html
|
||||
pref(layout.viewport_contains_no_contents_area,true) == position-fixed-on-square-content.html position-fixed-on-square-content-ref.html
|
||||
pref(layout.viewport_contains_no_contents_area,true) fails-if(webrender) == async-scroll-to-no-content-area.html async-scroll-to-no-content-area-ref.html # bug 1571623 to track down the failure on WebRender
|
||||
pref(layout.viewport_contains_no_contents_area,true) == resolution-change-on-landscape-content.html resolution-change-on-landscape-content-ref.html
|
||||
== scrollbars-in-half-height-content.html scrollbars-in-half-height-content-ref.html
|
||||
fails-if(usesOverlayScrollbars) == scrollbars-in-landscape-content.html scrollbars-in-landscape-content-ref.html
|
||||
pref(layout.viewport_contains_no_contents_area,true) fails-if(usesOverlayScrollbars) == scrollbars-in-landscape-content.html scrollbars-in-landscape-content-ref.html
|
||||
|
||||
skip-if(!Android) fails-if(geckoview&&webrender) == position-fixed-on-minimum-scale-size.html position-fixed-on-minimum-scale-size-ref.html
|
||||
== position-fixed-out-of-view.html about:blank
|
||||
|
@ -28,13 +28,13 @@ skip-if(!Android) fails-if(geckoview&&webrender) == position-fixed-on-minimum-sc
|
|||
== overflow-region.html overflow-region-ref.html
|
||||
== overflow-hidden-region.html overflow-region-ref.html
|
||||
== overflow-hidden-region-with-negative-left-positioned-element.html overflow-region-ref.html
|
||||
fails == horizontal-overflow-hidden-region.html horizontal-overflow-hidden-region-ref.html # bug 1508177
|
||||
pref(layout.viewport_contains_no_contents_area,true) == horizontal-overflow-hidden-region.html horizontal-overflow-hidden-region-ref.html
|
||||
== vertical-overflow-hidden-region.html about:blank
|
||||
== scroll-to-unreachable-area.html scroll-to-unreachable-area-ref.html
|
||||
== wrapped-text-at-icb.html wrapped-text-at-icb-ref.html
|
||||
== overflow-hidden-region-dynamic-width-change.html overflow-region-ref.html
|
||||
== remove-overflow-hidden-region.html remove-overflow-hidden-region-ref.html
|
||||
fails == dynamic-grow-width.html horizontal-overflow-hidden-region-ref.html # bug 1508177
|
||||
pref(layout.viewport_contains_no_contents_area,true) == dynamic-grow-width.html horizontal-overflow-hidden-region-ref.html
|
||||
== dynamic-grow-width-and-height.html overflow-region-ref.html
|
||||
== not-able-to-scrollTo.html about:blank
|
||||
== min-scale-aspect-ratio.html about:blank
|
||||
|
|
|
@ -4620,6 +4620,13 @@
|
|||
value: 2
|
||||
mirror: always
|
||||
|
||||
# Whether we expand the layout viewport even if the expanded viewport doesn't
|
||||
# contain any contents in the area.
|
||||
- name: layout.viewport_contains_no_contents_area
|
||||
type: bool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "media."
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче