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

Unified Diff: LayoutTests/fast/layers/opacity-change-stacking-context.html

Issue 136903004: Changing from opacity less than 1 to opacity 1 should not trigger layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/fast/layers/opacity-change-stacking-context-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/layers/opacity-change-stacking-context.html
diff --git a/LayoutTests/fast/layers/opacity-change-stacking-context.html b/LayoutTests/fast/layers/opacity-change-stacking-context.html
new file mode 100644
index 0000000000000000000000000000000000000000..b9aa43ac03e95e6f02f4063be7e32ec428a28c4a
--- /dev/null
+++ b/LayoutTests/fast/layers/opacity-change-stacking-context.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+
+<script src="../../resources/js-test.js"></script>
+
+<style>
+#target {
+ top: 40px;
+ width: 150px;
+ height: 75px;
+ background-color: yellow;
+ -webkit-transform: translateZ(0);
+ opacity: 0;
+}
+</style>
+
+<div id="target"></div>
+
+<script>
+description("Test that opacity changes from less than 1 to 1 don't cause layout if the layer remains a stacking context");
+var div = document.getElementById('target');
+div.offsetTop;
+div.style.opacity = 1;
+shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+shouldBe("internals.needsLayoutCount()", "0");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/layers/opacity-change-stacking-context-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698