Index: tools/perf/page_sets/snappoints_cases/1000_snap_elements.html |
diff --git a/tools/perf/page_sets/snappoints_cases/1000_snap_elements.html b/tools/perf/page_sets/snappoints_cases/1000_snap_elements.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1f9a0a6bbe3ebecaf658324e1c3882a626c20ca2 |
--- /dev/null |
+++ b/tools/perf/page_sets/snappoints_cases/1000_snap_elements.html |
@@ -0,0 +1,44 @@ |
+<style> |
+body { |
+ width: 100%; |
+ height: 100%; |
+ overflow-x: auto; |
+ overflow-y: auto; |
+ |
+ /* Specifies that each element’s snap coordinate should |
+ align with the center of the scroll container */ |
+ scroll-snap-destination: 50% 50%; |
+ -ms-scroll-snap-destination: 50% 50%; |
+ -webkit-scroll-snap-destination: 50% 50%; |
+ |
+ /* Requires that scrolling always end at a snap point |
+ when the operation completes (hard snap). */ |
+ scroll-snap-type: mandatory; |
+ -webkit-scroll-snap-type: mandatory; |
+ -ms-scroll-snap-type: mandatory; |
+ |
+ /* This is a webkit quirk */ |
+ -webkit-scroll-snap-points-x: elements; |
+ -ms-scroll-snap-points-x: elements; |
+ |
+ -webkit-overflow-scrolling: touch; |
+} |
+ |
+body > div { |
+ width: 300px; |
+ height: 300px; |
+ background-color: green; |
+ margin: 10px; |
+ |
+ scroll-snap-coordinate: 50% 50%; |
+ -ms-scroll-snap-coordinate: 50% 50%; |
+ -webkit-scroll-snap-coordinate: 50% 50%; |
+} |
+</style> |
+<body></body> |
+<script> |
+ var SNAP_ELEMENT_NO = 1000; |
+ for (var i = 0; i < SNAP_ELEMENT_NO; i++) { |
+ document.body.appendChild(document.createElement('div')); |
+ } |
+</script> |