Index: LayoutTests/compositing/will-change/containing-block-added.html |
diff --git a/LayoutTests/compositing/will-change/containing-block-added.html b/LayoutTests/compositing/will-change/containing-block-added.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..37498dc6b85290d92dafa5ccf0ff39404f7d7272 |
--- /dev/null |
+++ b/LayoutTests/compositing/will-change/containing-block-added.html |
@@ -0,0 +1,53 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
esprehn
2014/02/27 20:58:31
We often leave off the <html>, <head> and <body> e
|
+ <style> |
+ #container { |
+ will-change: top; |
+ position: absolute; |
+ left: 200px; |
+ top: 100px; |
+ width: 100px; |
+ height: 100px; |
+ background-color: blue; |
+ } |
+ |
+ .fixed { |
+ position: fixed; |
+ left: 50px; |
+ top: 50px; |
+ width: 75px; |
+ height: 75px; |
+ background-color: green |
+ } |
+ </style> |
+ <script type="text/javascript"> |
+ if (window.testRunner) { |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ function doTest() |
+ { |
+ if (window.internals) { |
+ window.internals.forceCompositingUpdate(document); |
+ } |
+ // Adding "will-change: -webkit-transform" to the container div should |
+ // make this div become the containing block for its fixed position |
+ // descendant. |
+ document.getElementById("container").style.willChange = "-webkit-transform"; |
+ if (window.testRunner) { |
+ testRunner.notifyDone(); |
+ } |
+ } |
+ |
+ window.addEventListener('load', doTest, false); |
+ </script> |
+</head> |
+ |
+<body> |
+ <div id="container"> |
+ <div class="fixed"></div> |
+ </div> |
+</body> |
+ |
+</html> |