Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: tools/perf/page_sets/snappoints_cases/1000_snap_elements.html

Issue 1333323003: SnapManager implementation using V8 Extras - {WIP} Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update with latest master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/page_sets/snappoints_cases.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « tools/perf/page_sets/snappoints_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698