<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181352] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181352">181352</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-03-10 16:19:38 -0700 (Tue, 10 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
https://bugs.webkit.org/show_bug.cgi?id=142411

Reviewed by Simon Fraser.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-position-values.html.

Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
and 'left', 'right', and 'center' for the X axis.

Correct implementation to support calculated values for Scroll Snap Point markup. This required the
Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
to a regular CSSValue.

Add tests that these position labels, as well as combinations with percentages and pixel offsets
are parsed properly.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
when working with Length values. This is necessary to allow calculated results to be based on the proper default
page dimensions.
(WebCore::scrollSnapPoints): Ditto.
(WebCore::scrollSnapCoordinates): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
positions.
(WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
(WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
(WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
(WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
(WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
(WebCore::CSSParser::parseTransformOrigin): Ditto.
(WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
* css/CSSParser.h:
* css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
repeat values as calculations.

LayoutTests:

Add a test for &lt;position&gt; types in scroll snap operations. Also update the test expectations
for computed styles now that double-precision math is being used for calculated values.

* css3/scroll-snap/scroll-snap-position-values-expected.txt: Added.
* css3/scroll-snap/scroll-snap-position-values.html: Added.
* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Updated
* css3/scroll-snap/scroll-snap-property-computed-style.js: Updated</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3scrollsnapscrollsnappropertycomputedstyleexpectedtxt">trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3scrollsnapscrollsnappropertycomputedstylejs">trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssLengthRepeath">trunk/Source/WebCore/css/LengthRepeat.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3scrollsnapscrollsnappositionvaluesexpectedtxt">trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3scrollsnapscrollsnappositionvalueshtml">trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/LayoutTests/ChangeLog        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-03-10  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
+        https://bugs.webkit.org/show_bug.cgi?id=142411
+
+        Reviewed by Simon Fraser.
+
+        Add a test for &lt;position&gt; types in scroll snap operations. Also update the test expectations
+        for computed styles now that double-precision math is being used for calculated values.
+
+        * css3/scroll-snap/scroll-snap-position-values-expected.txt: Added.
+        * css3/scroll-snap/scroll-snap-position-values.html: Added.
+        * css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Updated
+        * css3/scroll-snap/scroll-snap-property-computed-style.js: Updated
+
+
</ins><span class="cx"> 2015-03-10  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for more emoji with variation.
</span></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnappositionvaluesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values-expected.txt (0 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values-expected.txt        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+Tests 'initial' on scroll snap properties.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS noInitial.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-type') is &quot;mandatory&quot;
+PASS noInitial.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(100%)&quot;
+PASS noInitial.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(100%)&quot;
+PASS noInitial.style['-webkit-scroll-snap-destination'] is &quot;100% 100%&quot;
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-destination') is &quot;100% 100%&quot;
+PASS noInitial.style['-webkit-scroll-snap-coordinate'] is &quot;0% 0%&quot;
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;0% 0%&quot;
+PASS initialType.style['-webkit-scroll-snap-type'] is &quot;initial&quot;
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-type') is &quot;none&quot;
+PASS initialType.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(100%)&quot;
+PASS initialType.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(100%)&quot;
+PASS initialType.style['-webkit-scroll-snap-destination'] is &quot;0% 0%&quot;
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-destination') is &quot;0% 0%&quot;
+PASS initialType.style['-webkit-scroll-snap-coordinate'] is &quot;100% 100%&quot;
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;100% 100%&quot;
+PASS initialXPoints.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-type') is &quot;mandatory&quot;
+PASS initialXPoints.style['-webkit-scroll-snap-points-x'] is &quot;initial&quot;
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;none&quot;
+PASS initialXPoints.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(100%)&quot;
+PASS initialXPoints.style['-webkit-scroll-snap-destination'] is &quot;50% 50%&quot;
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-destination') is &quot;50% 50%&quot;
+PASS initialXPoints.style['-webkit-scroll-snap-coordinate'] is &quot;50% 50%&quot;
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;50% 50%&quot;
+PASS initialYPoints.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-type') is &quot;mandatory&quot;
+PASS initialYPoints.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(100%)&quot;
+PASS initialYPoints.style['-webkit-scroll-snap-points-y'] is &quot;initial&quot;
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;none&quot;
+PASS initialYPoints.style['-webkit-scroll-snap-destination'] is &quot;50% 20px&quot;
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-destination') is &quot;50% 20px&quot;
+PASS initialYPoints.style['-webkit-scroll-snap-coordinate'] is &quot;50% 50%&quot;
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;50% 50%&quot;
+PASS initialDestination.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-type') is &quot;proximity&quot;
+PASS initialDestination.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(100%)&quot;
+PASS initialDestination.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(100%)&quot;
+PASS initialDestination.style['-webkit-scroll-snap-destination'] is &quot;initial&quot;
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-destination') is &quot;0px 0px&quot;
+PASS initialDestination.style['-webkit-scroll-snap-coordinate'] is &quot;&quot;
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;none&quot;
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-type') is &quot;mandatory&quot;
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(100%)&quot;
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(100%)&quot;
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-destination'] is &quot;&quot;
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-destination') is &quot;0px 0px&quot;
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-coordinate'] is &quot;initial&quot;
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;none&quot;
+PASS allInitial.style['-webkit-scroll-snap-type'] is &quot;initial&quot;
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-type') is &quot;none&quot;
+PASS allInitial.style['-webkit-scroll-snap-points-x'] is &quot;initial&quot;
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;none&quot;
+PASS allInitial.style['-webkit-scroll-snap-points-y'] is &quot;initial&quot;
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;none&quot;
+PASS allInitial.style['-webkit-scroll-snap-destination'] is &quot;initial&quot;
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-destination') is &quot;0px 0px&quot;
+PASS allInitial.style['-webkit-scroll-snap-coordinate'] is &quot;initial&quot;
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;none&quot;
+PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-type') is &quot;mandatory&quot;
+PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(100%)&quot;
+PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(100%)&quot;
+PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-destination'] is &quot;&quot;
+PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-destination') is &quot;0px 0px&quot;
+PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-coordinate'] is &quot;&quot;
+PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;none&quot;
+PASS calculatedCoordinateAndDestination.style['-webkit-scroll-snap-type'] is &quot;&quot;
+PASS window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-type') is &quot;mandatory&quot;
+PASS calculatedCoordinateAndDestination.style['-webkit-scroll-snap-points-x'] is &quot;&quot;
+PASS window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-x') is &quot;repeat(96%)&quot;
+PASS calculatedCoordinateAndDestination.style['-webkit-scroll-snap-points-y'] is &quot;&quot;
+PASS window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-y') is &quot;repeat(52%)&quot;
+PASS calculatedCoordinateAndDestination.style['-webkit-scroll-snap-destination'] is &quot;&quot;
+PASS window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-destination') is &quot;106px 25px&quot;
+PASS calculatedCoordinateAndDestination.style['-webkit-scroll-snap-coordinate'] is &quot;&quot;
+PASS window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-coordinate') is &quot;16px 384px&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnappositionvalueshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values.html (0 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values.html                                (rev 0)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-position-values.html        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -0,0 +1,310 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;style&gt;
+            .horizontalGallery {
+                width: 400px;
+                height: 50px;
+                overflow-y: hidden;
+                overflow-x: auto;
+            }
+            .horizontalGalleryDrawer {
+                width: 3000px;
+                height: 50px;
+            }
+            .colorBox {
+                height: 50px;
+                width: 400px;
+                float: left;
+            }
+
+            .noInitial {
+                -webkit-scroll-snap-type: mandatory;
+                -webkit-scroll-snap-points-x: repeat(100%);
+                -webkit-scroll-snap-points-y: repeat(100%);
+                -webkit-scroll-snap-destination: right bottom;
+                -webkit-scroll-snap-coordinate: left top;
+            }
+
+            .initialType {
+                -webkit-scroll-snap-type: initial;
+                -webkit-scroll-snap-points-x: repeat(100%);
+                -webkit-scroll-snap-points-y: repeat(100%);
+                -webkit-scroll-snap-destination: left top;
+                -webkit-scroll-snap-coordinate: right bottom;
+            }
+
+            .initialXPoints {
+                -webkit-scroll-snap-type: mandatory;
+                -webkit-scroll-snap-points-x: initial;
+                -webkit-scroll-snap-points-y: repeat(100%);
+                -webkit-scroll-snap-destination: 50% center;
+                -webkit-scroll-snap-coordinate: center 50%;
+            }
+
+            .initialYPoints {
+                -webkit-scroll-snap-type: mandatory;
+                -webkit-scroll-snap-points-x: repeat(100%);
+                -webkit-scroll-snap-points-y: initial;
+                -webkit-scroll-snap-destination: center 20px;
+                -webkit-scroll-snap-coordinate: 50% center;
+            }
+
+            .initialDestination {
+                -webkit-scroll-snap-type: proximity;
+                -webkit-scroll-snap-points-x: repeat(100%);
+                -webkit-scroll-snap-points-y: repeat(100%);
+                -webkit-scroll-snap-destination: initial;
+                -webkit-scroll-snap-coordinate: none;
+            }
+
+            .initialSnapCoordinate {
+                -webkit-scroll-snap-type: mandatory;
+                -webkit-scroll-snap-points-x: repeat(100%);
+                -webkit-scroll-snap-points-y: repeat(100%);
+                -webkit-scroll-snap-destination: none;
+                -webkit-scroll-snap-coordinate: initial;
+            }
+
+            .noneSnapCoordinateAndDestination {
+                -webkit-scroll-snap-type: mandatory;
+                -webkit-scroll-snap-points-x: repeat(100%);
+                -webkit-scroll-snap-points-y: repeat(100%);
+                -webkit-scroll-snap-destination: none;
+                -webkit-scroll-snap-coordinate: none;
+            }
+
+            .allInitial {
+                -webkit-scroll-snap-type: initial;
+                -webkit-scroll-snap-points-x: initial;
+                -webkit-scroll-snap-points-y: initial;
+                -webkit-scroll-snap-destination: initial;
+                -webkit-scroll-snap-coordinate: initial
+            }
+
+            .calculatedCoordinateAndDestination {
+                -webkit-scroll-snap-type: mandatory;
+                -webkit-scroll-snap-points-x: repeat(-webkit-calc(100% - 4%));
+                -webkit-scroll-snap-points-y: repeat(-webkit-calc(20% + 32%));
+                -webkit-scroll-snap-destination: -webkit-calc(10px + 6em) -webkit-calc(22px + 3px);
+                -webkit-scroll-snap-coordinate: -webkit-calc(32px - 1em) -webkit-calc(19em + 5em);
+            }
+
+            #item0 { background-color: red; }
+            #item1 { background-color: green; }
+            #item2 { background-color: blue; }
+            #item3 { background-color: aqua; }
+            #item4 { background-color: yellow; }
+            #item5 { background-color: fuchsia; }
+        &lt;/style&gt;
+        &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;div style=&quot;width: 400px&quot;&gt;
+            &lt;div id=&quot;noInitial&quot; class=&quot;horizontalGallery noInitial&quot; style=&quot;-webkit-scroll-snap-destination: right bottom; -webkit-scroll-snap-coordinate: left top;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;initialType&quot; class=&quot;horizontalGallery initialType&quot; style=&quot;-webkit-scroll-snap-type: initial; -webkit-scroll-snap-destination: left top; -webkit-scroll-snap-coordinate: right bottom;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;initialXPoints&quot; class=&quot;horizontalGallery initialXPoints&quot; style=&quot;-webkit-scroll-snap-points-x: initial; -webkit-scroll-snap-destination: 50% center; -webkit-scroll-snap-coordinate: center 50%;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;initialYPoints&quot; class=&quot;horizontalGallery initialYPoints&quot; style=&quot;-webkit-scroll-snap-points-y: initial; -webkit-scroll-snap-destination: center 20px; -webkit-scroll-snap-coordinate: 50% center;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;initialDestination&quot; class=&quot;horizontalGallery initialDestination&quot; style=&quot;-webkit-scroll-snap-destination: initial; -webkit-scroll-snap-coordinate: none;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;initialSnapCoordinate&quot; class=&quot;horizontalGallery initialSnapCoordinate&quot; style=&quot;-webkit-scroll-snap-coordinate: initial; -webkit-scroll-snap-destination: none;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;noneSnapCoordinateAndDestination&quot; class=&quot;horizontalGallery noneSnapCoordinateAndDestination&quot; style=&quot;-webkit-scroll-snap-destination: none; -webkit-scroll-snap-coordinate: none;&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;allInitial&quot; class=&quot;horizontalGallery allInitial&quot; style=&quot;-webkit-scroll-snap-type: initial; -webkit-scroll-snap-points-x: initial; -webkit-scroll-snap-points-y: initial; -webkit-scroll-snap-destination: initial; -webkit-scroll-snap-coordinate: initial&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            &lt;div id=&quot;calculatedCoordinateAndDestination&quot; class=&quot;horizontalGallery calculatedCoordinateAndDestination&quot;&gt;
+                &lt;div class=&quot;horizontalGalleryDrawer&quot;&gt;
+                    &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                    &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+        &lt;/div&gt;
+        &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+        &lt;script&gt;
+        description(&quot;Tests 'initial' on scroll snap properties.&quot;);
+
+        var noInitial = document.getElementById('noInitial');
+        shouldBeEmptyString(&quot;noInitial.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;mandatory&quot;);
+        shouldBeEmptyString(&quot;noInitial.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;noInitial.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEqualToString(&quot;noInitial.style['-webkit-scroll-snap-destination']&quot;, &quot;100% 100%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;100% 100%&quot;);
+        shouldBeEqualToString(&quot;noInitial.style['-webkit-scroll-snap-coordinate']&quot;, &quot;0% 0%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;0% 0%&quot;);
+
+        var initialType = document.getElementById('initialType');
+        shouldBeEqualToString(&quot;initialType.style['-webkit-scroll-snap-type']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;none&quot;);
+        shouldBeEmptyString(&quot;initialType.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;initialType.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEqualToString(&quot;initialType.style['-webkit-scroll-snap-destination']&quot;, &quot;0% 0%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;0% 0%&quot;);
+        shouldBeEqualToString(&quot;initialType.style['-webkit-scroll-snap-coordinate']&quot;, &quot;100% 100%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;100% 100%&quot;);
+
+        var initialXPoints = document.getElementById('initialXPoints');
+        shouldBeEmptyString(&quot;initialXPoints.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;mandatory&quot;);
+        shouldBeEqualToString(&quot;initialXPoints.style['-webkit-scroll-snap-points-x']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;none&quot;);
+        shouldBeEmptyString(&quot;initialXPoints.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEqualToString(&quot;initialXPoints.style['-webkit-scroll-snap-destination']&quot;, &quot;50% 50%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;50% 50%&quot;);
+        shouldBeEqualToString(&quot;initialXPoints.style['-webkit-scroll-snap-coordinate']&quot;, &quot;50% 50%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;50% 50%&quot;);
+
+        var initialYPoints = document.getElementById('initialYPoints');
+        shouldBeEmptyString(&quot;initialYPoints.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;mandatory&quot;);
+        shouldBeEmptyString(&quot;initialYPoints.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEqualToString(&quot;initialYPoints.style['-webkit-scroll-snap-points-y']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;none&quot;);
+        shouldBeEqualToString(&quot;initialYPoints.style['-webkit-scroll-snap-destination']&quot;, &quot;50% 20px&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;50% 20px&quot;);
+        shouldBeEqualToString(&quot;initialYPoints.style['-webkit-scroll-snap-coordinate']&quot;, &quot;50% 50%&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;50% 50%&quot;);
+
+        var initialDestination = document.getElementById('initialDestination');
+        shouldBeEmptyString(&quot;initialDestination.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;proximity&quot;);
+        shouldBeEmptyString(&quot;initialDestination.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;initialDestination.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEqualToString(&quot;initialDestination.style['-webkit-scroll-snap-destination']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;0px 0px&quot;);
+        shouldBeEmptyString(&quot;initialDestination.style['-webkit-scroll-snap-coordinate']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;none&quot;);
+
+        var initialSnapCoordinate = document.getElementById('initialSnapCoordinate');
+        shouldBeEmptyString(&quot;initialSnapCoordinate.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;mandatory&quot;);
+        shouldBeEmptyString(&quot;initialSnapCoordinate.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;initialSnapCoordinate.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;initialSnapCoordinate.style['-webkit-scroll-snap-destination']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;0px 0px&quot;);
+        shouldBeEqualToString(&quot;initialSnapCoordinate.style['-webkit-scroll-snap-coordinate']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;none&quot;);
+
+        var allInitial = document.getElementById('allInitial');
+        shouldBeEqualToString(&quot;allInitial.style['-webkit-scroll-snap-type']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;none&quot;);
+        shouldBeEqualToString(&quot;allInitial.style['-webkit-scroll-snap-points-x']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;none&quot;);
+        shouldBeEqualToString(&quot;allInitial.style['-webkit-scroll-snap-points-y']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;none&quot;);
+        shouldBeEqualToString(&quot;allInitial.style['-webkit-scroll-snap-destination']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;0px 0px&quot;);
+        shouldBeEqualToString(&quot;allInitial.style['-webkit-scroll-snap-coordinate']&quot;, &quot;initial&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;none&quot;);
+
+        var noneSnapCoordinateAndDestination = document.getElementById('noneSnapCoordinateAndDestination');
+        shouldBeEmptyString(&quot;noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;mandatory&quot;);
+        shouldBeEmptyString(&quot;noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(100%)&quot;);
+        shouldBeEmptyString(&quot;noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-destination']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;0px 0px&quot;);
+        shouldBeEmptyString(&quot;noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-coordinate']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;none&quot;);
+
+        var calculatedCoordinateAndDestination = document.getElementById('calculatedCoordinateAndDestination');
+        shouldBeEmptyString(&quot;calculatedCoordinateAndDestination.style['-webkit-scroll-snap-type']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-type')&quot;, &quot;mandatory&quot;);
+        shouldBeEmptyString(&quot;calculatedCoordinateAndDestination.style['-webkit-scroll-snap-points-x']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-x')&quot;, &quot;repeat(96%)&quot;);
+        shouldBeEmptyString(&quot;calculatedCoordinateAndDestination.style['-webkit-scroll-snap-points-y']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-y')&quot;, &quot;repeat(52%)&quot;);
+        shouldBeEmptyString(&quot;calculatedCoordinateAndDestination.style['-webkit-scroll-snap-destination']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-destination')&quot;, &quot;106px 25px&quot;);
+        shouldBeEmptyString(&quot;calculatedCoordinateAndDestination.style['-webkit-scroll-snap-coordinate']&quot;);
+        shouldBeEqualToString(&quot;window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-coordinate')&quot;, &quot;16px 384px&quot;);
+        &lt;/script&gt;
+        &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnappropertycomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -155,19 +155,19 @@
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-coordinate') is '50% 100%, 150% 100%, 200% 100%'
</span><span class="cx"> 
</span><span class="cx"> mm along x axis with pixel repeat : 10mm repeat(42mm)
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '37.78125px repeat(158.734375px)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '37.7952766418457px repeat(158.7401580810547px)'
</ins><span class="cx"> 
</span><span class="cx"> in along x axis with pixel repeat : 10in repeat(4in)
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '960px repeat(384px)'
</span><span class="cx"> 
</span><span class="cx"> pt along x axis with pixel repeat : 10pt repeat(42pt)
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '13.328125px repeat(56px)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '13.333333015441895px repeat(56px)'
</ins><span class="cx"> 
</span><span class="cx"> in/cm destination : 2in 5cm
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-destination') is '192px 188.96875px'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-destination') is '192px 188.97637939453125px'
</ins><span class="cx"> 
</span><span class="cx"> in/cm coordinate : 2in 5cm 5in 2cm
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-coordinate') is '192px 188.96875px, 480px 75.578125px'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-coordinate') is '192px 188.97637939453125px, 480px 75.5905532836914px'
</ins><span class="cx"> 
</span><span class="cx"> subpixel along x axis with pixel repeat : 100.5px repeat(50.25px)
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '100.5px repeat(50.25px)'
</span></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnappropertycomputedstylejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -72,11 +72,11 @@
</span><span class="cx"> testComputedScrollSnapRule(&quot;multiple pixel coordinates&quot;, &quot;coordinate&quot;, &quot;50px 100px 150px 100px 200px 100px&quot;, &quot;50px 100px, 150px 100px, 200px 100px&quot;);
</span><span class="cx"> testComputedScrollSnapRule(&quot;multiple percentage coordinates&quot;, &quot;coordinate&quot;, &quot;50% 100% 150% 100% 200% 100%&quot;, &quot;50% 100%, 150% 100%, 200% 100%&quot;);
</span><span class="cx"> 
</span><del>-testComputedScrollSnapRule(&quot;mm along x axis with pixel repeat&quot;, &quot;points-x&quot;, &quot;10mm repeat(42mm)&quot;, &quot;37.78125px repeat(158.734375px)&quot;);
</del><ins>+testComputedScrollSnapRule(&quot;mm along x axis with pixel repeat&quot;, &quot;points-x&quot;, &quot;10mm repeat(42mm)&quot;, &quot;37.7952766418457px repeat(158.7401580810547px)&quot;);
</ins><span class="cx"> testComputedScrollSnapRule(&quot;in along x axis with pixel repeat&quot;, &quot;points-x&quot;, &quot;10in repeat(4in)&quot;, &quot;960px repeat(384px)&quot;);
</span><del>-testComputedScrollSnapRule(&quot;pt along x axis with pixel repeat&quot;, &quot;points-x&quot;, &quot;10pt repeat(42pt)&quot;, &quot;13.328125px repeat(56px)&quot;);
-testComputedScrollSnapRule(&quot;in/cm destination&quot;, &quot;destination&quot;, &quot;2in 5cm&quot;, &quot;192px 188.96875px&quot;);
-testComputedScrollSnapRule(&quot;in/cm coordinate&quot;, &quot;coordinate&quot;, &quot;2in 5cm 5in 2cm&quot;, &quot;192px 188.96875px, 480px 75.578125px&quot;);
</del><ins>+testComputedScrollSnapRule(&quot;pt along x axis with pixel repeat&quot;, &quot;points-x&quot;, &quot;10pt repeat(42pt)&quot;, &quot;13.333333015441895px repeat(56px)&quot;);
+testComputedScrollSnapRule(&quot;in/cm destination&quot;, &quot;destination&quot;, &quot;2in 5cm&quot;, &quot;192px 188.97637939453125px&quot;);
+testComputedScrollSnapRule(&quot;in/cm coordinate&quot;, &quot;coordinate&quot;, &quot;2in 5cm 5in 2cm&quot;, &quot;192px 188.97637939453125px, 480px 75.5905532836914px&quot;);
</ins><span class="cx"> 
</span><span class="cx"> testComputedScrollSnapRule(&quot;subpixel along x axis with pixel repeat&quot;, &quot;points-x&quot;, &quot;100.5px repeat(50.25px)&quot;, &quot;100.5px repeat(50.25px)&quot;);
</span><span class="cx"> testComputedScrollSnapRule(&quot;subpixel destination&quot;, &quot;destination&quot;, &quot;0.125px 2.4375px&quot;, &quot;0.125px 2.4375px&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/Source/WebCore/ChangeLog        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2015-03-10  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
+        https://bugs.webkit.org/show_bug.cgi?id=142411
+
+        Reviewed by Simon Fraser.
+
+        Tested by css3/scroll-snap/scroll-snap-position-values.html.
+
+        Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
+        may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
+        and 'left', 'right', and 'center' for the X axis.
+
+        Correct implementation to support calculated values for Scroll Snap Point markup. This required the
+        Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
+        to a regular CSSValue.
+
+        Add tests that these position labels, as well as combinations with percentages and pixel offsets
+        are parsed properly.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
+        when working with Length values. This is necessary to allow calculated results to be based on the proper default
+        page dimensions.
+        (WebCore::scrollSnapPoints): Ditto.
+        (WebCore::scrollSnapCoordinates): Ditto.
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
+        positions.
+        (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
+        (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
+        (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
+        (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
+        (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
+        (WebCore::CSSParser::parseTransformOrigin): Ditto.
+        (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
+        * css/CSSParser.h:
+        * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
+        repeat values as calculations.
+
</ins><span class="cx"> 2015-03-10  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for more emoji with variation.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -1109,8 +1109,8 @@
</span><span class="cx"> static Ref&lt;CSSValueList&gt; scrollSnapDestination(RenderStyle&amp; style, const LengthSize&amp; destination)
</span><span class="cx"> {
</span><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><del>-    list.get().append(percentageOrZoomAdjustedValue(destination.width(), &amp;style));
-    list.get().append(percentageOrZoomAdjustedValue(destination.height(), &amp;style));
</del><ins>+    list.get().append(zoomAdjustedPixelValueForLength(destination.width(), &amp;style));
+    list.get().append(zoomAdjustedPixelValueForLength(destination.height(), &amp;style));
</ins><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1123,9 +1123,9 @@
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueElements);
</span><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><span class="cx">     for (auto&amp; point : points-&gt;offsets)
</span><del>-        list.get().append(percentageOrZoomAdjustedValue(point, &amp;style));
</del><ins>+        list.get().append(zoomAdjustedPixelValueForLength(point, &amp;style));
</ins><span class="cx">     if (points-&gt;hasRepeat)
</span><del>-        list.get().append(cssValuePool().createValue(LengthRepeat::create(percentageOrZoomAdjustedValue(points-&gt;repeatOffset, &amp;style))));
</del><ins>+        list.get().append(cssValuePool().createValue(LengthRepeat::create(zoomAdjustedPixelValueForLength(points-&gt;repeatOffset, &amp;style))));
</ins><span class="cx">     return WTF::move(list);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1138,8 +1138,8 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; coordinate : coordinates) {
</span><span class="cx">         auto pair = CSSValueList::createSpaceSeparated();
</span><del>-        pair.get().append(percentageOrZoomAdjustedValue(coordinate.width(), &amp;style));
-        pair.get().append(percentageOrZoomAdjustedValue(coordinate.height(), &amp;style));
</del><ins>+        pair.get().append(zoomAdjustedPixelValueForLength(coordinate.width(), &amp;style));
+        pair.get().append(zoomAdjustedPixelValueForLength(coordinate.height(), &amp;style));
</ins><span class="cx">         list.get().append(WTF::move(pair));
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -3319,20 +3319,33 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool CSSParser::parseScrollSnapPositions(RefPtr&lt;CSSValue&gt;&amp; cssValueX, RefPtr&lt;CSSValue&gt;&amp; cssValueY)
+{
+    cssValueX = parsePositionX(*m_valueList);
+    if (!cssValueX)
+        return false;
+
+    // Don't accept odd-length lists of positions (must always have an X and a Y):
+    if (!m_valueList-&gt;next())
+        return false;
+
+    cssValueY = parsePositionY(*m_valueList);
+    if (!cssValueY)
+        return false;
+
+    return true;
+}
+
</ins><span class="cx"> bool CSSParser::parseScrollSnapDestination(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSValueList&gt; position = CSSValueList::createSpaceSeparated();
</span><span class="cx">     if (m_valueList-&gt;size() != 2)
</span><span class="cx">         return false;
</span><del>-    ValueWithCalculation valueXWithCalculation(*m_valueList-&gt;current());
-    if (!validateUnit(valueXWithCalculation, FPercent | FLength))
</del><ins>+
+    RefPtr&lt;CSSValue&gt; cssValueX, cssValueY;
+    if (!parseScrollSnapPositions(cssValueX, cssValueY))
</ins><span class="cx">         return false;
</span><del>-    RefPtr&lt;CSSValue&gt; cssValueX = createPrimitiveNumericValue(valueXWithCalculation);
</del><span class="cx"> 
</span><del>-    ValueWithCalculation valueYWithCalculation(*m_valueList-&gt;next());
-    if (!validateUnit(valueYWithCalculation, FPercent | FLength))
-        return false;
-    RefPtr&lt;CSSValue&gt; cssValueY = createPrimitiveNumericValue(valueYWithCalculation);
</del><span class="cx">     position-&gt;append(cssValueX.releaseNonNull());
</span><span class="cx">     position-&gt;append(cssValueY.releaseNonNull());
</span><span class="cx">     addProperty(propId, position, important);
</span><span class="lines">@@ -3344,17 +3357,15 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSValueList&gt; positions = CSSValueList::createSpaceSeparated();
</span><span class="cx">     while (m_valueList-&gt;current()) {
</span><del>-        ValueWithCalculation valueXWithCalculation(*m_valueList-&gt;current());
-        // Don't accept odd-length lists of coordinates.
-        if (!m_valueList-&gt;next())
</del><ins>+        RefPtr&lt;CSSValue&gt; cssValueX, cssValueY;
+        if (!parseScrollSnapPositions(cssValueX, cssValueY))
</ins><span class="cx">             return false;
</span><del>-        ValueWithCalculation valueYWithCalculation(*m_valueList-&gt;current());
-        if (!validateUnit(valueXWithCalculation, FPercent | FLength) || !validateUnit(valueYWithCalculation, FPercent | FLength))
-            return false;
-        positions-&gt;append(createPrimitiveNumericValue(valueXWithCalculation));
-        positions-&gt;append(createPrimitiveNumericValue(valueYWithCalculation));
</del><ins>+
+        positions-&gt;append(cssValueX.releaseNonNull());
+        positions-&gt;append(cssValueY.releaseNonNull());
</ins><span class="cx">         m_valueList-&gt;next();
</span><span class="cx">     }
</span><ins>+
</ins><span class="cx">     if (positions-&gt;length()) {
</span><span class="cx">         addProperty(propId, positions.release(), important);
</span><span class="cx">         return true;
</span><span class="lines">@@ -4037,7 +4048,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;CSSValue&gt; CSSParser::parseFillPositionX(CSSParserValueList&amp; valueList)
</del><ins>+PassRefPtr&lt;CSSValue&gt; CSSParser::parsePositionX(CSSParserValueList&amp; valueList)
</ins><span class="cx"> {
</span><span class="cx">     int id = valueList.current()-&gt;id;
</span><span class="cx">     if (id == CSSValueLeft || id == CSSValueRight || id == CSSValueCenter) {
</span><span class="lines">@@ -4054,7 +4065,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;CSSValue&gt; CSSParser::parseFillPositionY(CSSParserValueList&amp; valueList)
</del><ins>+PassRefPtr&lt;CSSValue&gt; CSSParser::parsePositionY(CSSParserValueList&amp; valueList)
</ins><span class="cx"> {
</span><span class="cx">     int id = valueList.current()-&gt;id;
</span><span class="cx">     if (id == CSSValueTop || id == CSSValueBottom || id == CSSValueCenter) {
</span><span class="lines">@@ -4564,14 +4575,14 @@
</span><span class="cx">                     break;
</span><span class="cx">                 case CSSPropertyBackgroundPositionX:
</span><span class="cx">                 case CSSPropertyWebkitMaskPositionX: {
</span><del>-                    currValue = parseFillPositionX(*m_valueList);
</del><ins>+                    currValue = parsePositionX(*m_valueList);
</ins><span class="cx">                     if (currValue)
</span><span class="cx">                         m_valueList-&gt;next();
</span><span class="cx">                     break;
</span><span class="cx">                 }
</span><span class="cx">                 case CSSPropertyBackgroundPositionY:
</span><span class="cx">                 case CSSPropertyWebkitMaskPositionY: {
</span><del>-                    currValue = parseFillPositionY(*m_valueList);
</del><ins>+                    currValue = parsePositionY(*m_valueList);
</ins><span class="cx">                     if (currValue)
</span><span class="cx">                         m_valueList-&gt;next();
</span><span class="cx">                     break;
</span><span class="lines">@@ -9714,13 +9725,13 @@
</span><span class="cx">             // parseTransformOriginShorthand advances the m_valueList pointer
</span><span class="cx">             break;
</span><span class="cx">         case CSSPropertyWebkitTransformOriginX: {
</span><del>-            value = parseFillPositionX(*m_valueList);
</del><ins>+            value = parsePositionX(*m_valueList);
</ins><span class="cx">             if (value)
</span><span class="cx">                 m_valueList-&gt;next();
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case CSSPropertyWebkitTransformOriginY: {
</span><del>-            value = parseFillPositionY(*m_valueList);
</del><ins>+            value = parsePositionY(*m_valueList);
</ins><span class="cx">             if (value)
</span><span class="cx">                 m_valueList-&gt;next();
</span><span class="cx">             break;
</span><span class="lines">@@ -9757,13 +9768,13 @@
</span><span class="cx">             parse2ValuesFillPosition(*m_valueList, value, value2);
</span><span class="cx">             break;
</span><span class="cx">         case CSSPropertyWebkitPerspectiveOriginX: {
</span><del>-            value = parseFillPositionX(*m_valueList);
</del><ins>+            value = parsePositionX(*m_valueList);
</ins><span class="cx">             if (value)
</span><span class="cx">                 m_valueList-&gt;next();
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case CSSPropertyWebkitPerspectiveOriginY: {
</span><del>-            value = parseFillPositionY(*m_valueList);
</del><ins>+            value = parsePositionY(*m_valueList);
</ins><span class="cx">             if (value)
</span><span class="cx">                 m_valueList-&gt;next();
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -154,8 +154,8 @@
</span><span class="cx">     enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1, XFillPosition = 2, YFillPosition = 4 };
</span><span class="cx">     enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKeyword = 1 };
</span><span class="cx">     PassRefPtr&lt;CSSPrimitiveValue&gt; parseFillPositionComponent(CSSParserValueList&amp;, unsigned&amp; cumulativeFlags, FillPositionFlag&amp; individualFlag, FillPositionParsingMode = ResolveValuesAsPercent);
</span><del>-    PassRefPtr&lt;CSSValue&gt; parseFillPositionX(CSSParserValueList&amp;);
-    PassRefPtr&lt;CSSValue&gt; parseFillPositionY(CSSParserValueList&amp;);
</del><ins>+    PassRefPtr&lt;CSSValue&gt; parsePositionX(CSSParserValueList&amp;);
+    PassRefPtr&lt;CSSValue&gt; parsePositionY(CSSParserValueList&amp;);
</ins><span class="cx">     void parse2ValuesFillPosition(CSSParserValueList&amp;, RefPtr&lt;CSSValue&gt;&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="cx">     bool isPotentialPositionValue(CSSParserValue&amp;);
</span><span class="cx">     void parseFillPosition(CSSParserValueList&amp;, RefPtr&lt;CSSValue&gt;&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="lines">@@ -559,6 +559,7 @@
</span><span class="cx">     bool parseNonElementSnapPoints(CSSPropertyID propId, bool important);
</span><span class="cx">     bool parseScrollSnapDestination(CSSPropertyID propId, bool important);
</span><span class="cx">     bool parseScrollSnapCoordinate(CSSPropertyID propId, bool important);
</span><ins>+    bool parseScrollSnapPositions(RefPtr&lt;CSSValue&gt;&amp; cssValueX, RefPtr&lt;CSSValue&gt;&amp; cssValueY);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool parseFontFaceSrcURI(CSSValueList&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssLengthRepeath"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/LengthRepeat.h (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/LengthRepeat.h        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/Source/WebCore/css/LengthRepeat.h        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -36,13 +36,13 @@
</span><span class="cx"> 
</span><span class="cx"> class LengthRepeat : public RefCounted&lt;LengthRepeat&gt; {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;LengthRepeat&gt; create(PassRefPtr&lt;CSSPrimitiveValue&gt; interval) { return adoptRef(new LengthRepeat(interval)); }
</del><ins>+    static PassRefPtr&lt;LengthRepeat&gt; create(PassRefPtr&lt;CSSValue&gt; interval) { return adoptRef(new LengthRepeat(interval)); }
</ins><span class="cx"> 
</span><span class="cx">     PassRefPtr&lt;LengthRepeat&gt; cloneForCSSOM() const { return create(interval()); }
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* interval() const { return m_interval.get(); }
</del><ins>+    CSSValue* interval() const { return m_interval.get(); }
</ins><span class="cx"> 
</span><del>-    void setInterval(PassRefPtr&lt;CSSPrimitiveValue&gt; interval) { m_interval = interval; }
</del><ins>+    void setInterval(PassRefPtr&lt;CSSValue&gt; interval) { m_interval = interval; }
</ins><span class="cx"> 
</span><span class="cx">     bool equals(const LengthRepeat&amp; other) const
</span><span class="cx">     {
</span><span class="lines">@@ -55,12 +55,12 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    LengthRepeat(PassRefPtr&lt;CSSPrimitiveValue&gt; interval)
</del><ins>+    LengthRepeat(PassRefPtr&lt;CSSValue&gt; interval)
</ins><span class="cx">         : m_interval(interval)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSPrimitiveValue&gt; m_interval;
</del><ins>+    RefPtr&lt;CSSValue&gt; m_interval;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (181351 => 181352)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-03-10 23:12:53 UTC (rev 181351)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-03-10 23:19:38 UTC (rev 181352)
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> inline Length StyleBuilderConverter::parseSnapCoordinate(StyleResolver&amp; styleResolver, const CSSValue&amp; value)
</span><span class="cx"> {
</span><del>-    return downcast&lt;CSSPrimitiveValue&gt;(value).convertToLength&lt;FixedIntegerConversion | PercentConversion | AutoConversion&gt;(styleResolver.state().cssToLengthConversionData());
</del><ins>+    return downcast&lt;CSSPrimitiveValue&gt;(value).convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion | AutoConversion&gt;(styleResolver.state().cssToLengthConversionData());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline std::unique_ptr&lt;ScrollSnapPoints&gt; StyleBuilderConverter::convertScrollSnapPoints(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span></span></pre>
</div>
</div>

</body>
</html>