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

Unified Diff: LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling.html

Issue 871013005: Notify ProgrammaticScrollAnimator about scroll layer destruction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 | « no previous file | LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling.html
diff --git a/LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling.html b/LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling.html
new file mode 100644
index 0000000000000000000000000000000000000000..bd743f2bf681d2ede7a501f057895eb1254e4515
--- /dev/null
+++ b/LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ #container {
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+ }
+
+ #content {
+ width: 7500px;
+ height: 7500px;
+ background-color: blue;
+ }
+ </style>
+ <script src="../../resources/js-test.js"></script>
+ <script type="text/javascript">
+ jsTestIsAsync = true;
+ description("This test checks that a smooth scroll finishes even when composited scrolling " +
+ "is lost during the animation.");
+
+ function startSmoothScroll() {
+ var scrollToOptions = {behavior: "smooth", top: 6000};
+ document.getElementById("container").scrollTo(scrollToOptions);
+ window.requestAnimationFrame(preventCompositedScrolling);
+ }
+
+ function preventCompositedScrolling() {
+ document.getElementById("container").style.borderRadius = "4px";
+ window.requestAnimationFrame(waitForSmoothScrollEnd);
+ }
+
+ function waitForSmoothScrollEnd() {
+ if (document.getElementById("container").scrollTop == 6000) {
+ testPassed("Scroll destination reached.");
+ finishJSTest();
+ } else {
+ window.requestAnimationFrame(waitForSmoothScrollEnd);
+ }
+ }
+
+ window.onload = function() {
+ if (window.internals) {
+ window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
+ }
+
+ window.requestAnimationFrame(startSmoothScroll);
+ }
+ </script>
+</head>
+
+<body>
+ <div id="container">
+ <div id="content"></div>
+ </div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/scroll-behavior/overflow-scroll-loses-composited-scrolling-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698