Closed Bug 1567519 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 17936 - [scroll-snap] Fix viewport style propagation

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 17936 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/17936
Details from upstream follow.

Majid Valipour <majidvp@chromium.org> wrote:

[scroll-snap] Fix viewport style propagation

Previously we propagated scroll snap properties [1] from viewport
defining element's style to the viewport. However this is not spec
compliant [1] and more importantly our behavior is different from
Gecko.

This patch fixes this issue by having these properties propagate
from document.documentElement instead.

TODO: better understand the backward compat impact.
Note that this can cause previously snapping viewport to no longer snap
if the web developer has declared the snap type on body as opposed to
document and body is viewport defining element

[1] scroll-snap-type, scroll-padding
[2] https://github.com/w3c/csswg-drafts/issues/3740

BUG= 952711
TEST= wpt/css/css-scroll-snap/scroll-snap-type-on-root-element.html

Change-Id: I2d84095decb3af52f6a99c52a5a1a8d5c92fcf62
Reviewed-on: https://chromium-review.googlesource.com/1704859
WPT-Export-Revision: 7ae0d41319fe18a2e2e37e2cf910c2250dd392ca

PR 17936 applied with additional changes from upstream: e639e4acb2728c76acc5c9cebcf09b256f211984
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.