<!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>[181189] 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/181189">181189</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-03-06 15:39:57 -0800 (Fri, 06 Mar 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add 'initial' keyword support for scroll snap CSS properties
https://bugs.webkit.org/show_bug.cgi?id=136345
<rdar://problem/18162325>
Reviewed by Dean Jackson.
Source/WebCore:
Tested by css3/scroll-snap/scroll-snap-initial.html
The existing implementation already had 'initial' keyword support, but did not fully follow
the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
scroll-snap-points-y properties was not handled correctly.
Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
state.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
* css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
as a pointer.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
implementation for ScrollSnapPoints.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
(WebCore::updateSnapOffsetsForScrollableArea): Ditto.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
(WebCore::RenderStyle::scrollSnapPointsY): Ditto.
(WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
(WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
(WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
* rendering/style/RenderStyle.h:
* rendering/style/StyleScrollSnapPoints.cpp:
(WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
* rendering/style/StyleScrollSnapPoints.h:
LayoutTests:
* css3/scroll-snap/scroll-snap-property-computed-style.js: Update for corrected 'initial' behavior.
* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Rebaselined.
* css3/scroll-snap/scroll-snap-initial.html: Added.
* css3/scroll-snap/scroll-snap-initial-expected.txt: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:</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="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</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="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAxisScrollSnapOffsetscpp">trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleScrollSnapPointscpp">trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleScrollSnapPointsh">trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3scrollsnapscrollsnapinitialexpectedtxt">trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3scrollsnapscrollsnapinitialhtml">trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/LayoutTests/ChangeLog        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-03-06 Brent Fulgham <bfulgham@apple.com>
+
+ Add 'initial' keyword support for scroll snap CSS properties
+ https://bugs.webkit.org/show_bug.cgi?id=136345
+ <rdar://problem/18162325>
+
+ Reviewed by Dean Jackson.
+
+ * css3/scroll-snap/scroll-snap-property-computed-style.js: Update for corrected 'initial' behavior.
+ * css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Rebaselined.
+ * css3/scroll-snap/scroll-snap-initial.html: Added.
+ * css3/scroll-snap/scroll-snap-initial-expected.txt: Added.
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/win/TestExpectations:
+
</ins><span class="cx"> 2015-03-06 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> ES6: Object Literal Extensions - Methods
</span></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnapinitialexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt (0 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt         (rev 0)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+Tests 'initial' on scroll snap properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS noInitial.style['-webkit-scroll-snap-type'] is ""
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-type') is "mandatory"
+PASS noInitial.style['-webkit-scroll-snap-points-x'] is ""
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x') is "repeat(100%)"
+PASS noInitial.style['-webkit-scroll-snap-points-y'] is ""
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
+PASS noInitial.style['-webkit-scroll-snap-destination'] is ""
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-destination') is "10% 11%"
+PASS noInitial.style['-webkit-scroll-snap-coordinate'] is ""
+PASS window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate') is "none"
+PASS initialType.style['-webkit-scroll-snap-type'] is "initial"
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-type') is "none"
+PASS initialType.style['-webkit-scroll-snap-points-x'] is ""
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-x') is "repeat(100%)"
+PASS initialType.style['-webkit-scroll-snap-points-y'] is ""
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
+PASS initialType.style['-webkit-scroll-snap-destination'] is ""
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-destination') is "0px 0px"
+PASS initialType.style['-webkit-scroll-snap-coordinate'] is ""
+PASS window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-coordinate') is "15px 122px"
+PASS initialXPoints.style['-webkit-scroll-snap-type'] is ""
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-type') is "mandatory"
+PASS initialXPoints.style['-webkit-scroll-snap-points-x'] is "initial"
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-x') is "none"
+PASS initialXPoints.style['-webkit-scroll-snap-points-y'] is ""
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
+PASS initialXPoints.style['-webkit-scroll-snap-destination'] is ""
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-destination') is "50% 70%"
+PASS initialXPoints.style['-webkit-scroll-snap-coordinate'] is ""
+PASS window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-coordinate') is "100% 50%"
+PASS initialYPoints.style['-webkit-scroll-snap-type'] is ""
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-type') is "mandatory"
+PASS initialYPoints.style['-webkit-scroll-snap-points-x'] is ""
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-x') is "repeat(100%)"
+PASS initialYPoints.style['-webkit-scroll-snap-points-y'] is "initial"
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-y') is "none"
+PASS initialYPoints.style['-webkit-scroll-snap-destination'] is ""
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-destination') is "10px 20px"
+PASS initialYPoints.style['-webkit-scroll-snap-coordinate'] is ""
+PASS window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-coordinate') is "50% 100%"
+PASS initialDestination.style['-webkit-scroll-snap-type'] is ""
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-type') is "proximity"
+PASS initialDestination.style['-webkit-scroll-snap-points-x'] is ""
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-x') is "repeat(100%)"
+PASS initialDestination.style['-webkit-scroll-snap-points-y'] is ""
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
+PASS initialDestination.style['-webkit-scroll-snap-destination'] is "initial"
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-destination') is "0px 0px"
+PASS initialDestination.style['-webkit-scroll-snap-coordinate'] is ""
+PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-coordinate') is "10px 10px"
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-type'] is ""
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-type') is "mandatory"
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-points-x'] is ""
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-x') is "repeat(100%)"
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-points-y'] is ""
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-destination'] is ""
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-destination') is "10% 10%"
+PASS initialSnapCoordinate.style['-webkit-scroll-snap-coordinate'] is "initial"
+PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-coordinate') is "none"
+PASS allInitial.style['-webkit-scroll-snap-type'] is "initial"
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-type') is "none"
+PASS allInitial.style['-webkit-scroll-snap-points-x'] is "initial"
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-x') is "none"
+PASS allInitial.style['-webkit-scroll-snap-points-y'] is "initial"
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-y') is "none"
+PASS allInitial.style['-webkit-scroll-snap-destination'] is "initial"
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-destination') is "0px 0px"
+PASS allInitial.style['-webkit-scroll-snap-coordinate'] is "initial"
+PASS window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-coordinate') is "none"
+PASS allInitialY.style['-webkit-scroll-snap-type'] is "initial"
+PASS window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-type') is "none"
+PASS allInitialY.style['-webkit-scroll-snap-points-x'] is "initial"
+PASS window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-points-x') is "none"
+PASS allInitialY.style['-webkit-scroll-snap-points-y'] is "initial"
+PASS window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-points-y') is "none"
+PASS allInitialY.style['-webkit-scroll-snap-destination'] is "initial"
+PASS window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-destination') is "0px 0px"
+PASS allInitialY.style['-webkit-scroll-snap-coordinate'] is "initial"
+PASS window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-coordinate') is "none"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnapinitialhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html (0 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html         (rev 0)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -0,0 +1,283 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .horizontalGallery {
+ width: 400px;
+ height: 50px;
+ overflow-y: hidden;
+ overflow-x: auto;
+ }
+ .verticalGallery {
+ width: 400px;
+ height: 50px;
+ display: inline-block;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+ .horizontalGalleryDrawer {
+ width: 3000px;
+ height: 50px;
+ }
+ .verticalGalleryDrawer {
+ width: 400px;
+ height: 300px;
+ }
+ .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: 10% 11%;
+ -webkit-scroll-snap-coordinate: none;
+ }
+
+ .initialType {
+ -webkit-scroll-snap-type: initial;
+ -webkit-scroll-snap-points-x: repeat(100%);
+ -webkit-scroll-snap-points-y: repeat(100%);
+ -webkit-scroll-snap-destination: 0px 0px;
+ -webkit-scroll-snap-coordinate: 15px 122px;
+ }
+
+ .initialXPoints {
+ -webkit-scroll-snap-type: mandatory;
+ -webkit-scroll-snap-points-x: initial;
+ -webkit-scroll-snap-points-y: repeat(100%);
+ -webkit-scroll-snap-destination: 50% 70%;
+ -webkit-scroll-snap-coordinate: 100% 50%;
+ }
+
+ .initialYPoints {
+ -webkit-scroll-snap-type: mandatory;
+ -webkit-scroll-snap-points-x: repeat(100%);
+ -webkit-scroll-snap-points-y: initial;
+ -webkit-scroll-snap-destination: 10px 20px;
+ -webkit-scroll-snap-coordinate: 50% 100%;
+ }
+
+ .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: 10px 10px;
+ }
+
+ .initialSnapCoordinate {
+ -webkit-scroll-snap-type: mandatory;
+ -webkit-scroll-snap-points-x: repeat(100%);
+ -webkit-scroll-snap-points-y: repeat(100%);
+ -webkit-scroll-snap-destination: 10% 10%;
+ -webkit-scroll-snap-coordinate: initial;
+ }
+
+ .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
+ }
+
+ #item0 { background-color: red; }
+ #item1 { background-color: green; }
+ #item2 { background-color: blue; }
+ #item3 { background-color: aqua; }
+ #item4 { background-color: yellow; }
+ #item5 { background-color: fuchsia; }
+ </style>
+ <script src="../../resources/js-test-pre.js"></script>
+ </head>
+ <body>
+ <div style="width: 400px">
+ <div id="noInitial" class="horizontalGallery noInitial">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="initialType" class="horizontalGallery initialType" style="-webkit-scroll-snap-type: initial">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="initialXPoints" class="horizontalGallery initialXPoints" style="-webkit-scroll-snap-points-x: initial">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="initialYPoints" class="horizontalGallery initialYPoints" style="-webkit-scroll-snap-points-y: initial">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="initialDestination" class="horizontalGallery initialDestination" style="-webkit-scroll-snap-destination: initial">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="initialSnapCoordinate" class="horizontalGallery initialSnapCoordinate" style="-webkit-scroll-snap-coordinate: initial">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="allInitial" class="horizontalGallery allInitial" style="-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">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ <div id="allInitialY" class="verticalGallery noInitial" style="-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">
+ <div class="verticalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ </div>
+ <div id="console"></div>
+ <script>
+ description("Tests 'initial' on scroll snap properties.");
+
+ var noInitial = document.getElementById('noInitial');
+ shouldBeEmptyString("noInitial.style['-webkit-scroll-snap-type']");
+ shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-type')", "mandatory");
+ shouldBeEmptyString("noInitial.style['-webkit-scroll-snap-points-x']");
+ shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
+ shouldBeEmptyString("noInitial.style['-webkit-scroll-snap-points-y']");
+ shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
+ shouldBeEmptyString("noInitial.style['-webkit-scroll-snap-destination']");
+ shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-destination')", "10% 11%");
+ shouldBeEmptyString("noInitial.style['-webkit-scroll-snap-coordinate']");
+ shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate')", "none");
+
+ var initialType = document.getElementById('initialType');
+ shouldBeEqualToString("initialType.style['-webkit-scroll-snap-type']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-type')", "none");
+ shouldBeEmptyString("initialType.style['-webkit-scroll-snap-points-x']");
+ shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
+ shouldBeEmptyString("initialType.style['-webkit-scroll-snap-points-y']");
+ shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
+ shouldBeEmptyString("initialType.style['-webkit-scroll-snap-destination']");
+ shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-destination')", "0px 0px");
+ shouldBeEmptyString("initialType.style['-webkit-scroll-snap-coordinate']");
+ shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-coordinate')", "15px 122px");
+
+ var initialXPoints = document.getElementById('initialXPoints');
+ shouldBeEmptyString("initialXPoints.style['-webkit-scroll-snap-type']");
+ shouldBeEqualToString("window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-type')", "mandatory");
+ shouldBeEqualToString("initialXPoints.style['-webkit-scroll-snap-points-x']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-x')", "none");
+ shouldBeEmptyString("initialXPoints.style['-webkit-scroll-snap-points-y']");
+ shouldBeEqualToString("window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
+ shouldBeEmptyString("initialXPoints.style['-webkit-scroll-snap-destination']");
+ shouldBeEqualToString("window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-destination')", "50% 70%");
+ shouldBeEmptyString("initialXPoints.style['-webkit-scroll-snap-coordinate']");
+ shouldBeEqualToString("window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-coordinate')", "100% 50%");
+
+ var initialYPoints = document.getElementById('initialYPoints');
+ shouldBeEmptyString("initialYPoints.style['-webkit-scroll-snap-type']");
+ shouldBeEqualToString("window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-type')", "mandatory");
+ shouldBeEmptyString("initialYPoints.style['-webkit-scroll-snap-points-x']");
+ shouldBeEqualToString("window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
+ shouldBeEqualToString("initialYPoints.style['-webkit-scroll-snap-points-y']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-points-y')", "none");
+ shouldBeEmptyString("initialYPoints.style['-webkit-scroll-snap-destination']");
+ shouldBeEqualToString("window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-destination')", "10px 20px");
+ shouldBeEmptyString("initialYPoints.style['-webkit-scroll-snap-coordinate']");
+ shouldBeEqualToString("window.getComputedStyle(initialYPoints).getPropertyValue('-webkit-scroll-snap-coordinate')", "50% 100%");
+
+ var initialDestination = document.getElementById('initialDestination');
+ shouldBeEmptyString("initialDestination.style['-webkit-scroll-snap-type']");
+ shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-type')", "proximity");
+ shouldBeEmptyString("initialDestination.style['-webkit-scroll-snap-points-x']");
+ shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
+ shouldBeEmptyString("initialDestination.style['-webkit-scroll-snap-points-y']");
+ shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
+ shouldBeEqualToString("initialDestination.style['-webkit-scroll-snap-destination']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-destination')", "0px 0px");
+ shouldBeEmptyString("initialDestination.style['-webkit-scroll-snap-coordinate']");
+ shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-coordinate')", "10px 10px");
+
+ var initialSnapCoordinate = document.getElementById('initialSnapCoordinate');
+ shouldBeEmptyString("initialSnapCoordinate.style['-webkit-scroll-snap-type']");
+ shouldBeEqualToString("window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-type')", "mandatory");
+ shouldBeEmptyString("initialSnapCoordinate.style['-webkit-scroll-snap-points-x']");
+ shouldBeEqualToString("window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
+ shouldBeEmptyString("initialSnapCoordinate.style['-webkit-scroll-snap-points-y']");
+ shouldBeEqualToString("window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
+ shouldBeEmptyString("initialSnapCoordinate.style['-webkit-scroll-snap-destination']");
+ shouldBeEqualToString("window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-destination')", "10% 10%");
+ shouldBeEqualToString("initialSnapCoordinate.style['-webkit-scroll-snap-coordinate']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-coordinate')", "none");
+
+ var allInitial = document.getElementById('allInitial');
+ shouldBeEqualToString("allInitial.style['-webkit-scroll-snap-type']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-type')", "none");
+ shouldBeEqualToString("allInitial.style['-webkit-scroll-snap-points-x']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-x')", "none");
+ shouldBeEqualToString("allInitial.style['-webkit-scroll-snap-points-y']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-points-y')", "none");
+ shouldBeEqualToString("allInitial.style['-webkit-scroll-snap-destination']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-destination')", "0px 0px");
+ shouldBeEqualToString("allInitial.style['-webkit-scroll-snap-coordinate']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('-webkit-scroll-snap-coordinate')", "none");
+
+ var allInitialY = document.getElementById('allInitialY');
+ shouldBeEqualToString("allInitialY.style['-webkit-scroll-snap-type']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-type')", "none");
+ shouldBeEqualToString("allInitialY.style['-webkit-scroll-snap-points-x']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-points-x')", "none");
+ shouldBeEqualToString("allInitialY.style['-webkit-scroll-snap-points-y']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-points-y')", "none");
+ shouldBeEqualToString("allInitialY.style['-webkit-scroll-snap-destination']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-destination')", "0px 0px");
+ shouldBeEqualToString("allInitialY.style['-webkit-scroll-snap-coordinate']", "initial");
+ shouldBeEqualToString("window.getComputedStyle(allInitialY).getPropertyValue('-webkit-scroll-snap-coordinate')", "none");
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
+
</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 (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -8,16 +8,16 @@
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-type') is 'none'
</span><span class="cx">
</span><span class="cx"> invalid points along x axis : hello world
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'none'
</ins><span class="cx">
</span><span class="cx"> invalid points along y axis : hello world
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'none'
</ins><span class="cx">
</span><span class="cx"> typo in point definition : repaet(50px)
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'none'
</ins><span class="cx">
</span><span class="cx"> another invalid point definition : ??px repeat(50px)
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'none'
</ins><span class="cx">
</span><span class="cx"> invalid destination : foo bar
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-destination') is '0px 0px'
</span><span class="lines">@@ -50,10 +50,10 @@
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-type') is 'proximity'
</span><span class="cx">
</span><span class="cx"> inherited points along x axis : inherit
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'none'
</ins><span class="cx">
</span><span class="cx"> initial points along x axis : initial
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'none'
</ins><span class="cx">
</span><span class="cx"> element points along x axis : elements
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is 'elements'
</span><span class="lines">@@ -83,10 +83,10 @@
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-x') is '100px repeat(42px)'
</span><span class="cx">
</span><span class="cx"> inherited points along y axis : inherit
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'none'
</ins><span class="cx">
</span><span class="cx"> initial points along y axis : initial
</span><del>-PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'repeat(100%)'
</del><ins>+PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'none'
</ins><span class="cx">
</span><span class="cx"> element points along y axis : elements
</span><span class="cx"> PASS window.getComputedStyle(document.body).getPropertyValue('-webkit-scroll-snap-points-y') is 'elements'
</span></span></pre></div>
<a id="trunkLayoutTestscss3scrollsnapscrollsnappropertycomputedstylejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -17,10 +17,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> testComputedScrollSnapRule("invalid snapping type", "type", "potato", "none");
</span><del>-testComputedScrollSnapRule("invalid points along x axis", "points-x", "hello world", "repeat(100%)");
-testComputedScrollSnapRule("invalid points along y axis", "points-y", "hello world", "repeat(100%)");
-testComputedScrollSnapRule("typo in point definition", "points-x", "repaet(50px)", "repeat(100%)");
-testComputedScrollSnapRule("another invalid point definition", "points-x", "??px repeat(50px)", "repeat(100%)");
</del><ins>+testComputedScrollSnapRule("invalid points along x axis", "points-x", "hello world", "none");
+testComputedScrollSnapRule("invalid points along y axis", "points-y", "hello world", "none");
+testComputedScrollSnapRule("typo in point definition", "points-x", "repaet(50px)", "none");
+testComputedScrollSnapRule("another invalid point definition", "points-x", "??px repeat(50px)", "none");
</ins><span class="cx"> testComputedScrollSnapRule("invalid destination", "destination", "foo bar", "0px 0px");
</span><span class="cx"> testComputedScrollSnapRule("short one destination value", "destination", "50%", "0px 0px");
</span><span class="cx"> testComputedScrollSnapRule("extra destination value", "destination", "50px 100% 75px", "0px 0px");
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> testComputedScrollSnapRule("mandatory type", "type", "mandatory", "mandatory");
</span><span class="cx"> testComputedScrollSnapRule("proximity type", "type", "proximity", "proximity");
</span><span class="cx">
</span><del>-testComputedScrollSnapRule("inherited points along x axis", "points-x", "inherit", "repeat(100%)");
-testComputedScrollSnapRule("initial points along x axis", "points-x", "initial", "repeat(100%)");
</del><ins>+testComputedScrollSnapRule("inherited points along x axis", "points-x", "inherit", "none");
+testComputedScrollSnapRule("initial points along x axis", "points-x", "initial", "none");
</ins><span class="cx"> testComputedScrollSnapRule("element points along x axis", "points-x", "elements", "elements");
</span><span class="cx"> testComputedScrollSnapRule("percentage points along x axis", "points-x", "100% 50%", "100% 50%");
</span><span class="cx"> testComputedScrollSnapRule("pixel points along x axis", "points-x", "100px 50px", "100px 50px");
</span><span class="lines">@@ -45,8 +45,8 @@
</span><span class="cx"> testComputedScrollSnapRule("percentage points along x axis with pixel repeat", "points-x", "100% 50% repeat(40px)", "100% 50% repeat(40px)");
</span><span class="cx"> testComputedScrollSnapRule("pixel points along x axis with pixel repeat", "points-x", "100px repeat(42px)", "100px repeat(42px)");
</span><span class="cx">
</span><del>-testComputedScrollSnapRule("inherited points along y axis", "points-y", "inherit", "repeat(100%)");
-testComputedScrollSnapRule("initial points along y axis", "points-y", "initial", "repeat(100%)");
</del><ins>+testComputedScrollSnapRule("inherited points along y axis", "points-y", "inherit", "none");
+testComputedScrollSnapRule("initial points along y axis", "points-y", "initial", "none");
</ins><span class="cx"> testComputedScrollSnapRule("element points along y axis", "points-y", "elements", "elements");
</span><span class="cx"> testComputedScrollSnapRule("percentage points along y axis", "points-y", "100% 50%", "100% 50%");
</span><span class="cx"> testComputedScrollSnapRule("pixel points along y axis", "points-y", "100px 50px", "100px 50px");
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/TestExpectations        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/LayoutTests/platform/efl/TestExpectations        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -59,6 +59,9 @@
</span><span class="cx"> fast/dom/Window/slow-unload-handler.html
</span><span class="cx"> fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
</span><span class="cx">
</span><ins>+# Need a scroll snap point implementation
+css3/scroll-snap [ Skip ]
+
</ins><span class="cx"> # ----------------------------------------
</span><span class="cx"> # Tests which also fail in other platforms
</span><span class="cx"> # ----------------------------------------
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -620,7 +620,8 @@
</span><span class="cx"> webkit.org/b/142291 fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/142291 fast/regions/repaint/fixed-in-named-flow-cb-changed.html [ ImageOnlyFailure ]
</span><span class="cx">
</span><del>-
</del><ins>+# TODO Scroll snap points
+css3/scroll-snap [ Skip ]
</ins><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # End of Expected failures
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/LayoutTests/platform/win/TestExpectations        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -591,6 +591,9 @@
</span><span class="cx">
</span><span class="cx"> # TODO Attachment elements do not provide a custom renderer
</span><span class="cx"> webkit.org/b/142260 fast/attachment [ Skip ]
</span><ins>+
+# TODO Scroll snap points
+css3/scroll-snap [ Skip ]
</ins><span class="cx"> ################################################################################
</span><span class="cx"> ########### End Missing Functionality Prevents Testing ##############
</span><span class="cx"> ################################################################################
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/ChangeLog        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2015-03-06 Brent Fulgham <bfulgham@apple.com>
+
+ Add 'initial' keyword support for scroll snap CSS properties
+ https://bugs.webkit.org/show_bug.cgi?id=136345
+ <rdar://problem/18162325>
+
+ Reviewed by Dean Jackson.
+
+ Tested by css3/scroll-snap/scroll-snap-initial.html
+
+ The existing implementation already had 'initial' keyword support, but did not fully follow
+ the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
+ scroll-snap-points-y properties was not handled correctly.
+
+ Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
+ state.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
+ * css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
+ as a pointer.
+ * css/StyleBuilderCustom.h:
+ (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
+ implementation for ScrollSnapPoints.
+ (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
+ (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
+ (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
+ * page/scrolling/AxisScrollSnapOffsets.cpp:
+ (WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
+ (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
+ (WebCore::RenderStyle::scrollSnapPointsY): Ditto.
+ (WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
+ (WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
+ (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
+ (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
+ * rendering/style/RenderStyle.h:
+ * rendering/style/StyleScrollSnapPoints.cpp:
+ (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
+ * rendering/style/StyleScrollSnapPoints.h:
+
</ins><span class="cx"> 2015-03-05 Roger Fong <roger_fong@apple.com>
</span><span class="cx">
</span><span class="cx"> Reskin Captions button and container on OSX.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -1106,7 +1106,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><del>-
</del><span class="cx"> static Ref<CSSValueList> scrollSnapDestination(RenderStyle& style, const LengthSize& destination)
</span><span class="cx"> {
</span><span class="cx"> auto list = CSSValueList::createSpaceSeparated();
</span><span class="lines">@@ -1115,15 +1114,18 @@
</span><span class="cx"> return list;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static Ref<CSSValue> scrollSnapPoints(RenderStyle& style, const ScrollSnapPoints& points)
</del><ins>+static Ref<CSSValue> scrollSnapPoints(RenderStyle& style, const ScrollSnapPoints* points)
</ins><span class="cx"> {
</span><del>- if (points.usesElements)
</del><ins>+ if (!points)
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+
+ if (points->usesElements)
</ins><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueElements);
</span><span class="cx"> auto list = CSSValueList::createSpaceSeparated();
</span><del>- for (auto& point : points.offsets)
</del><ins>+ for (auto& point : points->offsets)
</ins><span class="cx"> list.get().append(percentageOrZoomAdjustedValue(point, &style));
</span><del>- if (points.hasRepeat)
- list.get().append(cssValuePool().createValue(LengthRepeat::create(percentageOrZoomAdjustedValue(points.repeatOffset, &style))));
</del><ins>+ if (points->hasRepeat)
+ list.get().append(cssValuePool().createValue(LengthRepeat::create(percentageOrZoomAdjustedValue(points->repeatOffset, &style))));
</ins><span class="cx"> return WTF::move(list);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1143,7 +1145,6 @@
</span><span class="cx">
</span><span class="cx"> return WTF::move(list);
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> static Ref<CSSValueList> getDelayValue(const AnimationList* animList)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -560,8 +560,8 @@
</span><span class="cx"> -webkit-print-color-adjust [Inherited]
</span><span class="cx"> -webkit-rtl-ordering [Inherited, Setter=setRTLOrdering, Initial=initialRTLOrdering]
</span><span class="cx"> #if defined(ENABLE_CSS_SCROLL_SNAP)
</span><del>--webkit-scroll-snap-points-x [Converter=ScrollSnapPoints]
--webkit-scroll-snap-points-y [Converter=ScrollSnapPoints]
</del><ins>+-webkit-scroll-snap-points-x [Converter=ScrollSnapPoints, Custom=Initial|Inherit]
+-webkit-scroll-snap-points-y [Converter=ScrollSnapPoints, Custom=Initial|Inherit]
</ins><span class="cx"> -webkit-scroll-snap-type
</span><span class="cx"> -webkit-scroll-snap-destination [Converter=SnapCoordinatePair]
</span><span class="cx"> -webkit-scroll-snap-coordinate [Converter=ScrollSnapCoordinates, NameForMethods=ScrollSnapCoordinates]
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> static TextDecorationSkip convertTextDecorationSkip(StyleResolver&, CSSValue&);
</span><span class="cx"> static PassRefPtr<ShapeValue> convertShapeValue(StyleResolver&, CSSValue&);
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><del>- static ScrollSnapPoints convertScrollSnapPoints(StyleResolver&, CSSValue&);
</del><ins>+ static std::unique_ptr<ScrollSnapPoints> convertScrollSnapPoints(StyleResolver&, CSSValue&);
</ins><span class="cx"> static LengthSize convertSnapCoordinatePair(StyleResolver&, CSSValue&, size_t offset = 0);
</span><span class="cx"> static Vector<LengthSize> convertScrollSnapCoordinates(StyleResolver&, CSSValue&);
</span><span class="cx"> #endif
</span><span class="lines">@@ -708,27 +708,27 @@
</span><span class="cx"> return downcast<CSSPrimitiveValue>(value).convertToLength<FixedIntegerConversion | PercentConversion | AutoConversion>(styleResolver.state().cssToLengthConversionData());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline ScrollSnapPoints StyleBuilderConverter::convertScrollSnapPoints(StyleResolver& styleResolver, CSSValue& value)
</del><ins>+inline std::unique_ptr<ScrollSnapPoints> StyleBuilderConverter::convertScrollSnapPoints(StyleResolver& styleResolver, CSSValue& value)
</ins><span class="cx"> {
</span><del>- ScrollSnapPoints points;
</del><ins>+ auto points = std::make_unique<ScrollSnapPoints>();
</ins><span class="cx">
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><span class="cx"> ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueElements);
</span><del>- points.usesElements = true;
</del><ins>+ points->usesElements = true;
</ins><span class="cx"> return points;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- points.hasRepeat = false;
</del><ins>+ points->hasRepeat = false;
</ins><span class="cx"> for (auto& currentValue : downcast<CSSValueList>(value)) {
</span><span class="cx"> auto& itemValue = downcast<CSSPrimitiveValue>(currentValue.get());
</span><span class="cx"> if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
</span><span class="cx"> if (auto* interval = lengthRepeat->interval()) {
</span><del>- points.repeatOffset = parseSnapCoordinate(styleResolver, *interval);
- points.hasRepeat = true;
</del><ins>+ points->repeatOffset = parseSnapCoordinate(styleResolver, *interval);
+ points->hasRepeat = true;
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- points.offsets.append(parseSnapCoordinate(styleResolver, itemValue));
</del><ins>+ points->offsets.append(parseSnapCoordinate(styleResolver, itemValue));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return points;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -128,6 +128,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> static void applyValueWebkitWritingMode(StyleResolver&, CSSValue&);
</span><span class="cx"> static void applyValueAlt(StyleResolver&, CSSValue&);
</span><ins>+#if ENABLE(CSS_SCROLL_SNAP)
+ static void applyInitialWebkitScrollSnapPointsX(StyleResolver&);
+ static void applyInheritWebkitScrollSnapPointsX(StyleResolver&);
+ static void applyInitialWebkitScrollSnapPointsY(StyleResolver&);
+ static void applyInheritWebkitScrollSnapPointsY(StyleResolver&);
+#endif
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> static void resetEffectiveZoom(StyleResolver&);
</span><span class="lines">@@ -1693,6 +1699,28 @@
</span><span class="cx"> styleResolver.style()->setContentAltText(emptyAtom);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(CSS_SCROLL_SNAP)
+inline void StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX(StyleResolver& styleResolver)
+{
+ styleResolver.style()->setScrollSnapPointsX(nullptr);
+}
+
+inline void StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX(StyleResolver& styleResolver)
+{
+ styleResolver.style()->setScrollSnapPointsX(styleResolver.parentStyle()->scrollSnapPointsX() ? std::make_unique<ScrollSnapPoints>(*styleResolver.parentStyle()->scrollSnapPointsX()) : nullptr);
+}
+
+inline void StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY(StyleResolver& styleResolver)
+{
+ styleResolver.style()->setScrollSnapPointsY(nullptr);
+}
+
+inline void StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY(StyleResolver& styleResolver)
+{
+ styleResolver.style()->setScrollSnapPointsY(styleResolver.parentStyle()->scrollSnapPointsY() ? std::make_unique<ScrollSnapPoints>(*styleResolver.parentStyle()->scrollSnapPointsY()) : nullptr);
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // StyleBuilderCustom_h
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAxisScrollSnapOffsetscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp        2015-03-06 23:39:57 UTC (rev 181189)
</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">@@ -75,10 +75,10 @@
</span><span class="cx"> snapOffsetSubsequence.append(0);
</span><span class="cx">
</span><span class="cx"> bool isHorizontalAxis = axis == ScrollEventAxis::Horizontal;
</span><del>- auto& points = isHorizontalAxis ? style.scrollSnapPointsX() : style.scrollSnapPointsY();
</del><ins>+ auto* points = isHorizontalAxis ? style.scrollSnapPointsX() : style.scrollSnapPointsY();
</ins><span class="cx"> auto& destination = style.scrollSnapDestination();
</span><del>- bool hasRepeat = points.hasRepeat;
- LayoutUnit repeatOffset = valueForLength(points.repeatOffset, viewSize);
</del><ins>+ bool hasRepeat = points ? points->hasRepeat : false;
+ LayoutUnit repeatOffset = points ? valueForLength(points->repeatOffset, viewSize) : LayoutUnit();
</ins><span class="cx"> LayoutUnit destinationOffset = valueForLength(isHorizontalAxis ? destination.width() : destination.height(), viewSize);
</span><span class="cx"> LayoutUnit curSnapPositionShift = 0;
</span><span class="cx"> LayoutUnit maxScrollOffset = scrollSize - viewSize;
</span><span class="lines">@@ -130,19 +130,22 @@
</span><span class="cx"> Vector<LayoutUnit> horizontalSnapOffsetSubsequence;
</span><span class="cx"> Vector<LayoutUnit> verticalSnapOffsetSubsequence;
</span><span class="cx">
</span><del>- if (scrollingElementStyle.scrollSnapPointsX().usesElements || scrollingElementStyle.scrollSnapPointsY().usesElements) {
- bool shouldAddHorizontalChildOffsets = scrollingElementStyle.scrollSnapPointsX().usesElements && canComputeHorizontalOffsets;
- bool shouldAddVerticalChildOffsets = scrollingElementStyle.scrollSnapPointsY().usesElements && canComputeVerticalOffsets;
</del><ins>+ bool scrollSnapPointsXUsesElements = scrollingElementStyle.scrollSnapPointsX() ? scrollingElementStyle.scrollSnapPointsX()->usesElements : false;
+ bool scrollSnapPointsYUsesElements = scrollingElementStyle.scrollSnapPointsY() ? scrollingElementStyle.scrollSnapPointsY()->usesElements : false;
+
+ if (scrollSnapPointsXUsesElements || scrollSnapPointsYUsesElements) {
+ bool shouldAddHorizontalChildOffsets = scrollSnapPointsXUsesElements && canComputeHorizontalOffsets;
+ bool shouldAddVerticalChildOffsets = scrollSnapPointsYUsesElements && canComputeVerticalOffsets;
</ins><span class="cx"> appendChildSnapOffsets(scrollingElement, shouldAddHorizontalChildOffsets, horizontalSnapOffsetSubsequence, shouldAddVerticalChildOffsets, verticalSnapOffsetSubsequence);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!scrollingElementStyle.scrollSnapPointsX().usesElements && canComputeHorizontalOffsets) {
- for (auto& snapLength : scrollingElementStyle.scrollSnapPointsX().offsets)
</del><ins>+ if (scrollingElementStyle.scrollSnapPointsX() && !scrollSnapPointsXUsesElements && canComputeHorizontalOffsets) {
+ for (auto& snapLength : scrollingElementStyle.scrollSnapPointsX()->offsets)
</ins><span class="cx"> horizontalSnapOffsetSubsequence.append(valueForLength(snapLength, viewWidth));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!scrollingElementStyle.scrollSnapPointsY().usesElements && canComputeVerticalOffsets) {
- for (auto& snapLength : scrollingElementStyle.scrollSnapPointsY().offsets)
</del><ins>+ if (scrollingElementStyle.scrollSnapPointsY() && !scrollSnapPointsYUsesElements && canComputeVerticalOffsets) {
+ for (auto& snapLength : scrollingElementStyle.scrollSnapPointsY()->offsets)
</ins><span class="cx"> verticalSnapOffsetSubsequence.append(valueForLength(snapLength, viewHeight));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
</span><del>- * Copyright (C) 2004-2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2015 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="lines">@@ -1865,17 +1865,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><del>-
-ScrollSnapPoints RenderStyle::initialScrollSnapPointsX()
-{
- return ScrollSnapPoints();
-}
-
-ScrollSnapPoints RenderStyle::initialScrollSnapPointsY()
-{
- return ScrollSnapPoints();
-}
-
</del><span class="cx"> LengthSize RenderStyle::initialScrollSnapDestination()
</span><span class="cx"> {
</span><span class="cx"> return defaultScrollSnapDestination();
</span><span class="lines">@@ -1886,14 +1875,14 @@
</span><span class="cx"> return Vector<LengthSize>();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const ScrollSnapPoints& RenderStyle::scrollSnapPointsX() const
</del><ins>+const ScrollSnapPoints* RenderStyle::scrollSnapPointsX() const
</ins><span class="cx"> {
</span><del>- return rareNonInheritedData->m_scrollSnapPoints->xPoints;
</del><ins>+ return rareNonInheritedData->m_scrollSnapPoints->xPoints.get();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-const ScrollSnapPoints& RenderStyle::scrollSnapPointsY() const
</del><ins>+const ScrollSnapPoints* RenderStyle::scrollSnapPointsY() const
</ins><span class="cx"> {
</span><del>- return rareNonInheritedData->m_scrollSnapPoints->yPoints;
</del><ins>+ return rareNonInheritedData->m_scrollSnapPoints->yPoints.get();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const LengthSize& RenderStyle::scrollSnapDestination() const
</span><span class="lines">@@ -1906,16 +1895,16 @@
</span><span class="cx"> return rareNonInheritedData->m_scrollSnapPoints->coordinates;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderStyle::setScrollSnapPointsX(ScrollSnapPoints points)
</del><ins>+void RenderStyle::setScrollSnapPointsX(std::unique_ptr<ScrollSnapPoints> points)
</ins><span class="cx"> {
</span><del>- if (rareNonInheritedData->m_scrollSnapPoints->xPoints == points)
</del><ins>+ if (rareNonInheritedData->m_scrollSnapPoints->xPoints.get() == points.get())
</ins><span class="cx"> return;
</span><span class="cx"> rareNonInheritedData.access()->m_scrollSnapPoints.access()->xPoints = WTF::move(points);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderStyle::setScrollSnapPointsY(ScrollSnapPoints points)
</del><ins>+void RenderStyle::setScrollSnapPointsY(std::unique_ptr<ScrollSnapPoints> points)
</ins><span class="cx"> {
</span><del>- if (rareNonInheritedData->m_scrollSnapPoints->yPoints == points)
</del><ins>+ if (rareNonInheritedData->m_scrollSnapPoints->yPoints.get() == points.get())
</ins><span class="cx"> return;
</span><span class="cx"> rareNonInheritedData.access()->m_scrollSnapPoints.access()->yPoints = WTF::move(points);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -1080,8 +1080,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> ScrollSnapType scrollSnapType() const { return static_cast<ScrollSnapType>(rareNonInheritedData->m_scrollSnapType); }
</span><del>- const ScrollSnapPoints& scrollSnapPointsX() const;
- const ScrollSnapPoints& scrollSnapPointsY() const;
</del><ins>+ const ScrollSnapPoints* scrollSnapPointsX() const;
+ const ScrollSnapPoints* scrollSnapPointsY() const;
</ins><span class="cx"> const LengthSize& scrollSnapDestination() const;
</span><span class="cx"> const Vector<LengthSize>& scrollSnapCoordinates() const;
</span><span class="cx"> #endif
</span><span class="lines">@@ -1625,8 +1625,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> void setScrollSnapType(ScrollSnapType type) { SET_VAR(rareNonInheritedData, m_scrollSnapType, static_cast<unsigned>(type)); }
</span><del>- void setScrollSnapPointsX(ScrollSnapPoints);
- void setScrollSnapPointsY(ScrollSnapPoints);
</del><ins>+ void setScrollSnapPointsX(std::unique_ptr<ScrollSnapPoints>);
+ void setScrollSnapPointsY(std::unique_ptr<ScrollSnapPoints>);
</ins><span class="cx"> void setScrollSnapDestination(LengthSize);
</span><span class="cx"> void setScrollSnapCoordinates(Vector<LengthSize>);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1959,16 +1959,16 @@
</span><span class="cx"> static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSpecified; }
</span><span class="cx"> static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolutionNoSnap; }
</span><span class="cx"> static float initialImageResolution() { return 1; }
</span><del>- static StyleImage* initialBorderImageSource() { return 0; }
- static StyleImage* initialMaskBoxImageSource() { return 0; }
</del><ins>+ static StyleImage* initialBorderImageSource() { return nullptr; }
+ static StyleImage* initialMaskBoxImageSource() { return nullptr; }
</ins><span class="cx"> static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; }
</span><span class="cx"> static QuotesData* initialQuotes() { return nullptr; }
</span><span class="cx"> static const AtomicString& initialContentAltText() { return emptyAtom; }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> static ScrollSnapType initialScrollSnapType() { return ScrollSnapType::None; }
</span><del>- static ScrollSnapPoints initialScrollSnapPointsX();
- static ScrollSnapPoints initialScrollSnapPointsY();
</del><ins>+ static ScrollSnapPoints* initialScrollSnapPointsX() { return nullptr; }
+ static ScrollSnapPoints* initialScrollSnapPointsY() { return nullptr; }
</ins><span class="cx"> static LengthSize initialScrollSnapDestination();
</span><span class="cx"> static Vector<LengthSize> initialScrollSnapCoordinates();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleScrollSnapPointscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.cpp (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.cpp        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.cpp        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx">
</span><span class="cx"> inline StyleScrollSnapPoints::StyleScrollSnapPoints(const StyleScrollSnapPoints& other)
</span><span class="cx"> : RefCounted()
</span><del>- , xPoints(other.xPoints)
- , yPoints(other.yPoints)
</del><ins>+ , xPoints(other.xPoints ? std::make_unique<ScrollSnapPoints>(*other.xPoints) : nullptr)
+ , yPoints(other.yPoints ? std::make_unique<ScrollSnapPoints>(*other.yPoints) : nullptr)
</ins><span class="cx"> , destination(other.destination)
</span><span class="cx"> , coordinates(other.coordinates)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleScrollSnapPointsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.h (181188 => 181189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.h        2015-03-06 23:13:53 UTC (rev 181188)
+++ trunk/Source/WebCore/rendering/style/StyleScrollSnapPoints.h        2015-03-06 23:39:57 UTC (rev 181189)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx"> static Ref<StyleScrollSnapPoints> create() { return adoptRef(*new StyleScrollSnapPoints); }
</span><span class="cx"> Ref<StyleScrollSnapPoints> copy() const;
</span><span class="cx">
</span><del>- ScrollSnapPoints xPoints;
- ScrollSnapPoints yPoints;
</del><ins>+ std::unique_ptr<ScrollSnapPoints> xPoints;
+ std::unique_ptr<ScrollSnapPoints> yPoints;
</ins><span class="cx"> LengthSize destination;
</span><span class="cx"> Vector<LengthSize> coordinates;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>