diff options
author | mvujovic@adobe.com <mvujovic@adobe.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2013-09-03 21:56:21 +0000 |
---|---|---|
committer | mvujovic@adobe.com <mvujovic@adobe.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2013-09-03 21:56:21 +0000 |
commit | bdb3643e5dc724bcb949c84132ac2609b62af482 (patch) | |
tree | 8b677b1f6408b18ecbc596883334792d046146b4 /third_party/WebKit/LayoutTests/compositing/iframes | |
parent | e79f1a8a59ab8c7411158a69bc8175d4bb63664c (diff) | |
download | chromium_src-bdb3643e5dc724bcb949c84132ac2609b62af482.zip chromium_src-bdb3643e5dc724bcb949c84132ac2609b62af482.tar.gz chromium_src-bdb3643e5dc724bcb949c84132ac2609b62af482.tar.bz2 |
Reevaluate compositing requirements after next layout when fixed position elements are marked as out of viewport
BUG=279479
Review URL: https://chromiumcodereview.appspot.com/23448009
git-svn-id: svn://svn.chromium.org/blink/trunk@157154 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/compositing/iframes')
3 files changed, 94 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/fixed-position-element-in-iframe-enters-viewport-expected.html b/third_party/WebKit/LayoutTests/compositing/iframes/fixed-position-element-in-iframe-enters-viewport-expected.html new file mode 100644 index 0000000..fd07d6c --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/iframes/fixed-position-element-in-iframe-enters-viewport-expected.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> + <style> + #iframe-containing-fixed-position-element { + background: green; + width: 100px; + height: 100px; + } + </style> + <script> + if (window.testRunner) + testRunner.waitUntilDone(); + + function runTest() + { + if (window.testRunner) { + testRunner.display(); + testRunner.notifyDone(); + } + } + </script> +</head> +<body onload="runTest()"> + <div id="iframe-containing-fixed-position-element"></div> +</body> +</html> diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/fixed-position-element-in-iframe-enters-viewport.html b/third_party/WebKit/LayoutTests/compositing/iframes/fixed-position-element-in-iframe-enters-viewport.html new file mode 100644 index 0000000..cffc66b --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/iframes/fixed-position-element-in-iframe-enters-viewport.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<!-- +This test verifies that a fixed position element inside an iframe paints when +it comes into view due to the iframe increasing in size. + +If this test passes, you should see a green square. +--> +<html> +<head> + <style> + #iframe-containing-fixed-position-element { + background: red; + width: 100px; + height: 0; + border: 0; + } + </style> + <script> + if (window.testRunner) + testRunner.waitUntilDone(); + + if (window.internals) { + window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true); + window.internals.settings.setFixedPositionCreatesStackingContext(true); + } + + function runTest() + { + // Initially, the fixed position element in the iframe will not + // paint because the iframe has zero height. + if (window.testRunner) + testRunner.display(); + + // Give the iframe a non-zero height. The fixed position element + // inside the iframe should paint now. + var iframeElement = document.getElementById("iframe-containing-fixed-position-element"); + iframeElement.style.height = "100px"; + + if (window.testRunner) { + testRunner.display(); + testRunner.notifyDone(); + } + } + </script> +</head> +<body onload="runTest()"> + <iframe id="iframe-containing-fixed-position-element" src="resources/subframe-with-fixed-position-element.html"></iframe> +</body> +</html> diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/resources/subframe-with-fixed-position-element.html b/third_party/WebKit/LayoutTests/compositing/iframes/resources/subframe-with-fixed-position-element.html new file mode 100644 index 0000000..60415d8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/iframes/resources/subframe-with-fixed-position-element.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> + <style> + .fixed-position-element { + background-color: green; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + </style> +</head> +<body> + <div class="fixed-position-element"></div> +</body> +</html> |