RESOLVED FIXED 142552
scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
https://bugs.webkit.org/show_bug.cgi?id=142552
Summary scroll-snap-destination and scroll-snap-coordinate do not seem to work togeth...
Brent Fulgham
Reported 2015-03-10 17:24:56 PDT
Created attachment 248372 [details] Example (manual) failing test case The "scroll-snap-destination" property is used to specify a location in the scrolling container's viewport that should be used for snapping. The "scroll-snap-coordinate" property is used to specify the coordinate in each of the child elements to align with the "scroll-snap-destination" location. This does not seem to work properly at present.
Attachments
Example (manual) failing test case (3.73 KB, text/html)
2015-03-10 17:24 PDT, Brent Fulgham
no flags
Patch (6.97 KB, patch)
2015-03-22 19:13 PDT, Brent Fulgham
dino: review+
Radar WebKit Bug Importer
Comment 1 2015-03-10 17:25:55 PDT
Brent Fulgham
Comment 2 2015-03-22 19:13:33 PDT
Brent Fulgham
Comment 3 2015-03-22 19:20:05 PDT
There were the following problems: 1. During testing I encountered at least one case where the CSSParser handed me a scroll-snap-destination with more than two components. I am no longer able to reproduce this, but I have added an assertion to try to catch this in the future. 2. We were not always putting a '0' offset snap point, which prevented us from snap scrolling to the beginning of the scroll container. This had the effect of creating a weird "drift" effect where WebKit tried to pull you away from the left edge of content towards the first snap point. 3. When using scroll-snap-destination/scroll-snap-coordinate markup, we were not generate per-element snap offsets to use as the basis for the "-destination" and "-coordinate" values to adjust.
Dean Jackson
Comment 4 2015-03-23 09:54:36 PDT
Comment on attachment 249215 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249215&action=review > Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp:103 > + // Only add zero at the beginning Nit: Missing full stop.
Brent Fulgham
Comment 5 2015-03-23 09:57:43 PDT
Simon Fraser (smfr)
Comment 6 2015-03-25 21:13:54 PDT
Comment on attachment 249215 [details] Patch Why no tests?
Note You need to log in before you can comment on or make changes to this bug.