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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background.html

Issue 2196583002: Paint local background colors onto foreground layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate test related cleanups and comments. Created 4 years, 4 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 | third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background-and-child.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background.html b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background.html
new file mode 100644
index 0000000000000000000000000000000000000000..6dc6ab4a3803926001355062c47b297730883a16
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background.html
@@ -0,0 +1,37 @@
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+onload = function() {
+ // Double rAF to ensure content is painted before scroll.
+ requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ document.getElementById('scroller').scrollTo(0, 200);
+ if (window.testRunner)
+ window.testRunner.notifyDone();
+ })
+ });
+}
+</script>
+<style>
+#scroller {
+ background: gray local content-box;
+ border: 10px solid rgba(0, 255, 0, 0.5);
+ overflow: scroll;
+ padding: 10px;
+ width: 200px;
+ height: 200px;
+ will-change: transform;
+}
+
+.spacer {
+ height: 300px;
+}
+</style>
+<!-- #scroller has a locally attached background with padding so when it is
+ scrolled we can see the background slide up. Doing this on a composited
+ element without repainting requires the background to be painted into
+ the scrolling contents layer and correctly account for that layer not
+ including the border in its bounds. -->
+<div id="scroller">
+ <div class="spacer"></div>
+</div>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background-and-child.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698