New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 854379 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 497851



Sign in to add a comment

[css-scroll-snap] Change parsing order for scroll-snap-align to block/inline

Project Member Reported by majidvp@chromium.org, Jun 19 2018

Issue description

Previously spec order was inline/block but it should change to be consistent with all other properties.


See: https://github.com/w3c/csswg-drafts/issues/2232

This should happen before we ship scroll-snap (e.g. before M69).
 
Labels: Hotlist-Interop
Note that Safari is already shipping the unprefixed version with the original order. So we need to coordinate this fix with them to avoid interop pain.


I ran a query against httparchive database. My query is below if anyone wants to replicate [1]

Only 4 were using the scroll-snap-align with two arguments. This is out of 450k pages so usage and breakage is very low AFAICT.
This gives me more confidence to make the switch. We should ensure Safari is willing to make the switch to avoid interop issues.

  

Here is the result:


bodies_page                  | 	match                           | bodies_url		
-----------------------------------------------------------------------------------
http://www.scrimba.com/	     | scroll-snap-align:center none;	| https://scrimba.com/assets/cached-client-fab8900c04b0f8f240d73f6c6a561770.css		
http://www.participate.com/  | scroll-snap-align: 0 50px;	| https://www.participate.com/webpack/style-fe837b4781471be76fc4b0b20871f197.css		
http://www.zikinf.com/	     | scroll-snap-align:center none;	| https://www.zikinf.com//_css/default/wk/annonces.1513606238.css		
http://www.chuzefitness.com/ | scroll-snap-align: none start;	| https://chuzefitness.com/wp-content/themes/chuze-reflex/css/theme.css?ver=1.5.5		


Note that one of the cases is actually using it incorrectly.


[1] BigQuery query:

SELECT bodies.page, REGEXP_EXTRACT(bodies.body, r'(scroll-snap-align:\s*\w+?\s+\w+?\s*;)') as match, bodies.url, 
  FROM [httparchive:har.2018_02_01_chrome_requests_bodies]
  AS bodies
JOIN (
  SELECT 
    page, url,
    JSON_EXTRACT(payload, '$._contentType') AS contentType
  FROM [httparchive:har.2018_02_01_chrome_requests]
) AS requests ON requests.url=bodies.url AND requests.page=bodies.page
WHERE (requests.contentType CONTAINS 'html' OR requests.contentType CONTAINS 'css')
AND REGEXP_MATCH(body, r'(scroll-snap-align:\s*\w+?\s+\w+?\s*;)')
LIMIT 10000

 
Cc: -sunyunjia@chromium.org majidvp@chromium.org
Owner: sunyunjia@chromium.org
Assigning to sunyunjia@.

We should perhaps start a patch and wait a bit longer to see if we hear anything from Safari before landing it.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e8752abd19b5ec6359e654cf8229c3a22720b1e

commit 6e8752abd19b5ec6359e654cf8229c3a22720b1e
Author: Sandra Sun <sunyunjia@chromium.org>
Date: Thu Jul 05 23:55:06 2018

Change parsing order for scroll-snap-align to block/inline.

As in the newest spec[1], the parsing order for scroll-snap-align is
changed to block/inline.

[1] https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

Bug:  854379 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I70d2e9d526ffa0564e260faacdb5f79857a69324
Reviewed-on: https://chromium-review.googlesource.com/1115701
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572869}
[modify] https://crrev.com/6e8752abd19b5ec6359e654cf8229c3a22720b1e/third_party/WebKit/LayoutTests/external/wpt/css/css-scroll-snap/snap-inline-block.html
[modify] https://crrev.com/6e8752abd19b5ec6359e654cf8229c3a22720b1e/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc

Status: Fixed (was: Assigned)

Sign in to add a comment