WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-142358-20150305211202.patch (text/plain), 17.16 KB, created by
Brent Fulgham
on 2015-03-05 21:12:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2015-03-05 21:12:22 PST
Size:
17.16 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 181136) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2015-03-05 Brent Fulgham <bfulgham@apple.com> >+ >+ Create a set of scroll snap point tests >+ https://bugs.webkit.org/show_bug.cgi?id=142358 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a set of tests to exercise the snap and gliding behavior of overflow >+ regions with sroll snap points defined. >+ >+ * css3/scroll-snap/scroll-snap-mandatory-horizontal-expected.txt: Added. >+ * css3/scroll-snap/scroll-snap-mandatory-horizontal.html: Added. >+ * css3/scroll-snap/scroll-snap-mandatory-vertical-expected.txt: Added. >+ * css3/scroll-snap/scroll-snap-mandatory-vertical.html: Added. >+ * platform/efl/TestExpectations: >+ * platform/gtk/TestExpectations: >+ * platform/mac-wk2/css3/scroll-snap: Added. >+ * platform/win/TestExpectations: >+ > 2015-03-05 Brent Fulgham <bfulgham@apple.com> > > [Win] Give up on Attachment testing. >Index: LayoutTests/css3/scroll-snap/scroll-snap-mandatory-horizontal-expected.txt >=================================================================== >--- LayoutTests/css3/scroll-snap/scroll-snap-mandatory-horizontal-expected.txt (revision 0) >+++ LayoutTests/css3/scroll-snap/scroll-snap-mandatory-horizontal-expected.txt (working copy) >@@ -0,0 +1,11 @@ >+Tests that a scrollable div honors snap points. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+PASS div scrolled to next window. >+PASS div honored snap points. >+ >Index: LayoutTests/css3/scroll-snap/scroll-snap-mandatory-horizontal.html >=================================================================== >--- LayoutTests/css3/scroll-snap/scroll-snap-mandatory-horizontal.html (revision 0) >+++ LayoutTests/css3/scroll-snap/scroll-snap-mandatory-horizontal.html (working copy) >@@ -0,0 +1,145 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+ <head> >+ <style> >+ .horizontalGallery { >+ width: 400px; >+ height: 400px; >+ overflow-y: hidden; >+ overflow-x: auto; >+ -webkit-scroll-snap-points-x: repeat(100%); >+ -webkit-scroll-snap-type: mandatory; >+ } >+ .horizontalGalleryDrawer { >+ width: 3000px; >+ height: 400px; >+ } >+ .colorBox { >+ height: 400px; >+ width: 400px; >+ float: left; >+ /*-webkit-scroll-snap-coordinate: 50% 50%;*/ >+ } >+ #item0 { >+ background-color: #FF0000; >+ } >+ #item1 { >+ background-color: #00FF00; >+ } >+ #item2 { >+ background-color: #0000FF; >+ } >+ #item3 { >+ background-color: #00FFFF; >+ } >+ #item4 { >+ background-color: #FFFF00; >+ } >+ #item5 { >+ background-color: #FF00FF; >+ } >+ </style> >+ <script src="../../resources/js-test-pre.js"></script> >+ <script> >+ var divTarget; >+ var divScrollPositionBeforeGlide; >+ var divScrollPositionBeforeSnap; >+ var continueCount = 5; >+ >+ function checkForScrollSnap() { >+ >+ // The div should have snapped back to the previous position >+ if (divTarget.scrollLeft != divScrollPositionBeforeSnap) >+ testFailed("div did not snap back to proper location."); >+ else >+ testPassed("div honored snap points."); >+ >+ testRunner.notifyDone(); >+ } >+ >+ function scrollSnapTest() { >+ // See where our div lives: >+ pageScrollPositionBefore = document.body.scrollLeft; >+ >+ divTarget = document.getElementById('target'); >+ >+ divScrollPositionBeforeSnap = divTarget.scrollLeft; >+ >+ var startPosX = divTarget.offsetLeft + 20; >+ var startPosY = divTarget.offsetTop + 20; >+ eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true); >+ setTimeout(checkForScrollSnap, 1000); >+ } >+ >+ function checkForScrollGlide() { >+ // The div should not have scrolled (glided) to the next snap point. >+ if (divTarget.scrollLeft == 400) >+ testPassed("div scrolled to next window."); >+ else >+ testFailed("div did not honor snap points."); >+ >+ setTimeout(scrollSnapTest, 100); >+ } >+ >+ function scrollGlideTest() { >+ divTarget = document.getElementById('target'); >+ >+ divScrollPositionBeforeGlide = divTarget.scrollLeft; >+ >+ var startPosX = divTarget.offsetLeft + 20; >+ var startPosY = divTarget.offsetTop + 20; >+ eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true); >+ setTimeout(checkForScrollGlide, 1000); >+ } >+ >+ function onLoad() { >+ >+ if (window.eventSender) { >+ testRunner.waitUntilDone(); >+ >+ setTimeout(scrollGlideTest, 100); >+ } else { >+ var messageLocation = document.getElementById('console'); >+ var message = document.createElement('div'); >+ message.innerHTML = "<p>This test is better run under WebKitTestRunner. To manually test it, place the mouse pointer<br/>" >+ + "inside the red region at the top of the page, and then use the mouse wheel or a two-finger swipe to make a<br/>" >+ + "small swipe gesture with some momentum.<br/><br/>" >+ + "The region should scroll to show a green region.<br/><br/>" >+ + "Next, perform a small scroll gesture that does not involve momentum. You should begin to see one of the colors<br/>" >+ + "to the left (or right) of the current green box. When you release the wheel, the region should scroll back so<br/>" >+ + "that the region is a single color.</p>"; >+ messageLocation.appendChild(message); >+ } >+ } >+ </script> >+ </head> >+ <body onload="onLoad();"> >+ <div id="target" class="horizontalGallery"> >+ <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="console"></div> >+ <script> >+ description("Tests that a horizontal scrollable div honors snap points."); >+ </script> >+ <script src="../../resources/js-test-post.js"></script> >+ </body> >+</html> >+ >Index: LayoutTests/css3/scroll-snap/scroll-snap-mandatory-vertical-expected.txt >=================================================================== >--- LayoutTests/css3/scroll-snap/scroll-snap-mandatory-vertical-expected.txt (revision 0) >+++ LayoutTests/css3/scroll-snap/scroll-snap-mandatory-vertical-expected.txt (working copy) >@@ -0,0 +1,11 @@ >+Tests that a scrollable div honors snap points. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+PASS div scrolled to next window. >+PASS div honored snap points. >+ >Index: LayoutTests/css3/scroll-snap/scroll-snap-mandatory-vertical.html >=================================================================== >--- LayoutTests/css3/scroll-snap/scroll-snap-mandatory-vertical.html (revision 0) >+++ LayoutTests/css3/scroll-snap/scroll-snap-mandatory-vertical.html (working copy) >@@ -0,0 +1,146 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+ <head> >+ <style> >+ .verticalGallery { >+ width: 400px; >+ height: 400px; >+ display: inline-block; >+ overflow-x: hidden; >+ overflow-y: auto; >+ -webkit-scroll-snap-points-y: repeat(100%); >+ -webkit-scroll-snap-type: mandatory; >+ } >+ .verticalGalleryDrawer { >+ width: 400px; >+ height: 3000px; >+ } >+ .colorBox { >+ height: 400px; >+ width: 400px; >+ float: left; >+ /*-webkit-scroll-snap-coordinate: 50% 50%;*/ >+ } >+ #item0 { >+ background-color: #FF0000; >+ } >+ #item1 { >+ background-color: #00FF00; >+ } >+ #item2 { >+ background-color: #0000FF; >+ } >+ #item3 { >+ background-color: #00FFFF; >+ } >+ #item4 { >+ background-color: #FFFF00; >+ } >+ #item5 { >+ background-color: #FF00FF; >+ } >+ </style> >+ <script src="../../resources/js-test-pre.js"></script> >+ <script> >+ var divTarget; >+ var divScrollPositionBeforeGlide; >+ var divScrollPositionBeforeSnap; >+ var continueCount = 5; >+ >+ function checkForScrollSnap() { >+ >+ // The div should have snapped back to the previous position >+ if (divTarget.scrollTop != divScrollPositionBeforeSnap) >+ testFailed("div did not snap back to proper location."); >+ else >+ testPassed("div honored snap points."); >+ >+ testRunner.notifyDone(); >+ } >+ >+ function scrollSnapTest() { >+ // See where our div lives: >+ pageScrollPositionBefore = document.body.scrollTop; >+ >+ divTarget = document.getElementById('target'); >+ >+ divScrollPositionBeforeSnap = divTarget.scrollTop; >+ >+ var startPosX = divTarget.offsetLeft + 20; >+ var startPosY = divTarget.offsetTop + 20; >+ eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true); >+ setTimeout(checkForScrollSnap, 1000); >+ } >+ >+ function checkForScrollGlide() { >+ // The div should not have scrolled (glided) to the next snap point. >+ if (divTarget.scrollTop == 400) >+ testPassed("div scrolled to next window."); >+ else >+ testFailed("div did not honor snap points."); >+ >+ setTimeout(scrollSnapTest, 100); >+ } >+ >+ function scrollGlideTest() { >+ divTarget = document.getElementById('target'); >+ >+ divScrollPositionBeforeGlide = divTarget.scrollTop; >+ >+ var startPosX = divTarget.offsetLeft + 20; >+ var startPosY = divTarget.offsetTop + 20; >+ eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true); >+ setTimeout(checkForScrollGlide, 1000); >+ } >+ >+ function onLoad() { >+ >+ if (window.eventSender) { >+ testRunner.waitUntilDone(); >+ >+ setTimeout(scrollGlideTest, 100); >+ } else { >+ var messageLocation = document.getElementById('console'); >+ var message = document.createElement('div'); >+ message.innerHTML = "<p>This test is better run under WebKitTestRunner. To manually test it, place the mouse pointer<br/>" >+ + "inside the red region at the top of the page, and then use the mouse wheel or a two-finger swipe to make a<br/>" >+ + "small swipe gesture with some momentum.<br/><br/>" >+ + "The region should scroll to show a green region.<br/><br/>" >+ + "Next, perform a small scroll gesture that does not involve momentum. You should begin to see one of the colors<br/>" >+ + "to the top (or bottom) of the current green box. When you release the wheel, the region should scroll back so<br/>" >+ + "that the region is a single color.</p>"; >+ messageLocation.appendChild(message); >+ } >+ } >+ </script> >+ </head> >+ <body onload="onLoad();"> >+ <div id="target" class="verticalGallery"> >+ <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 id="console"></div> >+ <script> >+ description("Tests that a vertical scrollable div honors snap points."); >+ </script> >+ <script src="../../resources/js-test-post.js"></script> >+ </body> >+</html> >+ >Index: LayoutTests/platform/efl/TestExpectations >=================================================================== >--- LayoutTests/platform/efl/TestExpectations (revision 181136) >+++ LayoutTests/platform/efl/TestExpectations (working copy) >@@ -59,6 +59,9 @@ media/media-captions.html > fast/dom/Window/slow-unload-handler.html > fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html > >+# Need a scroll snap point implementation >+css3/scroll-snap [ Skip ] >+ > # ---------------------------------------- > # Tests which also fail in other platforms > # ---------------------------------------- >Index: LayoutTests/platform/gtk/TestExpectations >=================================================================== >--- LayoutTests/platform/gtk/TestExpectations (revision 181136) >+++ LayoutTests/platform/gtk/TestExpectations (working copy) >@@ -620,7 +620,8 @@ webkit.org/b/142291 fast/clip/clip-when- > webkit.org/b/142291 fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html [ ImageOnlyFailure ] > webkit.org/b/142291 fast/regions/repaint/fixed-in-named-flow-cb-changed.html [ ImageOnlyFailure ] > >- >+# TODO Scroll snap points >+css3/scroll-snap [ Skip ] > #//////////////////////////////////////////////////////////////////////////////////////// > # End of Expected failures > #//////////////////////////////////////////////////////////////////////////////////////// >Index: LayoutTests/platform/win/TestExpectations >=================================================================== >--- LayoutTests/platform/win/TestExpectations (revision 181136) >+++ LayoutTests/platform/win/TestExpectations (working copy) >@@ -591,6 +591,9 @@ webkit.org/b/35013 svg/zoom/text/ [ Skip > > # TODO Attachment elements do not provide a custom renderer > webkit.org/b/142260 fast/attachment [ Skip ] >+ >+# TODO Scroll snap points >+css3/scroll-snap [ Skip ] > ################################################################################ > ########### End Missing Functionality Prevents Testing ############## > ################################################################################
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 142358
:
248036
|
248037
|
248039
|
248040
|
248042
|
248046
|
248047
|
248068
|
252211