Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit f49b5f7

Browse files
emiliomoz-wptsync-bot
authored andcommitted
Make nsPresContext's overflow propagation match the spec.
From https://drafts.csswg.org/css-overflow/#overflow-propagation: > UAs must apply the overflow-* values set on the root element to the viewport. > However, when the root element is an [HTML] html element (including XML syntax > for HTML) whose overflow value is visible (in both axes), and that element has > a body element as a child, user agents must instead apply the overflow-* > values of the first such child element to the viewport. The element from which > the value is propagated must then have a used overflow value of visible. This was out of sync with Document::IsScrollingElement, which implements the right thing. Differential Revision: https://phabricator.services.mozilla.com/D49196 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1586600 gecko-commit: a1dfda2720234ceff5e27a8a9548201aec1e2c94 gecko-integration-branch: autoland gecko-reviewers: hiro
1 parent 8e1304a commit f49b5f7

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<title>CSS Overflow Test: overscroll-behavior doesn't stop overflow from being propagated from the body</title>
3+
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:[email protected]">
4+
<link rel="author" title="Mozilla" href="https://mozilla.org">
5+
<link rel="help" href="https://drafts.csswg.org/css-overflow/#overflow-propagation">
6+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1586600">
7+
<link rel="match" href="reference/overflow-body-propagation-ref.html">
8+
<style>
9+
:root {
10+
overscroll-behavior-y: contain;
11+
}
12+
body {
13+
overflow: scroll;
14+
margin-top: 100px;
15+
}
16+
</style>
17+
<body>The viewport should have scrollbars, not the body.</body>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<title>CSS Overflow Test: scroll-snap-type doesn't stop overflow from being propagated from the body</title>
3+
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:[email protected]">
4+
<link rel="author" title="Mozilla" href="https://mozilla.org">
5+
<link rel="help" href="https://drafts.csswg.org/css-overflow/#overflow-propagation">
6+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1586600">
7+
<link rel="match" href="reference/overflow-body-propagation-ref.html">
8+
<style>
9+
:root {
10+
scroll-snap-type: both mandatory;
11+
}
12+
body {
13+
overflow: scroll;
14+
margin-top: 100px;
15+
}
16+
</style>
17+
<body>The viewport should have scrollbars, not the body.</body>

0 commit comments

Comments
 (0)