Implement the updated port/area-based Scroll Snap Module Level 1 Spec
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 18:44:38 +0000 (18:44 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 18:44:38 +0000 (18:44 +0000)
commit0edb61f8d7946a1572d1dc6f513627ec300b8a47
treea56983e6ae9d79af672a7e9b7af8ae1acb5aedab
parent10beb32fcce3d8e6cf4b4624b321fc2b43ee1ba9
Implement the updated port/area-based Scroll Snap Module Level 1 Spec
https://bugs.webkit.org/show_bug.cgi?id=165317
<rdar://problem/29490956>

Reviewed by Dean Jackson.

Source/WebCore:

Implements the changes drafted in the latest iteration of the Scroll Snap Module Level 1 spec, which uses a
snap-area and snap-port-based method for determining snap positions in a scroll snapping container.
Additionally, removes the now-obsolete and prefixed implementation of the scroll snap spec and refactors all
affected layout tests to use the new CSS properties. Also adds new layout tests covering some behaviors detailed
in the new version of the spec, such as scroll snapping with transformed child elements.

See below for more detailed descriptions of the changes.

Tests: css3/scroll-snap/scroll-snap-2d-change-axis-type.html
       css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html
       css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html
       css3/scroll-snap/scroll-snap-children-with-transforms.html
       css3/scroll-snap/scroll-snap-positions-mainframe.html
       css3/scroll-snap/scroll-snap-positions-overflow-resize.html
       css3/scroll-snap/scroll-snap-positions.html
       css3/scroll-snap/scroll-snap-style-changed-align.html
       css3/scroll-snap/scroll-snap-with-scroll-padding.html

* WebCore.xcodeproj/project.pbxproj:
* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):

Removed use of length repeat.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForScrollSnapType):
(WebCore::valueForScrollSnapAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::scrollSnapDestination): Deleted.
(WebCore::scrollSnapPoints): Deleted.
(WebCore::scrollSnapCoordinates): Deleted.

Removed helper functions used to create CSS values for scroll snap coordinates and destination, and added
helpers for computed scroll snap type (a combination of axis and strictness values) as well as scroll snap align
(an alignment value per axis).

* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):

Removed usages of the length repeat type, since repeat(*) is no longer being used anywhere.

* css/CSSPrimitiveValue.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ScrollSnapStrictness):
(WebCore::CSSPrimitiveValue::operator ScrollSnapAxis):
(WebCore::CSSPrimitiveValue::operator ScrollSnapAxisAlignType):
(WebCore::CSSPrimitiveValue::operator ScrollSnapType): Deleted.

Added CSSPrimitiveValue mappings to ScrollSnapAxisAlignType, ScrollSnapStrictness, and ScrollSnapAxis. Removed
the old ScrollSnapType mapping.

* css/CSSProperties.json:

Replaced the old scroll snap CSS properties with the new ones. Note that scroll-snap-margin and scroll-padding
have 4 shorthands each, for the individual top/bottom/left/right values.

* css/CSSValueKeywords.in:

Added CSS keywords {x, y}, which are necessary to support the new scroll snapping properties.

* css/LengthRepeat.h: Removed.

Removed LengthRepeat entirely. This represented the `repeat(<length>)` CSS value, which was only used for the
scroll-snap-points-x and scroll-snap-points-y values.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertScrollSnapType):
(WebCore::StyleBuilderConverter::convertScrollSnapAlign):
(WebCore::StyleBuilderConverter::parseSnapCoordinate): Deleted.
(WebCore::StyleBuilderConverter::convertScrollSnapPoints): Deleted.
(WebCore::StyleBuilderConverter::convertSnapCoordinatePair): Deleted.
(WebCore::StyleBuilderConverter::convertScrollSnapCoordinates): Deleted.

