Add CSS properties needed for scroll snap points
The code was partially ported over from webkit implementation
but it had to be considerably rewritten to fit blink's
CSS parsing.
- scroll-snap-type: primitive
- scroll-snap-coordinate: <position>#
- scroll-snap-destination: <position>
- scroll-snap-points-x: repeat(<length>)
- scroll-snap-points-y: repeat(<length>)
Spec link: http://dev.w3.org/csswg/css-snappoints/#property-index
BUG=311234
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196586
4 years, 11 months ago
(2015-05-27 17:48:11 UTC)
#5
https://codereview.chromium.org/1148873005/diff/120001/LayoutTests/fast/css/s...
File LayoutTests/fast/css/scroll-snap-parsing.html (right):
https://codereview.chromium.org/1148873005/diff/120001/LayoutTests/fast/css/s...
LayoutTests/fast/css/scroll-snap-parsing.html:38: <div class="test"
property="scroll-snap-destination" style="scroll-snap-destination: 0 10px;"
expected="0px 10px" desc="unitless/pixel destination" ></div>
On 2015/05/27 00:54:03, Timothy Loh wrote:
> On 2015/05/26 19:25:07, majidvp wrote:
> > I didn't add tests here to cover other length units such as in/em/pt etc. I
> > imagine various units conversions should be covered elsewhere so it would
not
> > make much sense here. timloh@ wdyt?
>
> Should be fine to just test one or two unit types. Maybe a good idea to test
> calc with px and % where they're both accepted, e.g. calc(10px + 20%).
I didn't know about calc(). What is expected to be the computed value
(getComputedStyle) for a calc? Is it the raw value or should it be the converted
value? I used calc with both 'width' and 'background-position' and the
getComputedStyle was different for each case. See
http://output.jsbin.com/bobubu/1https://codereview.chromium.org/1148873005/diff/120001/Source/core/style/Styl...
File Source/core/style/StyleScrollSnapData.h (right):
https://codereview.chromium.org/1148873005/diff/120001/Source/core/style/Styl...
Source/core/style/StyleScrollSnapData.h:1: /*
On 2015/05/27 00:54:04, Timothy Loh wrote:
> Here and the other file:
>
> https://www.chromium.org/blink/coding-style#TOC-License
I ported this file from WebKit though it is modified to fit blink. This is why I
kept the copyright notice as is.
https://codereview.chromium.org/1148873005/diff/140001/Source/core/css/CSSProperties.in File Source/core/css/CSSProperties.in (right): https://codereview.chromium.org/1148873005/diff/140001/Source/core/css/CSSProperties.in#newcode391 Source/core/css/CSSProperties.in:391: scroll-snap-type runtime_flag=CSSScrollSnapPoints, type_name=ScrollSnapType Can we keep the list of ...
4 years, 11 months ago
(2015-06-04 03:58:27 UTC)
#9
lgtm https://codereview.chromium.org/1148873005/diff/160001/Source/core/css/parser/CSSPropertyParser.cpp File Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1148873005/diff/160001/Source/core/css/parser/CSSPropertyParser.cpp#newcode5622 Source/core/css/parser/CSSPropertyParser.cpp:5622: // a non or end of the list ...
4 years, 11 months ago
(2015-06-05 01:16:12 UTC)
#11
Issue 1148873005: Parsing CSS properties for scroll snap points
(Closed)
Created 4 years, 11 months ago by majidvp
Modified 4 years, 11 months ago
Reviewers: Timothy Loh, Ian Vollick
Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Comments: 38