Bug 205059 - Scroll Behavior: In quirk mode, the scroll-behavior value of <body> is from <html>
Summary: Scroll Behavior: In quirk mode, the scroll-behavior value of <body> is from <...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 188043
  Show dependency treegraph
 
Reported: 2019-12-10 05:58 PST by cathiechen
Modified: 2021-12-16 00:45 PST (History)
4 users (show)

See Also:


Attachments
scroll-behavior.html (390 bytes, text/html)
2021-12-16 00:21 PST, cathiechen
no flags Details
scroll-behavior.html (483 bytes, text/html)
2021-12-16 00:34 PST, cathiechen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description cathiechen 2019-12-10 05:58:59 PST
In quirk mode, to perform a window scroll, the document()->scrollingElement() is <body>, while the scroll-behavior value is from <html>.

See: https://github.com/w3c/csswg-drafts/issues/2977
Comment 1 Radar WebKit Bug Importer 2021-10-10 13:11:03 PDT
<rdar://problem/84078714>
Comment 2 Simon Fraser (smfr) 2021-12-15 16:37:52 PST
Cathie, could you clarify the bug here?

From my testing, we correctly use the value of `scroll-behavior` from the <html> element in non-quirks mode, and correctly do not propagate the value from the body.

In quirks mode, we also don't allow the value of `scroll-behavior` on the body to affect window or scrollingElement scrolls, but are you saying that we should?
Comment 3 Simon Fraser (smfr) 2021-12-15 16:38:10 PST
A testcase showing the bug would be useful.
Comment 4 cathiechen 2021-12-16 00:21:34 PST
Created attachment 447333 [details]
scroll-behavior.html
Comment 5 cathiechen 2021-12-16 00:34:38 PST
Created attachment 447334 [details]
scroll-behavior.html
Comment 6 cathiechen 2021-12-16 00:45:07 PST
Hi Simon,

Just uploaded a test case.

I mean, `document.scrollingElement` is `<body>` element, but it takes `<html>` value instead, it seems a little weird.
We had an issue to discuss this in github. https://github.com/w3c/csswg-drafts/issues/2977