Added helper functions to convert scroll snap type and scroll snap alignment from parsed CSS values to their
primary representation in WebCore as ScrollSnapType and ScrollSnapAlign. These methods assume that the given
CSS values have successfully cleared the parsing step and are represented as CSSValueLists or length 1 or 2.

* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Deleted.
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Deleted.
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):

Adds support for the scroll-snap-margin and scroll-padding.

* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
(WebCore::isScrollSnapAxisAlign):
(WebCore::isScrollSnapStrictness):
(WebCore::CSSParser::parseScrollSnapAlign):
(WebCore::CSSParser::parseScrollSnapType):
(WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
(WebCore::CSSParser::parseScrollSnapPositions): Deleted.
(WebCore::CSSParser::parseScrollSnapDestination): Deleted.
(WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.
* css/parser/CSSParser.h:

Removed references to LengthRepeat, and added support for parsing new scroll snapping properties. Scroll snap
margin and scroll padding, along with their shorthands, are parsed using the same helper functions as normal
margin and padding. For type and align, I added new helper functions that build up lists of 1 or 2
CSSPrimitiveValues for each of the properties.

Parsing scroll-snap-align is straightforward -- we either have one or two values in the set {none, start,
center, end}. For scroll-snap-type, we allow a single axis value {x, y, inline, block, both}, or a single
strictness value {none, proximity, mandatory}, or an axis value followed by a non-'none' strictness (i.e. either
proximity or mandatory).

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue):

Removed references to LengthRepeat.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):
(WebCore::consumeSnapPointCoordinateList): Deleted.
(WebCore::consumeScrollSnapCoordinate): Deleted.
(WebCore::consumeScrollSnapDestination): Deleted.
(WebCore::consumeScrollSnapPoints): Deleted.
(WebCore::consumeScrollSnapAlign):
(WebCore::consumeScrollSnapType):
(WebCore::CSSPropertyParser::parseSingleValue):

Added parsing for the longhand properties of scroll-snap-margin and scroll-padding, which use the existing
consumeLength and consumeLengthOrPercent helpers, respectively. Removed code for parsing scroll snap
coordinates, destinations and points. Added parsing logic for align and type.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::computeScrollSnapPortOrAreaRect):
(WebCore::computeScrollSnapAlignOffset):
(WebCore::snapOffsetsToString):
(WebCore::snapPortOrAreaToString):
(WebCore::updateSnapOffsetsForScrollableArea):
(WebCore::appendChildSnapOffsets): Deleted.
(WebCore::destinationOffsetForViewSize): Deleted.
(WebCore::updateFromStyle): Deleted.
(WebCore::styleUsesElements): Deleted.

Overhauled updateSnapOffsetsForScrollableArea to work with the new scroll snapping model. In the new way of
computing scroll snap offsets, we:

Compute the scroll container's scroll snap port, which is the padding box inset by the scroll padding
For each child with snap positions (i.e. scroll-snap-align is not none on both axes)
  Compute the child's scroll snap area, which is the bounding box of the transformed border box
    If the container snaps along the horizontal axis and the snap area contributes a horizontal snap offset:
      Emit the distance from the alignment offset in the horizontal of the snap port to the corresponding offset
      in the snap area as a snap position.
    If the container snaps along the vertical axis and the snap area contributes a vertical snap offset:
      Emit the distance from the alignment offset in the vertical of the snap port to the corresponding offset
      in the snap area as a snap position.
For the snap offsets in each axis, if there is at least one snap offset:
  Clamp the offsets to the min and max scroll offsets
  Ensure that the offsets are sorted and do not contain duplicated offsets

* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::updateScrollSnapState):

Clear out the ScrollController's snap offsets and state along an axis when its ScrollableArea no longer has snap
offsets in that axis.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
(WebCore::RenderBox::willBeRemovedFromTree):
* rendering/RenderLayerModelObject.cpp:
(WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate):
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderView.cpp:
(WebCore::RenderView::registerBoxWithScrollSnapPositions):
(WebCore::RenderView::unregisterBoxWithScrollSnapPositions):
(WebCore::RenderView::registerBoxWithScrollSnapCoordinates): Deleted.
(WebCore::RenderView::unregisterBoxWithScrollSnapCoordinates): Deleted.
* rendering/RenderView.h:

