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

Unified Diff: LayoutTests/compositing/will-change/will-change-contents-suppresses-compositing.html

Issue 298723011: Make 'will-change: contents' suppress compositing in subtree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: 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>

Powered by Google App Engine
This is Rietveld 408576698