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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html

Issue 2425873005: Don't apply clips to children of composited-scrolling elements for overlap testing. (Closed)
Patch Set: none Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html b/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..e58eb894d600d7d0c758962d802308d447bacc7e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<style>
+div::-webkit-scrollbar {
+ display: none;
+}
+</style>
+<div id=scroller style="width: 400px; height: 400px; overflow-y: scroll; will-change: transform">
+ <div style="height: 400px"></div>
+ <div id=overlap style="backface-visibility: hidden; width: 100px; height: 100px; background-color: red"></div>
+ <div id=target style="position: relative; top: -50px; left: 50px; width: 100px; height: 100px; background-color: green"></div>
+</div>
+<div id="notscrolled" style="position: relative; width: 50px; height: 300px; background: lightgray"></div>
+<pre id=output></pre>
+<script>
+if (testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+// Test passes if 'target' (green) is on top of 'overlap' (red).
+// The actual test output is a layerization where 'overlap' has a composited layer,
+// and 'target' does, but 'notscrolled'. 'target' has a composited layer because
+// it overlaps 'overlap'. 'notscrolled' does not have one because it does not
+// intersect the scroller and is outside of it.
+onload = function() {
+ requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ scroller.scrollTop = 400;
+ if (internals)
+ output.innerHTML = internals.layerTreeAsText(document);
Ian Vollick 2016/10/19 20:16:31 nit: to avoid text diff churn, can you check the o
chrishtr 2016/10/19 21:44:51 Done.
+ if (testRunner)
+ testRunner.notifyDone();
+ });
+ });
+};
+</script>

Powered by Google App Engine
This is Rietveld 408576698