Tweaked the scroll snap child registration logic. registerBoxWithScrollSnapCoordinates is renamed to
unregisterBoxWithScrollSnapPositions, since the notion of scroll snap coordinates no longer exists, and instead
of checking if the list of scroll snap coordinates is empty for the absence of scroll positions, we instead
check for a computed scroll snap align that is not none on both axes.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::initialScrollSnapType):
(WebCore::RenderStyle::initialScrollSnapAlign):
(WebCore::RenderStyle::scrollSnapArea):
(WebCore::RenderStyle::scrollSnapPort):
(WebCore::RenderStyle::scrollSnapType):
(WebCore::RenderStyle::scrollPadding):
(WebCore::RenderStyle::scrollPaddingTop):
(WebCore::RenderStyle::scrollPaddingBottom):
(WebCore::RenderStyle::scrollPaddingLeft):
(WebCore::RenderStyle::scrollPaddingRight):
(WebCore::RenderStyle::scrollSnapAlign):
(WebCore::RenderStyle::scrollSnapMargin):
(WebCore::RenderStyle::scrollSnapMarginTop):
(WebCore::RenderStyle::scrollSnapMarginBottom):
(WebCore::RenderStyle::scrollSnapMarginLeft):
(WebCore::RenderStyle::scrollSnapMarginRight):
(WebCore::RenderStyle::setScrollSnapType):
(WebCore::RenderStyle::setScrollPaddingTop):
(WebCore::RenderStyle::setScrollPaddingBottom):
(WebCore::RenderStyle::setScrollPaddingLeft):
(WebCore::RenderStyle::setScrollPaddingRight):
(WebCore::RenderStyle::setScrollSnapAlign):
(WebCore::RenderStyle::setScrollSnapMarginTop):
(WebCore::RenderStyle::setScrollSnapMarginBottom):
(WebCore::RenderStyle::setScrollSnapMarginLeft):
(WebCore::RenderStyle::setScrollSnapMarginRight):
(WebCore::RenderStyle::initialScrollSnapDestination): Deleted.
(WebCore::RenderStyle::initialScrollSnapCoordinates): Deleted.
(WebCore::RenderStyle::scrollSnapPointsX): Deleted.
(WebCore::RenderStyle::scrollSnapPointsY): Deleted.
(WebCore::RenderStyle::scrollSnapDestination): Deleted.
(WebCore::RenderStyle::scrollSnapCoordinates): Deleted.
(WebCore::RenderStyle::setScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::setScrollSnapPointsY): Deleted.
(WebCore::RenderStyle::setScrollSnapDestination): Deleted.
(WebCore::RenderStyle::setScrollSnapCoordinates): Deleted.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialScrollSnapMargin):
(WebCore::RenderStyle::initialScrollPadding):
(WebCore::RenderStyle::scrollSnapType): Deleted.
(WebCore::RenderStyle::setScrollSnapType): Deleted.
(WebCore::RenderStyle::initialScrollSnapType): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.

Added boilerplate code for returning various new scroll snap style properties, and removed similar code for
handling the old scroll snap properties.

* rendering/style/RenderStyleConstants.h:

Added three new enum classes:
- ScrollSnapStrictness represents the strictness of scroll snapping along one or both axes
- ScrollSnapAxis designates the axes along which scroll snapping should occur
- ScrollSnapAxisAlignType indicates which offsets along the x or y axes of the snap port and snap area should be
  used to compute the snap position emitted by a snap area.

* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

Replaces the StyleScrollSnapPoints object (which, confusingly, was in charge of storing both the scroll
container's and child elements' scroll snap styles) with StyleScrollSnapPort and StyleScrollSnapArea objects,
which keep track of the style properties on the scroll container and the child element, respectively.

* rendering/style/StyleScrollSnapPoints.h:
(WebCore::operator==):
(WebCore::StyleScrollSnapPort::copy):
(WebCore::StyleScrollSnapPort::StyleScrollSnapPort):
(WebCore::StyleScrollSnapArea::copy):
(WebCore::StyleScrollSnapArea::StyleScrollSnapArea):
* rendering/style/StyleScrollSnapping.h: Added.
(WebCore::operator!=):
(WebCore::StyleScrollSnapPort::create):
(WebCore::StyleScrollSnapArea::create):
(WebCore::StyleScrollSnapArea::hasSnapPosition):

Overhauled StyleScrollSnapPoints, breaking the logic here into two classes: StyleScrollSnapPort for the scroll
container, handling the properties `scroll-snap-type` and `scroll-padding` and StyleScrollSnapArea for child
elements, handling the properties `scroll-snap-align` and `scroll-snap-margin`. The ScrollSnapType itself is
composed of an axis value and a strictness, while a ScrollSnapAlign keeps track of the alignment modes in each
axis. By default, these are initialized to {Both, None} and {None, None}, respectively. The rest of the logic is
boilerplate code for comparing these style objects to one another and copying style representations.

* testing/Internals.cpp:
(WebCore::Internals::scrollSnapOffsets):

Perform a layout on the document if needed before returning the list of computed snap offsets. The absence of
this layout pass was causing some layout tests in css3/scroll-snap/ to flake when testing that programmatic
changes to the scroll snap style properties change the computed snap offsets.

Source/WebKit2:

Remove unused code for adopting scroll snapping in the PDF plugin.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::didCalculateSizes):

LayoutTests:

Refactors layout tests to use the new scroll snapping properties, removing any tests that only made sense in the
context of the old version of scroll snapping and adding new ones to cover behaviors that the existing tests do
not verify. See per-method descriptions for more details. In most cases, the old way of specifying scroll
snapping via repeat(<container width or length>) or a coordinate at (0, 0) on each child has been replaced with
`scroll-snap-type: (x|y|both) mandatory;` on the container and `scroll-snap-align: start` on each child element.
If a test below does not have an accompanying description, then this is the only change applied to it, and the
behavior it is testing is still relevant in the new scroll snapping model.

* css3/scroll-snap/improper-snap-points-crash-expected.txt: Removed.
* css3/scroll-snap/improper-snap-points-crash.html: Removed.

This test is no longer valid in the new scroll snapping model, since there is no way to specify both repeating
points along an axis and child elements with scroll snap coordinates.

* css3/scroll-snap/nested-elements-expected.txt:
* css3/scroll-snap/nested-elements.html:
* css3/scroll-snap/resources/iframe-content.html:
* css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt: Added.
* css3/scroll-snap/scroll-snap-2d-change-axis-type.html: Added.

New layout test to check that changing the scroll-snap-type from one to both axes updates the computed snap
offsets in the container to have offsets from both axes.

* css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt: Added.
* css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html: Added.

New layout test to check that snap offsets are computed independently on each axis. In a 3x3 grid of child
elements with the child elements along the diagonal having `scroll-snap-align`s of `end`, `center` and `start`
in order from top left to bottom right, we should observe the same effect as having each child emit snap
positions in both axes.

* css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin-expected.txt: Added.
* css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html: Added.

New layout test to check that specifying a `scroll-snap-margin` correctly insets the scroll snap area of a child
element, and that changing the `scroll-snap-margin` via script also changes the computed scroll snap offsets.

* css3/scroll-snap/scroll-snap-children-with-transforms-expected.txt: Added.
* css3/scroll-snap/scroll-snap-children-with-transforms.html: Added.

New layout test to check that when computing the scroll snap areas of child elements, we take transforms into
account and use the bounding box of the transformed border box of the child element. Also verifies that we apply
the scroll offset _after_ the transform, so that scrolling the container and then recomputing snap offsets when
child elements are transformed does not result in different snap offsets.

* css3/scroll-snap/scroll-snap-coordinate-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-coordinate.html: Removed.

Renamed to scroll-snap-position.html, since the notion of scroll snap coordinates no longer exists.

* css3/scroll-snap/scroll-snap-desination-lock-up-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-desination-lock-up.html: Removed.

This test is no longer relevant in the new scroll snapping model. This is because the logic for computing scroll
snap offsets in AxisScrollSnapOffsets no longer has an opportunity to loop infinitely while trying to fill a
scrollable axis with snap offsets, since repeating snap points have been removed.

* css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html:
* css3/scroll-snap/scroll-snap-inherit-expected.txt:
* css3/scroll-snap/scroll-snap-inherit.html:

Updated to test the new scroll snap properties.

* css3/scroll-snap/scroll-snap-initial-expected.txt:
* css3/scroll-snap/scroll-snap-initial.html:

Updated to test the new scroll snap properties.

* css3/scroll-snap/scroll-snap-mismatch.html:
* css3/scroll-snap/scroll-snap-negative-repeat-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-negative-repeat.html: Removed.

Removed, since negative repeating scroll snap offsets are (thankfully) no longer possible in the new scroll
snapping model.

* css3/scroll-snap/scroll-snap-offsets-expected.txt:
* css3/scroll-snap/scroll-snap-offsets.html:

Augmented to mix in various alignment values among the scroll snap child elements as well as various levels of
nesting.

* css3/scroll-snap/scroll-snap-position-values-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-position-values.html: Removed.

The behaviors tested here are covered by other similar tests: scroll-snap-initial and scroll-snap-inherit.

* css3/scroll-snap/scroll-snap-positions-expected.txt: Added.
* css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-mainframe-expected.txt.
* css3/scroll-snap/scroll-snap-positions-mainframe.html: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-mainframe.html.
* css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt.
* css3/scroll-snap/scroll-snap-positions-overflow-resize.html: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html.
* css3/scroll-snap/scroll-snap-positions.html: Added.

Renamed these existing tests to not use the term `scroll-snap-coordinate`. The semantics of these tests are
still the same, only using different values of `scroll-snap-align` instead of `-webkit-scroll-snap-coordinate`.

* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
* css3/scroll-snap/scroll-snap-property-computed-style.js:
* css3/scroll-snap/scroll-snap-property-parsing-expected.txt:
* css3/scroll-snap/scroll-snap-property-parsing.js:
* css3/scroll-snap/scroll-snap-style-changed-align-expected.txt: Added.
* css3/scroll-snap/scroll-snap-style-changed-align.html: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-style-changed-coordinates.html.
* css3/scroll-snap/scroll-snap-style-changed-coordinates-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-style-changed-repeat-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-style-changed-repeat.html: Removed.

No longer relevant, since repeating scroll snap offsets are no longer in the spec.

* css3/scroll-snap/scroll-snap-subpixel-repeat-expected.txt: Removed.
* css3/scroll-snap/scroll-snap-subpixel-repeat.html: Removed.

No longer relevant, since repeating scroll snap offsets are no longer in the spec.

* css3/scroll-snap/scroll-snap-with-scroll-padding-expected.txt: Added.
* css3/scroll-snap/scroll-snap-with-scroll-padding.html: Added.

New layout test to check that specifying scroll padding on a scroll container correctly outsets the scroll snap
port, and that changing scroll padding via script also changes the computed snap offsets.

* platform/mac-wk2/TestExpectations:

Removed tiled-drawing/scrolling/latched-div-with-scroll-snap.html from the list of failing tests.

* tiled-drawing/scrolling/latched-div-with-scroll-snap-expected.txt:
* tiled-drawing/scrolling/latched-div-with-scroll-snap.html:

This test was failing 100% of the time due to the momentum portion of the scrolling phase being invoked after
scroll snapping has ended. This has been rewritten to perform the following steps:
1. Scroll the top div with momentum and verify that the scroll 'glided' to the red box.
2. Scroll the top div without momentum and verify that the scroll snaps back to the red box.
3. Repeat (1) and (2), but for the bottom div. The same thing should occur.

* tiled-drawing/scrolling/scroll-snap/resources/horizontal-mainframe.html:
* tiled-drawing/scrolling/scroll-snap/resources/vertical-mainframe.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-destination-lock-up-expected.txt: Removed.
* tiled-drawing/scrolling/scroll-snap/scroll-snap-destination-lock-up.html: Removed.
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.html:

All of the tests here were updated to use the new scroll-snap-* properties instead of the old versions. The
semantics of these tests have not changed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
101 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/scroll-snap/improper-snap-points-crash-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/improper-snap-points-crash.html [deleted file]
LayoutTests/css3/scroll-snap/nested-elements-expected.txt
LayoutTests/css3/scroll-snap/nested-elements.html
LayoutTests/css3/scroll-snap/resources/iframe-content.html
LayoutTests/css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-2d-change-axis-type.html [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-children-with-transforms-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-children-with-transforms.html [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-coordinate-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-coordinate.html [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-desination-lock-up-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-desination-lock-up.html [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html
LayoutTests/css3/scroll-snap/scroll-snap-inherit-expected.txt
LayoutTests/css3/scroll-snap/scroll-snap-inherit.html
LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt
LayoutTests/css3/scroll-snap/scroll-snap-initial.html
LayoutTests/css3/scroll-snap/scroll-snap-mismatch.html
LayoutTests/css3/scroll-snap/scroll-snap-negative-repeat-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-negative-repeat.html [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-offsets-expected.txt
LayoutTests/css3/scroll-snap/scroll-snap-offsets.html
LayoutTests/css3/scroll-snap/scroll-snap-position-values-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-position-values.html [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-positions-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt [moved from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-mainframe-expected.txt with 100% similarity]
LayoutTests/css3/scroll-snap/scroll-snap-positions-mainframe.html [moved from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-mainframe.html with 91% similarity]
LayoutTests/css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt [moved from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt with 100% similarity]
LayoutTests/css3/scroll-snap/scroll-snap-positions-overflow-resize.html [moved from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html with 93% similarity]
LayoutTests/css3/scroll-snap/scroll-snap-positions.html [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt
LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js
LayoutTests/css3/scroll-snap/scroll-snap-property-parsing-expected.txt
LayoutTests/css3/scroll-snap/scroll-snap-property-parsing.js
LayoutTests/css3/scroll-snap/scroll-snap-style-changed-align-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-style-changed-align.html [moved from LayoutTests/css3/scroll-snap/scroll-snap-style-changed-coordinates.html with 80% similarity]
LayoutTests/css3/scroll-snap/scroll-snap-style-changed-coordinates-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-style-changed-repeat-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-style-changed-repeat.html [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-subpixel-repeat-expected.txt [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-subpixel-repeat.html [deleted file]
LayoutTests/css3/scroll-snap/scroll-snap-with-scroll-padding-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-with-scroll-padding.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap-expected.txt
LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/resources/horizontal-mainframe.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/resources/vertical-mainframe.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-destination-lock-up-expected.txt [deleted file]
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-destination-lock-up.html [deleted file]
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.html
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/LengthRepeat.h [deleted file]
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/css/parser/CSSPropertyParser.cpp
Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp
Source/WebCore/platform/cocoa/ScrollController.mm
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderLayerModelObject.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h
Source/WebCore/rendering/style/StyleScrollSnapPoints.cpp
Source/WebCore/rendering/style/StyleScrollSnapPoints.h
Source/WebCore/testing/Internals.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm