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

Unified Diff: third_party/WebKit/LayoutTests/animations/display-none-iframe-has-no-animation.html

Issue 2743053003: [Reland #1] Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: rebaseline. Created 3 years, 9 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/animations/display-none-iframe-has-no-animation.html
diff --git a/third_party/WebKit/LayoutTests/animations/display-none-iframe-has-no-animation.html b/third_party/WebKit/LayoutTests/animations/display-none-iframe-has-no-animation.html
new file mode 100644
index 0000000000000000000000000000000000000000..ff1cc9359acf063ee032cd93a42123ca76565df6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/display-none-iframe-has-no-animation.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script type="text/javascript">
+ function go() {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ }
+ // Wait a couple of frames for the animation inside the iframe to progress.
+ requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ var iframe = document.getElementById("iframe");
+ iframe.style.display = "block";
+ var innerDoc = iframe.contentDocument;
+ var target = innerDoc.getElementById('target');
+
+ // If the animation has been running, then we expect "left" to be
+ // non-zero.
+ if (parseInt(getComputedStyle(target).left, 10) == 0)
+ document.write("PASS");
+ else
+ document.write("FAIL");
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.notifyDone();
+ }
+ });
+ });
+ };
+</script>
+<body onload="go()">
+ <p>
+ Tests that children of a display:none iframe do not run animations.
+ </p>
+ <iframe id="iframe" style="display:none" src="resources/frame_with_animation.html"></iframe>
+</body>

Powered by Google App Engine
This is Rietveld 408576698