| Summary: | axis in scroll-snap-type should be required | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | Scrolling | Assignee: | Martin Robinson <mrobinson> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | esprehn+autocc, ews-watchlist, fred.wang, glenn, gyuyoung.kim, macpherson, majidvp, menard, mrobinson, simon.fraser, webkit-bug-importer, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WebExposed | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2020-04-13 17:07:10 PDT
Actually we do parse it:
auto firstValue = consumeIdent<CSSValueX, CSSValueY, CSSValueBlock, CSSValueInline, CSSValueBoth>(range);
if (firstValue)
secondValue = consumeIdent<CSSValueProximity, CSSValueMandatory>(range);
else
firstValue = consumeIdent<CSSValueNone, CSSValueProximity, CSSValueMandatory>(range);
but we treat the axis optional, when it should be required.
Created attachment 411435 [details]
Patch
*** Bug 187697 has been marked as a duplicate of this bug. *** Comment on attachment 411435 [details] Patch I'm concerned about web compat here. Does the snapping on https://music.apple.com still work? FWIW, apple music scroll snapping works in Chrome which requires the new syntax. Quick check on their home page showed they are using "scroll-snap-type: x mandatory". Unfortunately chrome css data stats (https://chromestatus.com/metrics/css/popularity) do not tell you much about the value. But we can use it to compare usage of attributes that exclusively belong to the old syntax vs the new syntax: [exclusively old] <= 0.000001% scroll-snap-points-{x,y}, scroll-snap-coordinates, scroll-snap-destinations [common in both] 2.090845% scroll-snap-types [exclusively new] 2.090845% scroll-snap-align This does suggest that old syntax is not being used much compared to the new one which could indicate that it is rare to have a single value that is not an axis as that is from old syntax and not valid in Chrome, Firefox, or Edge. None of this is hard data on compat but hopefully helps. scroll-snap-align usage should be 2.119231%
so
[exclusively old] <= 0.000001%
scroll-snap-points-{x,y}, scroll-snap-coordinates, scroll-snap-destinations
[common in both] 2.090845%
scroll-snap-type
[exclusively new] 2.119231%
scroll-snap-align
Committed r268665: <https://trac.webkit.org/changeset/268665> All reviewed patches have been landed. Closing bug and clearing flags on attachment 411435 [details]. |