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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-transparent-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
Index: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-transparent-background.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-transparent-background.html b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-transparent-background.html
new file mode 100644
index 0000000000000000000000000000000000000000..331d013e393569277d7f7e018cf0cb96188f42e0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-transparent-background.html
@@ -0,0 +1,48 @@
+<script>
+if (window.testRunner)
+ window.testRunner.dumpAsText();
+
+function hasNotOpaqueCompositedScrollingContentsLayer(layer) {
+ if (layer.name == "Scrolling Contents Layer")
+ return !layer.contentsOpaque;
+ if (layer.children) {
+ for (var i = 0; i < layer.children.length; i++) {
+ if (hasNotOpaqueCompositedScrollingContentsLayer(layer.children[i]))
+ return true;
+ }
+ }
+ return false;
+}
+
+onload = function() {
+ if (!window.testRunner || !window.internals)
+ return;
+
+ var result = "";
+ result += "Should not have opaque composited scrolling contents layer: ";
+ if (hasNotOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals.layerTreeAsText(document))))
+ result += "Pass.\n";
+ else
+ result += "Fail.\n";
+ window.testRunner.setCustomTextOutput(result);
+}
+</script>
+<style>
+#scroller {
+ background: white local content-box;
+ border: 10px solid rgba(0, 255, 0, 0.5);
+ overflow: scroll;
+ padding: 10px;
+ width: 180px;
+ height: 180px;
+ will-change: transform;
+}
+.spacer {
+ height: 280px;
+}
+</style>
+<!-- The scroller's Scrolling Contents Layer should be transparent due to the
+ content-box clip with a 10px padding leaving a transparent gap between.
+-->
+<div id="scroller"><div class="spacer"></div></div>
+<pre id="layertree"></pre>

Powered by Google App Engine
This is Rietveld 408576698