Index: LayoutTests/compositing/squashing/squash-overflow-hidden-scrolltop.html |
diff --git a/LayoutTests/compositing/squashing/squash-overflow-hidden-scrolltop.html b/LayoutTests/compositing/squashing/squash-overflow-hidden-scrolltop.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..16081bbcdda57a43a8f2eedf0b266527dbcaf40b |
--- /dev/null |
+++ b/LayoutTests/compositing/squashing/squash-overflow-hidden-scrolltop.html |
@@ -0,0 +1,73 @@ |
+<!DOCTYPE html> |
+ |
+<style type="text/css" media="screen"> |
+ .container { |
+ display: inline-block; |
+ width: 200px; |
+ height: 200px; |
+ overflow: hidden; |
+ margin: 10px; |
+ border: 1px solid black; |
+ } |
+ |
+ .inner { |
+ width: 100%; |
+ height: 1000px; |
+ background-color: blue; |
+ } |
+ |
+ .compositing { |
+ position: absolute; |
+ top: 20px; |
+ left: 20px; |
+ width: 100px; |
+ height: 100px; |
+ -webkit-transform: translateZ(0); |
+ } |
+ |
+ .top { |
+ height: 50%; |
+ width: 100%; |
+ background-color: red; |
+ } |
+ |
+ .bottom { |
+ height: 50%; |
+ width: 100%; |
+ background-color: green; |
+ } |
+</style> |
+<script type="text/javascript" charset="utf-8"> |
+ if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+ function doTest() |
+ { |
+ window.setTimeout(function() { |
+ // alert('hi'); |
+ var scrollables = document.querySelectorAll('.container'); |
+ for (var i = 0; i < scrollables.length; ++i) { |
+ scrollables[i].scrollTop = 500; |
+ } |
+ |
+ |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ |
+ }, 0); |
+ } |
+ |
+ window.addEventListener('load', doTest, false); |
+</script> |
+ |
+<!-- Go into compositing. --> |
+<div class="compositing"></div> |
+ |
+<!-- Test repainting when the graphicsLayer offsetFromRenderer changes --> |
+<!-- You should see one green square, and no red --> |
+<div class="container" style="position: relative;"> |
+ <div class="inner" style="position: relative;"> |
+ <div class="top"></div> |
+ <div class="bottom"></div> |
+ </div> |
+</div> |