Chromium Code Reviews| Index: LayoutTests/compositing/will-change/will-change-contents-suppresses-compositing.html |
| diff --git a/LayoutTests/compositing/will-change/will-change-contents-suppresses-compositing.html b/LayoutTests/compositing/will-change/will-change-contents-suppresses-compositing.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e4223c2f8df566aaab316c237f33b10912d0e447 |
| --- /dev/null |
| +++ b/LayoutTests/compositing/will-change/will-change-contents-suppresses-compositing.html |
| @@ -0,0 +1,80 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
|
esprehn
2014/05/23 01:05:58
We normally leave off the <html>, <head> and <body
ajuma
2014/05/23 14:38:31
Done.
|
| + <style> |
| + .shouldNotComposite { |
| + width: 30px; |
| + height: 30px; |
| + margin: 4px; |
| + background-color: blue; |
| + } |
| + |
| + .positioned { |
| + position: relative; |
| + left: 40px; |
| + } |
| + |
| + #willChangeContents { |
| + will-change: contents; |
| + } |
| + |
| + #willChangeOpacity { |
| + will-change: opacity; |
| + } |
| + |
| + #willChangeTransform { |
| + will-change: -webkit-transform; |
| + } |
| + |
| + #willChangeTop { |
| + will-change: top; |
| + } |
| + |
| + #willChangeLeft { |
| + will-change: left; |
| + } |
| + |
| + #animateOpacity { |
| + -webkit-animation: fade-in-out 0.1s linear infinite alternate; |
| + } |
| + |
| + @-webkit-keyframes fade-in-out { from { opacity: 0.3; } to { opacity: 0.9; } } |
| + </style> |
| + |
| + <script> |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
| + } |
| + |
| + function animationEventListener() { |
| + if (window.testRunner) { |
| + document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document); |
| + testRunner.notifyDone(); |
| + } |
| + } |
| + |
| + window.addEventListener('load', function() { |
|
esprehn
2014/05/23 01:05:58
I'd just do onload = function() { it's shorter
ajuma
2014/05/23 14:38:31
Done.
|
| + document.getElementById('animateOpacity').addEventListener('webkitAnimationIteration', animationEventListener); |
| + }, false); |
| + </script> |
| +</head> |
| +<body> |
| + <div id="willChangeContents"> |
| + <div id="willChangeOpacity" class="shouldNotComposite"></div> |
| + <div> |
| + <div id="willChangeLeft" class="positioned shouldNotComposite"></div> |
| + </div> |
| + <div> |
| + <div> |
| + <div id="willChangeTransform" class="shouldNotComposite"> |
| + <div id="willChangeTop" class="positioned shouldNotComposite"></div> |
| + </div> |
| + </div> |
| + </div> |
| + <div id="animateOpacity" class="shouldNotComposite"></div> |
| + </div> |
| + |
| + <pre id="layertree"></pre> |
| +</body> |
| +</html> |