-
Notifications
You must be signed in to change notification settings - Fork 719
[css-overflow] Overflow propagation when the element propagated from is display: none #3779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Basically, my point is that this should be closer to the background style propagation, which only happens if the document element is actually displayed. |
I think from an author standpoint this case doesn't matter, so personally I don't care. Happy to do whatever is expedient for implementers. |
Fine for us from an implementation pov. |
Chrome even propagates the background, which is not according to spec. |
For backgrounds: https://bugs.chromium.org/p/chromium/issues/detail?id=947873 |
There is the same issue for https://drafts.csswg.org/css-writing-modes-3/#principal-flow Chrome starts with the horizontal scrollbar to the right for direction:rtl regardless of display:none or not on body below.
|
…. r=dholbert This switches nsFrameSetFrame's hacky frame construction codepath to operate on the flattened tree, since it made me a bit more comfortable about it (all layout should operate on is the flattened tree, though in this cause this should not cause any web-observable behavior change, since
…. r=dholbert This switches nsFrameSetFrame's hacky frame construction codepath to operate on the flattened tree, since it made me a bit more comfortable about it (all layout should operate on is the flattened tree, though in this cause this should not cause any web-observable behavior change, since
The CSS Working Group just discussed
The full IRC log of that discussion |
When documentElement/body doe not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035
When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035
When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035
When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834}
When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834}
When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834}
…pagation., a=testonly Automatic update from web-platform-tests Handle display:contents for viewport propagation. When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834} -- wpt-commits: d40f18ae072cab633cfb34fb883e12c87c1bc191 wpt-pr: 18039
…pagation., a=testonly Automatic update from web-platform-tests Handle display:contents for viewport propagation. When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834} -- wpt-commits: d40f18ae072cab633cfb34fb883e12c87c1bc191 wpt-pr: 18039
…isplay: contents elements. r=dholbert Resolution is at: * w3c/csswg-drafts#3779 (comment) Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974, I'll make sure to wait until they're in the tree and ensure they're passing. Note that we need to ensure in the frame constructor that the document element is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves duplicated work (since ResolveStyleLazily throws away the style). ResolveStyleLazily already returns out of date styles, unless the element is not styled yet, or is in a `display: none` subtree, in which case it computes and returns a new (up-to-date) style. So the switch to the FFI call only should change behavior for the display: none subtree case (since we ensure the unstyled case isn't hit by styling the document earlier). But that case is one of the cases we're interested in changing, conveniently. Depends on D40080 Differential Revision: https://phabricator.services.mozilla.com/D39204 --HG-- extra : moz-landing-system : lando
…isplay: contents elements. r=dholbert Resolution is at: * w3c/csswg-drafts#3779 (comment) Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974, I'll make sure to wait until they're in the tree and ensure they're passing. Note that we need to ensure in the frame constructor that the document element is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves duplicated work (since ResolveStyleLazily throws away the style). ResolveStyleLazily already returns out of date styles, unless the element is not styled yet, or is in a `display: none` subtree, in which case it computes and returns a new (up-to-date) style. So the switch to the FFI call only should change behavior for the display: none subtree case (since we ensure the unstyled case isn't hit by styling the document earlier). But that case is one of the cases we're interested in changing, conveniently. Depends on D40080 Differential Revision: https://phabricator.services.mozilla.com/D39204
When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834}
…. r=dholbert This switches nsFrameSetFrame's hacky frame construction codepath to operate on the flattened tree, since it made me a bit more comfortable about it (all layout should operate on is the flattened tree, though in this cause this should not cause any web-observable behavior change, since
…. r=dholbert This switches nsFrameSetFrame's hacky frame construction codepath to operate on the flattened tree, since it made me a bit more comfortable about it (all layout should operate on is the flattened tree, though in this cause this should not cause any web-observable behavior change, since
…pagation., a=testonly Automatic update from web-platform-tests Handle display:contents for viewport propagation. When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master{#680834} -- wpt-commits: d40f18ae072cab633cfb34fb883e12c87c1bc191 wpt-pr: 18039 UltraBlame original commit: b0a2ce5298cfff788febf0b952db102419a4753b
…isplay: contents elements. r=dholbert Resolution is at: * w3c/csswg-drafts#3779 (comment) Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974, I'll make sure to wait until they're in the tree and ensure they're passing. Note that we need to ensure in the frame constructor that the document element is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves duplicated work (since ResolveStyleLazily throws away the style). ResolveStyleLazily already returns out of date styles, unless the element is not styled yet, or is in a `display: none` subtree, in which case it computes and returns a new (up-to-date) style. So the switch to the FFI call only should change behavior for the display: none subtree case (since we ensure the unstyled case isn't hit by styling the document earlier). But that case is one of the cases we're interested in changing, conveniently. Depends on D40080 Differential Revision: https://phabricator.services.mozilla.com/D39204 UltraBlame original commit: 400b06aac33e27a53b1ff0da585cd57035661d4c
…. r=dholbert This switches nsFrameSetFrame's hacky frame construction codepath to operate on the flattened tree, since it made me a bit more comfortable about it (all layout should operate on is the flattened tree, though in this cause this should not cause any web-observable behavior change, since
…pagation., a=testonly Automatic update from web-platform-tests Handle display:contents for viewport propagation. When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master{#680834} -- wpt-commits: d40f18ae072cab633cfb34fb883e12c87c1bc191 wpt-pr: 18039 UltraBlame original commit: b0a2ce5298cfff788febf0b952db102419a4753b
…pagation., a=testonly Automatic update from web-platform-tests Handle display:contents for viewport propagation. When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master{#680834} -- wpt-commits: d40f18ae072cab633cfb34fb883e12c87c1bc191 wpt-pr: 18039 UltraBlame original commit: b0a2ce5298cfff788febf0b952db102419a4753b
…isplay: contents elements. r=dholbert Resolution is at: * w3c/csswg-drafts#3779 (comment) Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974, I'll make sure to wait until they're in the tree and ensure they're passing. Note that we need to ensure in the frame constructor that the document element is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves duplicated work (since ResolveStyleLazily throws away the style). ResolveStyleLazily already returns out of date styles, unless the element is not styled yet, or is in a `display: none` subtree, in which case it computes and returns a new (up-to-date) style. So the switch to the FFI call only should change behavior for the display: none subtree case (since we ensure the unstyled case isn't hit by styling the document earlier). But that case is one of the cases we're interested in changing, conveniently. Depends on D40080 Differential Revision: https://phabricator.services.mozilla.com/D39204 UltraBlame original commit: 400b06aac33e27a53b1ff0da585cd57035661d4c
…isplay: contents elements. r=dholbert Resolution is at: * w3c/csswg-drafts#3779 (comment) Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974, I'll make sure to wait until they're in the tree and ensure they're passing. Note that we need to ensure in the frame constructor that the document element is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves duplicated work (since ResolveStyleLazily throws away the style). ResolveStyleLazily already returns out of date styles, unless the element is not styled yet, or is in a `display: none` subtree, in which case it computes and returns a new (up-to-date) style. So the switch to the FFI call only should change behavior for the display: none subtree case (since we ensure the unstyled case isn't hit by styling the document earlier). But that case is one of the cases we're interested in changing, conveniently. Depends on D40080 Differential Revision: https://phabricator.services.mozilla.com/D39204 UltraBlame original commit: 400b06aac33e27a53b1ff0da585cd57035661d4c
…e from 'display: none' elements. Do propagate from 'display: contents' elements. #3779
…. r=dholbert This switches nsFrameSetFrame's hacky frame construction codepath to operate on the flattened tree, since it made me a bit more comfortable about it (all layout should operate on is the flattened tree, though in this cause this should not cause any web-observable behavior change, since
…pagation., a=testonly Automatic update from web-platform-tests Handle display:contents for viewport propagation. When documentElement/body does not generate a box, its background will not propagate to the viewport (see [1]). This removes the need for calling EnsureComputedStyle() on documentElement/body. The CSSWG has also resolved that to be the case also for other properties propagated to the viewport[2]. Some of the wpt tests for body propagation didn't actually have a body element. Added. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds [2] w3c/csswg-drafts#3779 (comment) Bug: 987207 Change-Id: I06e618e2acd2926b5ae4831bf5825e13e970d035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547974 Commit-Queue: Rune LillesveenReviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/master@{#680834} -- wpt-commits: d40f18ae072cab633cfb34fb883e12c87c1bc191 wpt-pr: 18039
…isplay: contents elements. r=dholbert Resolution is at: * w3c/csswg-drafts#3779 (comment) Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974, I'll make sure to wait until they're in the tree and ensure they're passing. Note that we need to ensure in the frame constructor that the document element is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves duplicated work (since ResolveStyleLazily throws away the style). ResolveStyleLazily already returns out of date styles, unless the element is not styled yet, or is in a `display: none` subtree, in which case it computes and returns a new (up-to-date) style. So the switch to the FFI call only should change behavior for the display: none subtree case (since we ensure the unstyled case isn't hit by styling the document earlier). But that case is one of the cases we're interested in changing, conveniently. Depends on D40080 Differential Revision: https://phabricator.services.mozilla.com/D39204
Uh oh!
There was an error while loading. Please reload this page.
https://drafts.csswg.org/css-overflow/#overflow-propagation says that some overflow properties should be propagated to the viewport from the html or body element:
However this happens regardless of the display value of the document element or the body. For example, the following examples show scrollbars:
data:text/html,
data:text/html,
This is the only case where Gecko needs to resolve a style in a
display: none
subtree for rendering (apart of getComputedStyle), and I find it somewhat silly.Seems enough of an edge-case that could probably be changed. I wonder if there would be interest from other vendors in doing this change?
cc @lilles
The text was updated successfully, but these errors were encountered: