Title: [190486] branches/safari-601-branch
- Revision
- 190486
- Author
- [email protected]
- Date
- 2015-10-02 06:56:14 -0700 (Fri, 02 Oct 2015)
Log Message
Merge r187210. rdar://problem/22801995
Modified Paths
Added Paths
Diff
Modified: branches/safari-601-branch/LayoutTests/ChangeLog (190485 => 190486)
--- branches/safari-601-branch/LayoutTests/ChangeLog 2015-10-02 13:56:05 UTC (rev 190485)
+++ branches/safari-601-branch/LayoutTests/ChangeLog 2015-10-02 13:56:14 UTC (rev 190486)
@@ -1,3 +1,19 @@
+2015-10-02 Matthew Hanson <[email protected]>
+
+ Merge r187210. rdar://problem/22801995
+
+ 2015-07-22 Wenson Hsieh <[email protected]>
+
+ Coordinates-based snap offsets don't update correctly when container is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=147215
+
+ Reviewed by Brent Fulgham.
+
+ Tests that snap offsets update properly on scrolled containers.
+
+ * css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt: Added.
+ * css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html: Added.
+
2015-09-12 Alexey Proskuryakov <[email protected]>
Re-add Mavericks result with the correct path.
Added: branches/safari-601-branch/LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt (0 => 190486)
--- branches/safari-601-branch/LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt (rev 0)
+++ branches/safari-601-branch/LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt 2015-10-02 13:56:14 UTC (rev 190486)
@@ -0,0 +1,9 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Scroll-snap offsets: vertical = { 0, 400, 800, 1200, 1600, 2000 }
+Scroll-snap offsets: vertical = { 0, 400, 800, 1200, 1600, 2000 }
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-601-branch/LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html (0 => 190486)
--- branches/safari-601-branch/LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html 2015-10-02 13:56:14 UTC (rev 190486)
@@ -0,0 +1,60 @@
+<html>
+
+<head>
+ <style>
+ #container {
+ width: 420px;
+ height: 400px;
+ overflow-y: scroll;
+ -webkit-scroll-snap-type: mandatory;
+ }
+
+ .cell {
+ width: 400px;
+ height: 400px;
+ -webkit-scroll-snap-coordinate: 0% 0%;
+ }
+ </style>
+ <script src=""
+ <script>
+ function setup()
+ {
+ var container = document.getElementById("container");
+
+ function dumpSnapOffsetsAndFinishTest()
+ {
+ debug("Scroll-snap offsets: " + window.internals.scrollSnapOffsets(container));
+ finishJSTest();
+ }
+
+ function dumpSnapOffsetsAndResizeElement()
+ {
+ debug("Scroll-snap offsets: " + window.internals.scrollSnapOffsets(container));
+ container.style.width = "425px";
+ setTimeout(dumpSnapOffsetsAndFinishTest, 0);
+ }
+
+ container.scrollTop = 800;
+ if (window.testRunner) {
+ window.jsTestIsAsync = true;
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ setTimeout(dumpSnapOffsetsAndResizeElement, 0);
+ }
+ }
+ </script>
+</head>
+
+<body _onload_="setup()">
+ <div id="container">
+ <div class="cell"><div id="console"></div></div>
+ <div class="cell"></div>
+ <div class="cell"></div>
+ <div class="cell"></div>
+ <div class="cell"></div>
+ <div class="cell"></div>
+ </div>
+ <script src=""
+</body>
+
+</html>
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (190485 => 190486)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-10-02 13:56:05 UTC (rev 190485)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-10-02 13:56:14 UTC (rev 190486)
@@ -1,5 +1,26 @@
2015-10-02 Matthew Hanson <[email protected]>
+ Merge r187210. rdar://problem/22801995
+
+ 2015-07-22 Wenson Hsieh <[email protected]>
+
+ Coordinates-based snap offsets don't update correctly when container is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=147215
+
+ Reviewed by Brent Fulgham.
+
+ Fixes the way we append the snap offsets of child elements with coordinates. We
+ now consider the scroll offset of the parent scroll snapping container, so snap
+ offset recomputations don't fail on scroll snapping containers.
+
+ Test: css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html
+
+ * page/scrolling/AxisScrollSnapOffsets.cpp:
+ (WebCore::appendChildSnapOffsets): Fixed to consider the scroll offset of the
+ parent container.
+
+2015-10-02 Matthew Hanson <[email protected]>
+
Merge r187145. rdar://problem/22801952
2015-07-21 Joseph Pecoraro <[email protected]>
Modified: branches/safari-601-branch/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp (190485 => 190486)
--- branches/safari-601-branch/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp 2015-10-02 13:56:05 UTC (rev 190485)
+++ branches/safari-601-branch/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp 2015-10-02 13:56:14 UTC (rev 190486)
@@ -60,7 +60,7 @@
continue;
LayoutRect viewSize = box->contentBoxRect();
- FloatPoint position = box->localToContainerPoint(FloatPoint(), parent.renderBox());
+ FloatPoint position = box->localToContainerPoint(FloatPoint(parent.renderBox()->scrollLeft(), parent.renderBox()->scrollTop()), parent.renderBox());
for (auto& coordinate : scrollSnapCoordinates) {
LayoutUnit lastPotentialSnapPositionX = position.x() + valueForLength(coordinate.width(), viewSize.width());
if (shouldAddHorizontalChildOffsets && lastPotentialSnapPositionX > 0)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes